Make your own free website on Tripod.com

Snake Chess

 

This is a popular  snake chess game among the kids. However, it may looks simple,  it is difficult to programme. To design the programme, I took one day to think out the mathematical logics and writing out the routines on paper (not in front of the computer). Since the chess 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 zig-zag manner, I need to control the motion using reverse order and by imposing some conditions.

In addition, I added the roll dice procedure (designed earlier) into this programme. After a few trials and alterations with the help of my 10 years son( I am actually a one-man team), the programme works, and it works greats. I am not attaching the codes here yet as I think it is good for you to figure out the logics and try to programme it like myself. If you really cannot get it running, please email me at liewvk@vbtutor.net

Happy programming!