0 '-=X_O_X=-by George Tompkins Rev. 3/91 this program plays a perfect game of Tic-Tac-Toe you can not win.
1 CLS:DEFSTRA:DEFINTB-Z:DATA71,74,77,151,154,157,231,234,237:PRINT@82,CHR$(27)"VDo you want to go first? (Y/n)";:A=INPUT$(1):CLS:LINE(197,2)-(197,53):LINE(215,2)-(215,53):LINE(179,19)-(231,19):LINE(179,35)-(231,35)
2 FORI=1TO9:READP:PRINT@P,CHR$(27)"p"RIGHT$(STR$(I),1)CHR$(27)"q":X=(PMOD40)*6-1:Y=(P\40)*8-1:LINE(X,Y)-(X+6,Y):LINE(X,Y)-(X,Y+8):NEXT:RESTORE:PRINT@281,"[ENTER] to start new game":PRINT@315,"Menu":PRINT@81,"X at position 1-9 ?