Thread: Tic-Tac-Toe!
View Single Post
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 10-18-2011, 12:24 PM

Quote:
Originally Posted by Shibble View Post
Not sure if you will read this because this thread is pretty old, but how did you manage to get the world.playerturn variable to the setSquare method. I have a assingment for school which looks a bit like this, but i can't seen to make a "universal" variable that changes througout the game.
To make a universal variable you have to create the variable underneath the "World" tab in the object list, the one where every other object branches off of. If you create the variable here, it can be used in any method or object in the program. If you create the variable in any other object, then that variable will only work within that object's methods.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote