\start83\ \comment=Copyright Stephen Ostermiller 1996-2001 \protected=FALSE \name=TICTACTO FnOff ZStandard ZInteger CoordOff AxesOff Vertical \(-)\28 Vertical \(-)\9 Line(\(-)\47,12,9,12 Line(\(-)\47,\(-)\7,9,\(-)\7 Text(57,12,"TIC TAC TOE" Text(6,8,7 Text(6,27,8 Text(6,46,9 Text(25,8,4 Text(25,27,5 Text(25,46,6 Text(44,8,1 Text(44,27,2 Text(44,46,3 \(-)\1\->\A 0\->\O 0\->\P 0\->\Q 0\->\T 0\->\U 0\->\V 0\->\S 0\->\Z 0\->\\theta\ Lbl 1 If A=1 Text(28,75,"O" If A=\(-)\1 Text(28,75,"X" Lbl 2 getKey\->\B If B=72 Then If O\!=\0 Goto 2 6\->\C 8\->\D A\->\O Goto 3 End If B=73 Then If P\!=\0 Goto 2 6\->\C 27\->\D A\->\P Goto 3 End If B=74 Then If Q\!=\0 Goto 2 6\->\C 46\->\D A\->\Q Goto 3 End If B=82 Then If T\!=\0 Goto 2 25\->\C 8\->\D A\->\T Goto 3 End If B=83 Then If U\!=\0 Goto 2 25\->\C 27\->\D A\->\U Goto 3 End If B=84 Then If V\!=\0 Goto 2 25\->\C 46\->\D A\->\V Goto 3 End If B=92 Then If S\!=\0 Goto 2 44\->\C 8\->\D A\->\S Goto 3 End If B=93 Then If Z\!=\0 Goto 2 44\->\C 27\->\D A\->\Z Goto 3 End If B=94 Then If \theta\\!=\0 Goto 2 44\->\C 46\->\D A\->\\theta\ Goto 3 End Goto 2 Lbl 3 If A=\(-)\1 Text(C,D,"X" If A=1 Text(C,D,"O" If abs(S+T+O)=3 Then Line(\(-)\38,22,\(-)\38,\(-)\16 Goto 4 End If abs(Z+U+P)=3 Then Line(\(-)\19,22,\(-)\19,\(-)\16 Goto 4 End If abs(\theta\+V+Q)=3 Then Line(0,22,0,\(-)\16 Goto 4 End If abs(O+U+\theta\)=3 Then Line(\(-)\38,22,0,\(-)\16 Goto 4 End If abs(S+U+Q)=3 Then Line(\(-)\38,\(-)\16,0,22 Goto 4 End If abs(O+P+Q)=3 Then Line(\(-)\38,22,0,22 Goto 4 End If abs(T+U+V)=3 Then Line(\(-)\38,3,0,3 Goto 4 End If abs(S+Z+\theta\)=3 Then Line(\(-)\38,\(-)\16,0,\(-)\16 Text(34,69,"WINS" Goto 4 End If SZ\theta\TUVOPQ\!=\0 Then Text(28,69,"CATS" Text(34,68,"GAME" Goto 5 End \(-)\A\->\A Goto 1 Lbl 4 Text(34,69,"WINS" Lbl 5 Text(16,68,"GAME" Text(22,69,"OVER" Pause CoordOn AxesOn ZStandard Disp \stop83\