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

2E~F
{™1,™1,™1,0,1,1,1,0}List 2
{™1,0,1,1,1,0,™1,™1}List 3
{0,0,0,0,0,0,0,0}List 1
Identity 10Mat A
Fill(0,Mat A
™1Mat A[5,5]
™1Mat A[6,6]
1Mat A[5,6]
1Mat A[6,5]
AxesOff
ViewWindow ™8.8,9.2,1,0.2,9,1
Text 3,20,"OTHELLO"
For 0A To 0.95 Step 0.14
F-Line ™6,2.3™A,™2.4,2.3™A
F-Line ™7.4,1.2™A,™0.8,1.2™A
Next
Orange Text 49,22,"BABOUD"
Orange Text 57,12,"PRODUCTIONS"
For 1A To 9
F-Line 1,A,9,A
F-Line A,1,A,9
Next
For 4A To 5
For 4B To 5
For B‰0.3Z To B‰0.8 Step 0.15
If Mat A[B‰1,A‰1]=™1
Then Green F-Line A‰0.3,Z,A‰0.8,Z
Else Orange F-Line A‰0.3,Z,A‰0.8,Z
IfEnd
Next
Next:Next
1G~N
F-Line N‰0.5,0.3,N‰0.5,0.8
F-Line 0.3,M‰0.5,0.8,M‰0.5
1P
Green Text 20,15,"PLAYER 1:"
Orange Text 30,15,"PLAYER 2:"
0L
Lbl 1
Text 20,8," "
Text 30,8," "
Text 20,55,E
Text 30,55,F
Text 25™5P,8,""
Do
If G(58™7M)
Then Text G,65," "
F-Line 0.3,M‰0.5,0.8,M‰0.5
Else Text 58,H," "
F-Line N‰0.5,0.3,N‰0.5,0.8
IfEnd
Do:GetkeyK
LpWhile K=0
58™7MG:7N‰65H
K=27N<8N‰1N
K=28M<8M‰1M
K=37M>1M™1M
K=38N>1N™1N
LpWhile K31 And K79
If K=31 And Mat A[M‰1,N‰1]=0
Then 0O
Text 57,3,"#"
F-Line 2,2,2,3
For 1A To 8
0Z
List 2[A]U
List 3[A]V
While Mat A[M‰1‰U(Z‰1),N‰1‰V(Z‰1)]=P
Z‰1Z
WhileEnd
Mat A[M‰1‰U(Z‰1),N‰1‰V(Z‰1)]‡P0Z
ZList 1[A]
Z01O
Next
If O=1
Then ™PP
0L
0D
For M‰0.3A To M‰0.8 Step 0.15
P=™1Green F-Line N‰0.3,A,N‰0.8,A
P=1Orange F-Line N‰0.3,A,N‰0.8,A
Next
PMat A[M‰1,N‰1]
For 1T To 8
List 1[T]Z
List 2[T]A
List 3[T]B
If Z0
Then MU:NV
For 1W To Z
D‰1D
U‰AU:V‰BV
PMat A[U‰1,V‰1]
Orange Text 58™7U,7V‰65," "
For U‰0.3C To U‰0.8 Step 0.15
P=™1Green F-Line V‰0.3,C,V‰0.8,C
P=1Orange F-Line V‰0.3,C,V‰0.8,C
Next
Next
IfEnd
Next
If P=™1
Then D‰E‰1E:F™DF
Else D‰F‰1F:E™DE
IfEnd
IfEnd
Text 57,3," "
IfEnd
If K=79
Then ™PP
L‰1L
IfEnd
L2 And (E‰F)64Goto 1
ClrText
E>F"THE PLAYER 1 WINS"
F>E"THE PLAYER 2 MINS"
E=F"DRAW GAME"