+-------------------------------------------------------+
|
4InARow by Lionel Baboud                              |
| casio site: http://perso.wanadoo.fr/duobab/index.htm  |
| e-mail: roland.baboud@wanadoo.fr                      |
+-------------------------------------------------------+

1P
Identity 9Mat A
Fill(0,Mat A
{™1,1,1,1,0,™1,™1}List 1
{1,1,0,™1,™1,™1,0}List 2
{0,0,0,0,0,0,0}List 3
ClrGraph
AxesOff
ViewWindow 0.5,14.5,1,0.9,7.8,1
'
Text 48,88,"BABOUD"
Text 54,80,"PRODUCTION"
F-Line 9.2,2.9,13.8,2.9
F-Line 14.1,2.7,14.1,1.2
F-Line 13.8,1,9.2,1
F-Line 8.9,1.2,8.9,2.7
F-Line 9,2.8,9.2,2.7
F-Line 13.9,2.8,13.8,2.7
F-Line 13.9,1.1,13.8,1.2
F-Line 9,1.1,9.2,1.2
'†
Orange F-Line 9.2,2.8,13.8,2.8
Orange F-Line 13.9,2.7,13.9,1.2
Orange F-Line 13.8,1.1,9.2,1.1
Orange F-Line 9,1.2,9,2.7
Green Text 5,76,"PUISSANCE 4"
Orange F-Line 8.6,7.6,13.9,7.6
Orange F-Line 13.9,7.6,13.9,6.7
Orange F-Line 13.9,6.7,8.6,6.7
Orange F-Line 8.6,6.7,8.6,7.6
F-Line 14,7.5,14,6.6
F-Line 14,6.6,8.7,6.6
For 1A To 7
Green F-Line 1,A,8,A
Next
For 1A To 8
Green F-Line A,1,A,7
Next
F-Line 8.2,6.9,8.2,0.9
F-Line 8.2,0.9,1.2,0.9
4A
9G
Orange Text 20,85,"JOUEUR 1"
Text 30,85,"JOUEUR 2"
Do
Green Text 25‰5P,78," "
Green Text 25™5P,78,""
Do
Green Text 1,9," "
Green F-Line A‰0.5,7.8,A‰0.5,7.2
Green F-Line A‰0.4,7.3,A‰0.6,7.3
Do:GetkeyK
LpWhile K=0
K=27A‰1A
K=38A™1A
A=81A
A=07A
LpWhile K31
Mat A[9,A]B
If B<6
Then Text 37,120,"#"
1‰BMat A[9,A]
PMat A[B‰2,A‰1]
If P=™1
Then F-Line A‰0.4,B‰1.2,A‰0.7,B‰1.2
F-Line A‰0.3,B‰1.3,A‰0.8,B‰1.3
F-Line A‰0.3,B‰1.5,A‰0.8,B‰1.5
F-Line A‰0.3,B‰1.6,A‰0.8,B‰1.6
F-Line A‰0.3,B‰1.7,A‰0.8,B‰1.7
F-Line A‰0.4,B‰1.8,A‰0.7,B‰1.8
Else Orange F-Line A‰0.4,B‰1.2,A‰0.7,B‰1.2
Orange F-Line A‰0.3,B‰1.3,A‰0.8,B‰1.3
Orange F-Line A‰0.3,B‰1.5,A‰0.8,B‰1.5
Orange F-Line A‰0.3,B‰1.6,A‰0.8,B‰1.6
Orange F-Line A‰0.3,B‰1.7,A‰0.8,B‰1.7
Orange F-Line A‰0.4,B‰1.8,A‰0.7,B‰1.8
IfEnd
'Text 57,120,"#"
PlotOn 1,1
For 1C To 7
List 1[C]M
List 2[C]N
0Z
While Mat A[B‰2‰N(Z‰1),A‰M(Z‰1)‰1]=P
Z‰1Z
WhileEnd
ZList 3[C]
Next
0O
(List 3[1]‰List 3[4])3 Or (List 3[2]‰List 3[6])3 Or (List 3[3]‰List 3[7])3 Or (List 3[5])31O
Text 37,120," "
™PP
IfEnd
LpWhile O1
ClrList
Green Text 1,9," "
Green Text 25‰5P,78," "
Orange Text 20,85," "
Text 30,85," "
P=™1Orange Text 20,77,"LE JOUEUR 1"
P=1Text 20,77,"LE JOUEUR 2"
For 123A To 83 Step ™5
Green Text 28,A,"A GAGNE "
Next
Green PlotOn 1,1