Code: Alles auswählen
Procedure S(k,s.s)
SetGadgetText(k,s)
EndProcedure
t=65
z.s="=> A"
1:
Dim T(CreateGadgetList(OpenWindow(0,0,0,t*3,220,1,"AB")))
For a=0 To9
ButtonGadget(a,t*a%3,a/3*t,t,t,"")
TextGadget(9,t,t*3,t,t,z)
SetGadgetFont(a,LoadFont(a,z,24-a/9*12))
Next
While O-9
x=WindowEvent()-'3,'
O=EventwParam()&$F
If x=T(O)
T(O)=P+1
z=Chr(t+P)
P!1
S(O,z)
For i=S(9,"=> "+Chr(t+P))To2
If T(x)&T(x+1)&T(x+2)+(T(i+3)&T(i+6))|(T(4)&T(8-i))&T(i)
z+" won"
Goto 1
EndIf
x+3
Next
EndIf
Wend