by dafunkymunky on Fri May 13, 2005 2:27 pm
see this is what you do
declare a two dimensional array and initially save all the entries to zero
the no of rows and columns in your array should be equal to the no of rows and columns in your board , i think i told you in youyr earlier post how to redeclare the size of the array
this is done by
for i = 0 to <the no of rows in your array>
for j=0 to <no of columns in your array>
array(i,j)=0
next j
next i
now as the user or whoever puts something store a certain value like say if the square contains the head or tail store 1 or 2 and if ti contains the foot or the end of the ladder store 3 or 4 to the corresponding row and col of the array as that of the board
this way every time the user begins is ladder or ends his ladder you just check if the value in the array element of that row and column is 0 otherwise display error mesage
and the snake and ladder going out of the box can be checked by checking if the row or coulmn the ladder or snake begins or ends is outside the arrray limits remember the ubound and lbound tags
and man please ask for the eact code if you reaaly dont understand evenafter my post or atleasst tick solved and post you solution so that one can understand the discussion is complete
i think it would be bettter if you would post a link to you game once it is completed everyone can see and appriciate you work
--------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....