key-board instead a sheet of paper.
the keys can be any group of letters
or the number pad and still, eg "1".
via the data string.
restore select
read sum
dim num$(sum)
for a=1 to sum
read num$(a)
next a
restore title
read blx
dim lit$(blx)
for a=1 to blx
read lit$(a)
next a
blox=9
dim lt$(blox)
dim x(blox)
dim y(blox)
dim z(blox)
for a=1 to blox
z(a)=3
next a
word=4
open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
g$=inkey$(0)
'if g$="q" word=word+1
'if word>blx word=1
gridx=0
gridy=150
for a=1 to blox
gridx=gridx+50
if gridx>150 then
gridx=50
gridy=gridy+50
endif
x1=x(a)+gridx+100-24
y1=y(a)+gridy-24
x2=x(a)+gridx+100+24
y2=y(a)+gridy+24
rectangle x1,y1 to x2,y2
setrgb 1,150,150,150
text x1+18,y1+27,num$(a)
setrgb 1,256,256,256
if g$=num$(a) x=x+1
if x>2 x=1
if g$=num$(a) z(a)=x
if g$="t" z(a)=3
text 140,110,"'t' to clear"
if z(a)=1 or z(a)=2 clear fill rectangle x1+5,y1+5 to x2-5,y2-5
if z(a)=1 lt$(a)="O"
if z(a)=2 lt$(a)="X"
if z(a)=3 lt$(a)=""
text x(a)+gridx+100-5,y(a)+gridy+5,lt$(a)
next a
for a=1 to blx
x1=0
y1=150
for b=1 to len(lit$(a))
x1=x1+50
if x1>150 then
x1=50
y1=y1+50
endif
if word=a text x1+95,y1+5,mid$(lit$(a),b,1)
next b
next a
until (1=0)
label select
data 9
data "w","e","r","a","s","d","z","x","c"
label title
data 4
data "TICTACTOE"
data "PLAYERONE"
data "PLAYERTWO"
data " "