Silver
Creator
HOME
DOWNLOADS
FORUMS
GAMEMAKERS' GARAGE
The SilverCreator Plaza
Current time:
SilverCreator Plaza
›
Developer's Corner
›
Released Games
› Tic-Tac-Toe
(Moderators: Plaza Mike, Plaza Redd)
‹
Previous Topic
|
Next Topic
›
Pages: 1
Tic-Tac-Toe (Read 296 times)
Hendo
God Member
Offline
OH HAI! Wut r goin on
in this forum?
Posts: 1275
Ontario, Canada
Gender:
Tic-Tac-Toe
Feb 1
st
, 2007 at 1:13pm
It's simple...tic-tac-toe...I feel like i shoudln't be releasing it because Equanox basically recoded the whole thing but whatever....
Link:
http://hendosoft.macintoshdevelopers.net/files/tictactoe.zip
Source and graphics included in the zip file.
Back to top
IP Logged
EqwanoX
God Member
Offline
Posts: 1782
Gender:
Re: Tic-Tac-Toe
Reply #1 -
Feb 1
st
, 2007 at 11:53pm
yea but that was to show you that haveing most of the code in a method makes it easier to edit when bug checking cause that way you only have to edit one method and not nine click areas, makeing things as simple as possable will save you alot of frustration in the future. also you copy and pasted the wincheck code after every check when it only needs to be in there once at the end, and all the checks were supposed to be in one FOR NEXT command, the "z" variable is the player number, you shouldnt use tabs, it doesnt format right. the RESULTCHECK method shouldve looked like this:
FOR z = 1 to 2
IF square1 = z THEN
IF square2 = z THEN
IF square3 = z THEN
LET win = z
END IF
END IF
END IF
IF square4 = z THEN
IF square5 = z THEN
IF square6 = z THEN
LET win = z
END IF
END IF
END IF
IF square7 = z THEN
IF square8 = z THEN
IF square9 = z THEN
LET win = z
END IF
END IF
END IF
IF square1 = z THEN
IF square4 = z THEN
IF square7 = z THEN
LET win = z
END IF
END IF
END IF
IF square2 = z THEN
IF square5 = z THEN
IF square8 = z THEN
LET win = z
END IF
END IF
END IF
IF square3 = z THEN
IF square6 = z THEN
IF square9 = z THEN
LET win = z
END IF
END IF
END IF
IF square1 = z THEN
IF square5 = z THEN
IF square9 = z THEN
LET win = z
END IF
END IF
END IF
IF square3 = z THEN
IF square5 = z THEN
IF square7 = z THEN
LET win = z
END IF
END IF
END IF
NEXT
IF win > 0 THEN //then check for the win at the end here
IF win = 1 THEN
NOTEALERT "Player 1 Wins!"
ELSE
NOTEALERT "Player 2 Wins!"
END IF
FOR x = 1 to 9
IF SPRITEVALID (x) = true THEN
KILLSPRITE x, true
END IF
NEXT
GOTOCARD 1
END IF
Back to top
macintosh 8500/150 OS8.0
IP Logged
Pages: 1
SilverCreator Plaza
›
Developer's Corner
›
Released Games
(Moderators: Plaza Mike, Plaza Redd)
‹
Previous Topic
|
Next Topic
›
Forum Jump »
Home
» 10 most recent Posts
» 10 most recent Topics
The Lobby
- Plaza Announcements
- Suggestion Box
- General Discussion
SilverCreator
- SilverCreator Discussion
- SilverCreator Code Samples
- Code Samples Archive
Developer's Corner
- Developer's Diary
- Game Graveyard
- Released Games ««
SilverCreator Plaza
» Powered by
YaBB 2.4
!
YaBB
© 2000-2009. All Rights Reserved.
Copyright © 2001 - 2010 Mike Richardson.
68kMLA