Code
Lbl 3
1[sto]Z
3[sto]X
3[sto]Y
DelVar KDelVar WDelVar JDelVar A
1[sto]L
EffListe L[sto]1;
12[sto]dim(L[sto]1;
EffÉcran
For(T,1,15
Output(3,T,"-
Output(6,T,"-
End
For(T,1,8
Output(T,4,"I
Output(T,8,"I
Output(T,12,"I
End
Output(3,4,"+
Output(3,8,"+
Output(3,12,"+
Output(6,4,"+
Output(6,8,"+
Output(6,12,"+
Output(2,3,"1
Output(2,6,"2
Output(2,10,"3
Output(2,13,"4
Output(4,3,"5
Output(4,6,"6
Output(4,10,"7
Output(4,13,"8
Output(7,3,"9
Output(7,6,"10
Output(7,10,"11
Output(7,13,"12
1[sto]L
Repeat getKey
If L=1
"X"[sto]Chn3
If L=2
"O"[sto]Chn3
L+1[sto]L
If L=3
1[sto]L
getKey[sto]K
K-72[sto]A
If A>9
A-6[sto]A
If A>13
A-6[sto]A
If A>12
Repeat getKey
If A<0
Repeat getKey
End
If K=72 ou K=82 ou K=92
6[sto]X
If K=73 ou K=83 ou K=93
10[sto]X
If K=74 ou K=84 ou K=94
13[sto]X
If K=81 ou K=82 ou K=83 ou K=84
5[sto]Y
If K=91 ou K=92 ou K=93 ou K=94
7[sto]Y
If L[sto]1;(A)=0
Then
L[sto]L[sto]1;(A)
Output(Y,X,Chn3
End
If prod(L[sto]1;
1[sto]J
If L[sto]1;(1)L[sto]1;(2)L[sto]1;(3)=L^3 ou L[sto]1;(1)L[sto]1;(6)L[sto]1;(10)=L^3 ou L[sto]1;(1)L[sto]1;(5)L[sto]1;(9)=L^3 ou L[sto]1;(2)L[sto]1;(3)L[sto]1;(4)=L^3 ou L[sto]1;(2)L[sto]1;(6)L[sto]1;(10)=L^3 ou L[sto]1;(3)L[sto]1;(7)L[sto]1;(11)=L^3 ou L[sto]1;(4)L[sto]1;(8)L[sto]1;(12)=L^3 ou L[sto]1;(5)L[sto]1;(6)L[sto]1;(7)=L^3 ou L[sto]1;(6)L[sto]1;(7)L[sto]1;(8)=L^3 ou L[sto]1;(9)L[sto]1;(10)L[sto]1;(11)=L^3 ou L[sto]1;(10)L[sto]1;(11)L[sto]1;(12)=L^3 ou L[sto]1;(2)L[sto]1;(7)L[sto]1;(12)=L^3 ou L[sto]1;(4)L[sto]1;(7)L[sto]1;(10)=L^3 ou L[sto]1;(3)L[sto]1;(6)L[sto]1;(9)=L^3
1[sto]W
If W
Then
EffÉcran
Output(2,2,"FELICITATIONS
If L=1
Output(4,4,"JOUEUR 1
If L=2
Then
Output(4,4,"JOUEUR 2
2[sto]Z
End
Goto 1
If J
Output(4,2,"MATCH NUL
Lbl 1
Pause
Menu("REJOUER ?","OUI",3,"NON",2
Lbl 2
Stop