Computer Science Canada

stopping from clicking over a spot

Author:  JonnyBigBoi [ Mon Jan 10, 2005 7:33 pm ]
Post subject:  stopping from clicking over a spot

k, in my game i click to place my ovals on the grid, and i can still click on the squares that are occupied, how would i make it so the spaces stay the same and not change when you click on them.

Author:  Cervantes [ Mon Jan 10, 2005 8:42 pm ]
Post subject: 

code:

loop
turnCounter += 1
%mouse stuff.
%determine the value for x and y based on the width/height of each grid space and the offset (you probably won't have your grid start at (0,0).
if grid (x, y) = -1 then % -1 represents empty, in this case
  grid (x,y) := turnCounter mod 2
end if
end loop


Since you've got so many of these short little questions, consider using just one thread for all your questions: "Developing Checkers".


: