PureGolf mit TicTacToe
- HeX0R
- Beiträge: 3040
- Registriert: 10.09.2004 09:59
- Computerausstattung: AMD Ryzen 7 5800X
96Gig Ram
NVIDIA GEFORCE RTX 3060TI/8Gig
Win11 64Bit
G19 Tastatur
2x 24" + 1x27" Monitore
Glorious O Wireless Maus
PB 3.x-PB 6.x
Oculus Quest 2 + 3 - Kontaktdaten:
? Bei mir schmiert nix ab
{Home}.:|:.{Codes}.:|:.{Downloads}.:|:.{History Viewer Online}.:|:.{Bier spendieren}
Einverstanden.
729! Es liegt übrigends an dem w>999
729! Es liegt übrigends an dem w>999
Code: Alles auswählen
Procedure S(k,s.s)
SetGadgetText(k,s)
EndProcedure
Dim T(9)
s.s="'s turn"
t=79
c=190
CreateGadgetList(OpenWindow(0,0,0,c,250,1,"Game"))
For a=0 To8
ButtonGadget(a,70*a%3,70*(a/3),50,50,z.s)
SetGadgetFont(a,LoadFont(a,z,24))
Next
TextGadget(9,0,c,c,20,"O"+s,1)
c/2
ButtonGadget(c,0,220,c,30,"New")
ButtonGadget(t,c,220,c,30,"End")
SetGadgetFont(9,LoadFont(9,z,12))
l:
w=WaitWindowEvent()
If w=13100
O=EventwParam()
If O=t
End
ElseIf O=c
For a=0 To9
T(a)=0
S(a,z)
DisableGadget(a,0)
Next
p=0
Else
If T(O)=0
T(O)=p+1
S(O,Chr(t+p*9))
S(9,Chr(t+p!1*9)+s)
j=p+1
For i=DisableGadget(O,1) To2
x=i*3
If T(x)&T(x+1)&T(x+2)=j Or T(i)&T(i+3)&T(i+6)=j Or T(0)&T(4)&T(8)=j Or T(2)&T(4)&T(6)=j
S(9,Chr(t+p*9)+" wins")
For a=0 To8
DisableGadget(a,1)
Next
EndIf
Next
p!1
EndIf
EndIf
EndIf
Goto l
Falsch zugeordnetes Zitat des Tages: "O'zapft is" - Edward Snowden 

725!
Code: Alles auswählen
Procedure S(k,s.s)
SetGadgetText(k,s)
EndProcedure
Dim T(9)
s.s="'s turn"
t=79
c=190
CreateGadgetList(OpenWindow(0,0,0,c,250,1,"Game"))
For a=0 To8
ButtonGadget(a,70*a%3,70*(a/3),50,50,z.s)
SetGadgetFont(a,LoadFont(a,z,24))
Next
TextGadget(9,0,c,c,20,"O"+s,1)
c/2
ButtonGadget(c,0,220,c,30,"New")
ButtonGadget(t,c,220,c,30,"End")
SetGadgetFont(9,LoadFont(9,z,12))
l:
w=WaitWindowEvent()
If w=13100
O=EventwParam()
If O=t
End
ElseIf O=c
For a=0 To9
T(a)=0
S(a,z)
DisableGadget(a,0)
Next
p=0
Else
If T(O)=0
T(O)=p+1
h.s=Chr(t+p*9)
S(O,h)
S(9,Chr(t+p!1*9)+s)
j=p+1
For i=DisableGadget(O,1) To2
x=i*3
If T(x)&T(x+1)&T(x+2)=j Or T(i)&T(i+3)&T(i+6)=j Or T(0)&T(4)&T(8)=j Or T(2)&T(4)&T(6)=j
S(9,h+" wins")
For a=0 To8
DisableGadget(a,1)
Next
EndIf
Next
p!1
EndIf
EndIf
EndIf
Goto l
Falsch zugeordnetes Zitat des Tages: "O'zapft is" - Edward Snowden 

719
Code: Alles auswählen
Procedure S(k,s.s)
SetGadgetText(k,s)
EndProcedure
Dim T(9)
s.s="'s turn"
t=79
c=190
CreateGadgetList(OpenWindow(0,0,0,c,250,1,"Game"))
For a=0 To8
ButtonGadget(a,70*a%3,70*(a/3),50,50,z.s)
SetGadgetFont(a,LoadFont(a,z,24))
Next
TextGadget(9,0,c,c,20,"O"+s,1)
c/2
ButtonGadget(c,0,220,c,30,"New")
ButtonGadget(t,c,220,c,30,"End")
SetGadgetFont(9,LoadFont(9,z,12))
l:
If WaitWindowEvent()=13100
O=EventwParam()
If O=t
End
ElseIf O=c
For a=0 To9
T(a)=S(a,z)
DisableGadget(a,0)
Next
p=0
Else
If T(O)=0
T(O)=p+1
h.s=Chr(t+p*9)
S(9,Chr(t+p!1*9)+s)
j=p+1
For i=DisableGadget(O,1) To2
x=i*3
If T(x)&T(x+1)&T(x+2)=j Or T(i)&T(i+3)&T(i+6)=j Or T(S(O,h))&T(4)&T(8)=j Or T(2)&T(4)&T(6)=j
For a=S(9,h+" wins") To8
DisableGadget(a,1)
Next
EndIf
Next
p!1
EndIf
EndIf
EndIf
Goto l
709!
Code: Alles auswählen
Procedure S(k,s.s)
SetGadgetText(k,s)
EndProcedure
Dim T(9)
s.s="'s turn"
t=79
c=190
CreateGadgetList(OpenWindow(0,0,0,c,250,1,"Game"))
For a=0 To8
ButtonGadget(a,70*a%3,70*(a/3),50,50,z.s)
SetGadgetFont(a,LoadFont(a,z,24))
Next
TextGadget(9,0,c,c,20,"O"+s,1)
c/2
ButtonGadget(c,0,220,c,30,"New")
ButtonGadget(t,c,220,c,30,"End")
SetGadgetFont(9,LoadFont(9,z,12))
l:
If WaitWindowEvent()=13100
O=EventwParam()
If O=t
End
ElseIf O=c
For a=0 To9
T(a)=0
S(a,z)
DisableGadget(a,0)
Next
p=0
Else
If T(O)=0
T(O)=p+1
h.s=Chr(t+p*9)
S(O,h)
S(9,Chr(t+p!1*9)+s)
For i=DisableGadget(O,1) To2
x=i*3
If (T(x)&T(x+1)&T(x+2))| (T(i)&T(i+3)&T(i+6))|(T(0)&T(4)&T(8))|(T(2)&T(4)&T(6))
S(9,h+" wins")
For a=0 To8
DisableGadget(a,1)
Next
EndIf
Next
p!1
EndIf
EndIf
EndIf
Goto l
Falsch zugeordnetes Zitat des Tages: "O'zapft is" - Edward Snowden 

ok,
705
705
Code: Alles auswählen
Procedure S(k,s.s)
SetGadgetText(k,s)
EndProcedure
Dim T(9)
s.s="'s turn"
t=79
c=190
CreateGadgetList(OpenWindow(0,0,0,c,250,1,"Game"))
For a=0 To8
ButtonGadget(a,70*a%3,70*(a/3),50,50,z.s)
SetGadgetFont(a,LoadFont(a,z,24))
Next
TextGadget(9,0,c,c,20,"O"+s,1)
c/2
ButtonGadget(c,0,220,c,30,"New")
ButtonGadget(t,c,220,c,30,"End")
SetGadgetFont(9,LoadFont(9,z,12))
l:
If WaitWindowEvent()=13100
O=EventwParam()
If O=t
End
ElseIf O=c
For a=0 To9
T(a)=S(a,z)
DisableGadget(a,0)
Next
p=0
Else
If T(O)=0
T(O)=p+1
h.s=Chr(t+p*9)
S(9,Chr(t+p!1*9)+s)
For i=DisableGadget(O,1) To2
x=i*3
If (T(x)&T(x+1)&T(x+2))|(T(i)&T(i+3)&T(i+6))|(T(S(O,h))&T(4)&T(8))|(T(2)&T(4)&T(6))
For a=S(9,h+" wins") To8
DisableGadget(a,1)
Next
EndIf
Next
p!1
EndIf
EndIf
EndIf
Goto l
703!
Kommt schon, die 700 packen wir
Kommt schon, die 700 packen wir

Code: Alles auswählen
Procedure S(k,s.s)
SetGadgetText(k,s)
EndProcedure
Dim T(9)
s.s="'s turn"
t=79
c=190
CreateGadgetList(OpenWindow(0,0,0,c,250,1,"Game"))
For a=0 To8
ButtonGadget(a,70*a%3,70*(a/3),50,50,z.s)
SetGadgetFont(a,LoadFont(a,z,24))
Next
TextGadget(9,0,c,c,20,"O"+s,1)
c/2
ButtonGadget(c,0,220,c,30,"New")
ButtonGadget(t,c,220,c,30,"End")
SetGadgetFont(9,LoadFont(9,z,12))
l:
If WaitWindowEvent()=13100
O=EventwParam()
If O=t
End
ElseIf O=c
For a=0 To9
T(a)=S(a,z)
DisableGadget(a,0)
Next
p=0
Else
If T(O)=0
T(O)=p+1
h.s=Chr(t+p*9)
p!1
S(9,Chr(t+p*9)+s)
For i=DisableGadget(O,1) To2
x=i*3
If (T(x)&T(x+1)&T(x+2))|(T(i)&T(i+3)&T(i+6))|(T(S(O,h))&T(4)&T(8))|(T(2)&T(4)&T(6))
For a=S(9,h+" wins") To8
DisableGadget(a,1)
Next
EndIf
Next
EndIf
EndIf
EndIf
Goto l
Falsch zugeordnetes Zitat des Tages: "O'zapft is" - Edward Snowden 

- NicTheQuick
- Ein Admin
- Beiträge: 8807
- Registriert: 29.08.2004 20:20
- Computerausstattung: Ryzen 7 5800X, 64 GB DDR4-3200
Ubuntu 24.04.2 LTS
GeForce RTX 3080 Ti - Wohnort: Saarbrücken
Ich bin immer noch der Meinung, dass das hier auch gültig ist. Die
PureGolf-Regeln verbieten nicht das verbraten der CPU.
699!
PureGolf-Regeln verbieten nicht das verbraten der CPU.
699!
Code: Alles auswählen
Procedure S(k,s.s)
SetGadgetText(k,s)
EndProcedure
Dim T(9)
s.s="'s turn"
t=79
c=190
CreateGadgetList(OpenWindow(0,0,0,c,250,1,"Game"))
For a=0 To8
ButtonGadget(a,70*a%3,70*(a/3),50,50,z.s)
SetGadgetFont(a,LoadFont(a,z,24))
Next
TextGadget(9,0,c,c,20,"O"+s,1)
c/2
ButtonGadget(c,0,220,c,30,"New")
ButtonGadget(t,c,220,c,30,"End")
SetGadgetFont(9,LoadFont(9,z,12))
l:
If WindowEvent()=13100
O=EventwParam()
If O=t
End
ElseIf O=c
For a=0 To9
T(a)=S(a,z)
DisableGadget(a,0)
Next
P=0
Else
If T(O)=0
T(O)=P+1
h.s=Chr(t+P*9)
P!1
S(9,Chr(t+P*9)+s)
For i=DisableGadget(O,1) To2
x=i*3
If (T(x)&T(x+1)&T(x+2))|(T(i)&T(i+3)&T(i+6))|(T(S(O,h))&T(4)&T(8))|(T(2)&T(4)&T(6))
For a=S(9,h+" wins") To8
DisableGadget(a,1)
Next
EndIf
Next
EndIf
EndIf
EndIf
Goto l