Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 stopping from clicking over a spot
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
JonnyBigBoi




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Mon Jan 10, 2005 8:42 pm   Post subject: (No 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".
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: