Lbl 0
ViewWindow 1, 127, 0, 1, 63, 0
ClrText
Cls
0->A~Z
Locate 6, 4, "PUISSANCE 4"_
[[0, 0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0, 0]]->Mat A
[[0, 0, 0, 0, 0, 0, 0]]->Mat B
For 17->X To 108 Step 13
Plot X, 3:Plot X, 61
Line
Next
For 2->Y To 62 Step 10
Plot 18, Y:Plot 107, Y
Line
Next
Lbl 3
If Z = 43
Then Locate 6, 4, "MATCH NUL"_
Goto 0
IfEnd
Isz T
T = 3 => 1->T
T = 1 => 118->X
T = 2 => 8->X
PlotOff X, 56
PlotOff X, 57
PlotOff X, 58
PlotOff X + 1, Y
PlotOff X, 57
PlotOff X, 56
PlotOff X + 1, Y
PlotOff X, 57
PlotOff X, 58
If T = 1
Then Plot 8, 56
Plot 10, Y
Orange Line
Plot X, 57
Plot 8, Y
Orange Line
Plot X, 58
Plot 10, Y
Orange Line
1->G
Else Green Plot 120, 56
Green Plot 118, Y
Green Line
Green Plot X, 57
Green Plot 118, Y
Green Line
Green Plot X, 58
Green Plot 120, Y
Green Line
5->G
IfEnd
Lbl 2
Do
GetKey->C
LpWhile C = 0
C = 72 => 1->C
C = 62 => 2->C
C = 52 => 3->C
C = 73 => 4->C
C = 63 => 5->C
C = 53 => 6->C
C = 74 => 7->C
If C > 7 Or C < 1
Then Goto 2
IfEnd
Mat B[1, C] + 1->Mat B[1, C]
Mat B[1, C]->A
13C + 7->D
10A->E
E >= 62 => Goto 2
If T = 1
Then Plot D + 1, E - 6
Plot D + 6, Y
Orange Line
Plot D + 1, E
Plot D + 6, E
Orange Line
For 1->F To 5
Plot D, E - F
Plot D + 7, Y
Orange Line
Next
Else Green Plot D + 1, E - 6
Green Plot D + 6, Y
Green Line
Green Plot D + 1, E
Green Plot D + 6, E
Green Line
For 1->F To 5
Green Plot D, E - F
Green Plot D + 7, Y
Green Line
Next
IfEnd
G->Mat A[A, C]
[[0, 0, 0, 0, 0, 0, 0, 0]]->Mat C
1->O
1->V
0->W
Lbl 5
C + V > 0 => C + V < 8 => A + W > 0 => A + W < 7 => Goto 6
Goto 7
Lbl 6
Mat A[A + W, C + V
Ans = 0 Or Ans = 5 And T = 1 Or Ans = 1 And T = 2 => Goto 7
Ans = 1 And T = 1 Or Ans = 5 And T = 2 => Mat C[1, O] + 1->Mat C[1, O]
V < 0 => Dsz V
V > 0 => Isz V
W < 0 => Dsz W
W > 0 => Isz W
Goto 5
Lbl 7
Isz O
0->V~W
O = 2 Or O = 8 => 1->V
O = 6 Or O = 7 Or O = 8 => 1->W
O = 2 Or O = 3 Or O = 4 => (-)1->W
O = 4 Or O = 5 Or O = 6 => (-)1->V
O < 9 => Goto 5
1->Q
5->R
Lbl 8
Mat C[1, Q] + Mat C[1, R]
Ans >= 3 => T = 1 => \pi->P
Ans >= 3 => T = 2 => (-)\pi->P
Isz Q
Isz R
Q < 5 => Goto 8
If Abs P = \pi
Then ClrText
Locate 2, 4, "LE JOUEUR"
P = \pi => Locate 12, 4, "1"
P = (-)\pi => Locate 12, 4, "2"
Locate 14, 4, "A GAGNE"_
Goto 0
IfEnd
Goto 3