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

Username:   Password: 
 RegisterRegister   
 Tic Tac Toe Help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
king202




PostPosted: Tue May 18, 2004 9:58 am   Post subject: Tic Tac Toe Help

Hi all I am in Grade 10 and i am learning computer science and i need some help with a game i am making. I would like to make a Tic tac toe Game. Now i got the board down But now I would like to no how you would get the X and O to show up when you click on the screen. if someone can help me that would be great
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Tue May 18, 2004 12:01 pm   Post subject: (No subject)

well you are going to need to use the mouse comands to check where the mouse is and if the buttion is down.

then you are going to need to uses some closion dection like code to check if the mouse is in one of the boxs.

now if the mouse is in the box and the buttion is down and it is player Xs turn draw and X there if it is player Os turn draw a O.

http://www.compsci.ca/v2/viewtopic.php?t=6 - on how to use the mouse comands

http://www.compsci.ca/v2/viewtopic.php?t=75 - on collision dection


To draw the X and O you should probly uses draw font to keep things easy and since u will know witch box was cliked from above info on mouse and collision dection you could just put the code to draw the x or o in that if stament and since u know where the box is you could just set the cordents for font draw to the center of the box.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
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: