Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Tic-Tac-Toe Help
Old
pc013
Guest
 
Status:
Posts: n/a
Default Tic-Tac-Toe Help - 12-05-2009, 06:50 PM

I'm making a tic tac toe game for a class project. so far i have all the squares set up, but dont know what to do next. i dont know how to make alice realize when it is "x" turn and "o" turn so it knows which letter to make appear. help please
   
Reply With Quote
Old
kylefwlr
Guest
 
Status:
Posts: n/a
Default 12-05-2009, 10:16 PM

you could make an x and circle object in alice and make it so if one is clicked a variable is changed in maybe an if statement as to which shape would move to where you clicked. maybe make some invisible squares in the boxes and say if one is clicked "call function that moves the x or o to that objects position"
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 12-06-2009, 09:10 AM

I can make a full example of this program for you, but I don't have time now. How about making a 3D text in each box, and events for when each box is clicked on. Then make methods for each of the 3D texts where when they are clicked, it changes the text of that individual text to either a O or X. You would have 2 if/else statements in each method, and you would need a number variable for each text. And depending on who's turn it is the variable changes from 0 if it is O's turn and 1 if it is X's turn. Then in the if/else statement you would do if (numberVariable1 == 0), change text to O in that box, and change all of the other numberVariables to 1. Then it would be other person's turn, and it would be the same if/else statement except with variable set to 1, and text changing to X.

Its hard to explain, and you probably have no idea what I'm talking about, but I think I could get this working for you if I have time.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 12-07-2009, 02:48 PM

I have finally finished my first version of Tic-Tac-Toe, and I must say I am very proud of it I am pretty sure that there are no glitches or exploits, which is hard to do in some games.

Here it is, you may use it if you want to, but I am going to make a seperate thread in the Share Worlds part of the forums to post also because it is a world that I created and I am thinking of making an even better version of it. I hope you like it, and the person that wanted this world, please respond telling what you think! Thanks
Attached Files
File Type: a2w Tic-Tac-Toe.a2w (409.7 KB, 121 views)
   
Reply With Quote
Re:Tic tac toe
Old
Dolphinlady2
Junior Member
 
Status: Offline
Posts: 2
Join Date: Nov 2014
Default Re:Tic tac toe - 12-03-2014, 08:29 PM

I am trying to make a tic tac toe and viewing what you guys have posted but not having any success.

Quote:
Originally Posted by Dameria View Post
I have finally finished my first version of Tic-Tac-Toe, and I must say I am very proud of it I am pretty sure that there are no glitches or exploits, which is hard to do in some games.

Here it is, you may use it if you want to, but I am going to make a seperate thread in the Share Worlds part of the forums to post also because it is a world that I created and I am thinking of making an even better version of it. I hope you like it, and the person that wanted this world, please respond telling what you think! Thanks
   
Reply With Quote
Tic tac toe in Alice 2.2
Old
Dolphinlady2
Junior Member
 
Status: Offline
Posts: 2
Join Date: Nov 2014
Default Tic tac toe in Alice 2.2 - 12-03-2014, 09:48 PM

I need some help in completing tic tac toe game in Alice 2.2.. Urgent..


Quote:
Originally Posted by Dameria View Post
I have finally finished my first version of Tic-Tac-Toe, and I must say I am very proud of it I am pretty sure that there are no glitches or exploits, which is hard to do in some games.

Here it is, you may use it if you want to, but I am going to make a seperate thread in the Share Worlds part of the forums to post also because it is a world that I created and I am thinking of making an even better version of it. I hope you like it, and the person that wanted this world, please respond telling what you think! Thanks
Quote:
Originally Posted by pc013 View Post
I'm making a tic tac toe game for a class project. so far i have all the squares set up, but dont know what to do next. i dont know how to make alice realize when it is "x" turn and "o" turn so it knows which letter to make appear. help please
   
Reply With Quote
What do you need help with?
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 408
Join Date: Oct 2013
Location: Northern Virginia
Default What do you need help with? - 12-06-2014, 09:56 AM

Im glad to help but what do you need help with on the project?


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2021, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.