To design the program, it took me one day to think out the mathematical logics and wrote out the routines on paper (not in front of the computer). Since the board comprises 10 rows and 10 columns, each box thus represents a cell with the coordinate (column, row). Therefore, I figured out that I need to define the coordinate of every cell by declaring two arrays row(10) and col(10) at the beginning of the procedure. To move the chess piece, I employed the method object.move col(i), row(j), where I initiate the values of col(i) and row(j) in a For....Next loop. As the motion is in a zigzag manner, I need to control the motion using reverse order and by imposing some conditions.
|
