schreib End statt Break, sind immerhin zwei zeichen weniger.
c ya,
nco2k
Code: Alles auswählen
Dim T(8)
s.s=" ist dran"
l=OpenWindow(0,216,0,190,260,$CC<<16,"TicTacToe") 
If l And CreateGadgetList(l) 
  For a=0 To 8 
    ButtonGadget(a,10+60*a%3,10+60*(a/3),50,50,"") 
    SetGadgetFont(a,LoadFont(a,"Arial",24)) 
  Next 
  ButtonGadget(9,10,220,80,30,"Neues Spiel") 
  ButtonGadget(10,100,220,80,30,"Spiel Beenden") 
  TextGadget(11,10,190,170,20,"O"+s,1) 
  SetGadgetFont(11,LoadFont(9,"Arial",12))
  Repeat 
    w=WindowEvent()
    If w=16
      End
    EndIf
    If w=13100
      O=EventGadgetID() 
      If O=10 
        Break 
      ElseIf O=9 
        For a=0 To 8 
          T(a)=0 
          SetGadgetText(a,"") 
          DisableGadget(a,0) 
        Next 
        P=0 
      Else 
        If T(O)=0 
          T(O)=P+1 
          DisableGadget(O,1) 
          SetGadgetText(O,Chr(79+P*9)) 
          SetGadgetText(11,Chr(79+P!1*9)+s) 
          j=P+1 
          For i=0 To 2 
            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 
              SetGadgetText(11,Chr(79+P*9)+" gewinnt") 
              For a=0 To 8 
                DisableGadget(a,1) 
              Next 
            EndIf 
          Next 
          P!1 
        EndIf 
      EndIf 
    EndIf
  ForEver 
EndIf 
Code: Alles auswählen
Dim T(8)
s.s=" ist dran"
l=OpenWindow(0,216,0,190,260,$CC<<16,"TicTacToe")
If l And CreateGadgetList(l)
  For a=0 To 8
    ButtonGadget(a,10+60*a%3,10+60*(a/3),50,50,"")
    SetGadgetFont(a,LoadFont(a,"Arial",24))
  Next
  ButtonGadget(9,10,220,80,30,"Neues Spiel")
  ButtonGadget(10,100,220,80,30,"Spiel Beenden")
  TextGadget(11,10,190,170,20,"O"+s,1)
  SetGadgetFont(11,LoadFont(9,"Arial",12))
  Repeat
    w=WindowEvent()
    If w=13100
      O=EventGadgetID()
      If O=10
        End
      ElseIf O=9
        For a=0 To 8
          T(a)=0
          SetGadgetText(a,"")
          DisableGadget(a,0)
        Next
        P=0
      Else
        If T(O)=0
          T(O)=P+1
          DisableGadget(O,1)
          SetGadgetText(O,Chr(79+P*9))
          SetGadgetText(11,Chr(79+P!1*9)+s)
          j=P+1
          For i=0 To 2
            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
              SetGadgetText(11,Chr(79+P*9)+" gewinnt")
              For a=0 To 8
                DisableGadget(a,1)
              Next
            EndIf
          Next
          P!1
        EndIf
      EndIf
    EndIf
  Until w=16
EndIfCode: Alles auswählen
Dim T(8)
s.s=" ist dran"
l=OpenWindow(0,216,0,190,260,$CC<<16,"TicTacToe")
If l And CreateGadgetList(l)
  For a=0 To8
    ButtonGadget(a,10+60*a%3,10+60*(a/3),50,50,"")
    SetGadgetFont(a,LoadFont(a,"Arial",24))
  Next
  ButtonGadget(11,10,220,80,30,"Neues Spiel")
  ButtonGadget(10,100,220,80,30,"Spiel Beenden")
  TextGadget(9,10,190,170,20,"O"+s,1)
  SetGadgetFont(9,LoadFont(9,"Arial",12))
  Repeat
    w=WindowEvent()
    If w=13100
      O=EventGadgetID()
      If O=10
        End
      ElseIf O=11
        For a=0 To9
          T(a)=0
          SetGadgetText(a,"")
          DisableGadget(a,0)
        Next
        P=0
      Else
        If T(O)=0
          T(O)=P+1
          DisableGadget(O,1)
          SetGadgetText(O,Chr(79+P*9))
          SetGadgetText(9,Chr(79+P!1*9)+s)
          j=P+1
          For i=0 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
              SetGadgetText(9,Chr(79+P*9)+" gewinnt")
              For a=0 To 8
                DisableGadget(a,1)
              Next
            EndIf
          Next
          P!1
        EndIf
      EndIf
    EndIf
  Until w=16
EndIfCode: Alles auswählen
Dim T(8)
s.s=" ist dran"
l=OpenWindow(0,216,0,190,260,$CC<<16,"TicTacToe")
If l And CreateGadgetList(l)
  For a=0 To 8
    ButtonGadget(a,10+60*a%3,10+60*(a/3),50,50,"")
    SetGadgetFont(a,LoadFont(a,"Arial",24))
  Next
  ButtonGadget(9,10,220,80,30,"Neues Spiel")
  ButtonGadget(10,100,220,80,30,"Spiel Beenden")
  TextGadget(11,10,190,170,20,"O"+s,1)
  SetGadgetFont(11,LoadFont(9,"Arial",12))
  Repeat
    w=WindowEvent()
    If w=13100
      O=EventwParam()
      If O=10
        End
      ElseIf O=9
        For a=0 To 8
          T(a)=0
          SetGadgetText(a,"")
          DisableGadget(a,0)
        Next
        P=0
      Else
        If T(O)=0
          T(O)=P+1
          DisableGadget(O,1)
          SetGadgetText(O,Chr(79+P*9))
          SetGadgetText(11,Chr(79+P!1*9)+s)
          j=P+1
          For i=0 To 2
            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
              SetGadgetText(11,Chr(79+P*9)+" gewinnt")
              For a=0 To 8
                DisableGadget(a,1)
              Next
            EndIf
          Next
          P!1
        EndIf
      EndIf
    EndIf
  Until w=16
EndIf
Code: Alles auswählen
Dim T(8) 
s.s=" ist dran" 
l=OpenWindow(0,216,0,190,260,$CC<<16,"TicTacToe") 
If l And CreateGadgetList(l) 
  For a=0 To8 
    ButtonGadget(a,10+60*a%3,10+60*(a/3),50,50,"") 
    SetGadgetFont(a,LoadFont(a,"Arial",24)) 
  Next 
  ButtonGadget(11,10,220,80,30,"Neues Spiel") 
  ButtonGadget(10,100,220,80,30,"Spiel Beenden") 
  TextGadget(9,10,190,170,20,"O"+s,1) 
  SetGadgetFont(9,LoadFont(9,"Arial",12)) 
  Repeat 
    w=WindowEvent() 
    If w=13100 
      O=EventwParam() 
      If O=10 
        End 
      ElseIf O=11 
        For a=0 To9 
          T(a)=0 
          SetGadgetText(a,"") 
          DisableGadget(a,0) 
        Next 
        P=0 
      Else 
        If T(O)=0 
          T(O)=P+1 
          DisableGadget(O,1) 
          SetGadgetText(O,Chr(79+P*9)) 
          SetGadgetText(9,Chr(79+P!1*9)+s) 
          j=P+1 
          For i=0 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 
              SetGadgetText(9,Chr(79+P*9)+" gewinnt") 
              For a=0 To 8 
                DisableGadget(a,1) 
              Next 
            EndIf 
          Next 
          P!1 
        EndIf 
      EndIf 
    EndIf 
  Until w=16 
EndIf
Code: Alles auswählen
Dim T(8) 
k=10
s.s=" ist dran" 
l=OpenWindow(0,216,0,190,260,$CC<<16,"TicTacToe") 
If l And CreateGadgetList(l) 
  For a=0 To8 
    ButtonGadget(a,k+60*a%3,k+60*(a/3),50,50,"") 
    SetGadgetFont(a,LoadFont(a,"Arial",24)) 
  Next 
  ButtonGadget(11,k,220,80,30,"Neues Spiel") 
  ButtonGadget(k,100,220,80,30,"Spiel Beenden") 
  TextGadget(9,k,190,170,20,"O"+s,1) 
  SetGadgetFont(9,LoadFont(9,"Arial",12)) 
  Repeat 
    w=WindowEvent() 
    If w=13100 
      O=EventwParam() 
      If O=10 
        End 
      ElseIf O=11 
        For a=0 To9 
          T(a)=0 
          SetGadgetText(a,"") 
          DisableGadget(a,0) 
        Next 
        P=0 
      Else 
        If T(O)=0 
          T(O)=P+1 
          DisableGadget(O,1) 
          SetGadgetText(O,Chr(79+P*9)) 
          SetGadgetText(9,Chr(79+P!1*9)+s) 
          j=P+1 
          For i=0 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 
              SetGadgetText(9,Chr(79+P*9)+" gewinnt") 
              For a=0 To 8 
                DisableGadget(a,1) 
              Next 
            EndIf 
          Next 
          P!1 
        EndIf 
      EndIf 
    EndIf 
  Until w=16 
EndIf
Code: Alles auswählen
Dim T(8)
s.s=" ist dran"
k=10
l=OpenWindow(0,216,0,190,260,$CC<<16,"TicTacToe")
If l And CreateGadgetList(l)
  For a=0 To8
    ButtonGadget(a,k+60*a%3,k+60*(a/3),50,50,"")
    SetGadgetFont(a,LoadFont(a,"",24))
  Next
  ButtonGadget(11,k,220,80,30,"Neues Spiel")
  ButtonGadget(k,100,220,80,30,"Spiel Beenden")
  TextGadget(9,k,190,170,20,"O"+s,1)
  SetGadgetFont(9,LoadFont(9,"",12))
  Repeat
    w=WindowEvent()
    If w=13100
      O=EventwParam()
      If O=k
        End
      ElseIf O=11
        For a=0 To9
          T(a)=0
          SetGadgetText(a,"")
          DisableGadget(a,0)
        Next
        P=0
      Else
        If T(O)=0
          T(O)=P+1
          DisableGadget(O,1)
          SetGadgetText(O,Chr(79+P*9))
          SetGadgetText(9,Chr(79+P!1*9)+s)
          j=P+1
          For i=0 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
              SetGadgetText(9,Chr(79+P*9)+" gewinnt")
              For a=0 To 8
                DisableGadget(a,1)
              Next
            EndIf
          Next
          P!1
        EndIf
      EndIf
    EndIf
  Until w=16
EndIfCode: Alles auswählen
Dim T(8) 
s.s=" ist dran" 
k=10 
l=OpenWindow(0,216,0,190,260,$CC<<16,"TicTacToe") 
If l And CreateGadgetList(l) 
  For a=0 To8 
    ButtonGadget(a,k+60*a%3,k+60*(a/3),50,50,"") 
    SetGadgetFont(a,LoadFont(a,"",24)) 
  Next 
  ButtonGadget(11,k,220,80,30,"Neues Spiel") 
  ButtonGadget(k,100,220,80,30,"Spiel Beenden") 
  TextGadget(9,k,190,170,20,"O"+s,1) 
  SetGadgetFont(9,LoadFont(9,"",12)) 
  Repeat 
    w=WindowEvent() 
    If w=13100 
      O=EventwParam() 
      If O=k 
        End 
      ElseIf O=11 
        For a=0 To9 
          T(a)=0 
          SetGadgetText(a,"") 
          DisableGadget(a,0) 
        Next 
        P=0 
      Else 
        If T(O)=0 
          T(O)=P+1 
          DisableGadget(O,1) 
          SetGadgetText(O,Chr(79+P*9)) 
          SetGadgetText(9,Chr(79+P!1*9)+s) 
          j=P+1 
          For i=0 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 
              SetGadgetText(9,Chr(79+P*9)+" gewinnt") 
              For a=0 To8 
                DisableGadget(a,1) 
              Next 
            EndIf 
          Next 
          P!1 
        EndIf 
      EndIf 
    EndIf 
  Until w=16 
EndIf