User Tools

Site Tools


en:othello_ingles

OTHELLO

Info

Author Richard Hopkins
Computer Amstrad PCW 8256 / 8512 / 9512
Year 1990
Gender Board
Controls Keyboard
Languages English
State Preserved

Screenshots

Description

It is an ancient game of logic and strategy known by the names of Othello or Reversi. This is a pretty strong game.

The rules: The playing area of the board consists of an eight by eight grid on which the pieces are placed. These are black on one side and white on the other.

The idea is to either remove the opponent's checkers, in which case the game ends at that point, or continue playing until the board is full and then decide who has won by simply counting how many checkers each has.

To win chips from your opponent you must enclose them among yours. Once this is done, the encased tiles are turned over, so that they show your color.

Listing

  • Listing - OTHELLOE.BAS
10 e$=CHR$(27):rv$=e$+"p":nv$=e$+"q"
20 cl$=e$+"E"+e$+"H":on$=e$+"e":of$=e$+"f":PRINT of$
30 DEF FNat$(x,y)=CHR$(27)+"Y"+CHR$(31+x)+CHR$(31+y)
40 DIM a(7,7):RESTORE 720:GOSUB 720
50 INPUT "Enter level 1-25 (1=hard) ";lev
60 IF lev>25 OR lev<1 THEN 50
70 GOSUB 90:GOSUB 430
80 t=1:GOSUB 190:t=-1:GOSUB 390:GOTO 80
90 a(3,3)=50:a(3,4)=-50:a(4,3)=-50:a(4,4)=50
100 FOR n=2 TO 5:a(0,n)=5:a(n,0)=5:a(7,n)=5:a(n,7)=5:NEXT 
110 FOR n=6 TO 7
120 a(n-6,7-n)=-5:a(n-6,n)=-5:a(n,n-6)=-5:a(n,ABS(n-13))=-5:NEXT
130 RESTORE 160
140 FOR n=1 TO 3
150 READ x,y,z:a(x,y)=z:a(y,x)=z:a(x,x)=z:a(y,y)=z:NEXT
160 DATA 0,7,20,1,6,-10,2,5,10
170 FOR n=3 TO 4
180 a(n,2)=5:a(2,n)=5:a(5,n)=5:a(n,5)=5:NEXT:RETURN
190 di=0:su=1
200 PRINT FNat$(28,5);CHR$(7);
210 INPUT "Enter your move "; i:i=i-11
220 IF i>77 OR i<0 THEN GOTO 200
230 x=INT(i/10):y=i-(x*10)
240 IF ABS(a(x,y))=50 THEN GOTO 200
250 FOR f=-1 TO 1: FOR n=-1 TO 1
260 IF x+f>7 OR x+f<0 OR y+n>7 OR y+n<0 THEN GOTO 280
270 IF a(x+f,y+n)=50*t THEN GOSUB 320
280 NEXT: NEXT
290 IF su=1 AND di=0 THEN GOTO 200
300 IF su=2 AND di=1 AND sc>hsc THEN xsc=x:ysc=y:hsc=sc
310 RETURN
320 x1=x:y1=y:x1=x1+(f*2):y1=y1+(n*2)
330 IF x1>7 OR x1<0 OR y1>7 OR y1<0 THEN RETURN
340 IF ABS(a(x1,y1))<>50 THEN RETURN
350 IF a(x1,y1)<>50*-t THEN x1=x1+f:y1=y1+n:IF su=2 THEN sc=sc+lev:GOTO 330 ELSE 330
360 IF su=1 THEN a(x1,y1)=-50:GOSUB 680:di=1:IF x1=x AND y1=y THEN RETURN ELSE x1=x1-f:y1=y1-n:GOTO 360
370 IF su=2 THEN di=1:RETURN
380 IF su=3 THEN a(x1,y1)=50:GOSUB 640:IF x1=x AND y1=y THEN RETURN ELSE x1=x1-f:y1=y1-n:GOTO 380
390 xsc=0:ysc=0:hsc=-100
400 FOR x=0 TO 7: FOR y=0 TO 7:di=0:sc=a(x,y)
410 IF ABS(a(x,y))<>50 THEN su=2:GOSUB 250
420 NEXT:NEXT:x=xsc:y=ysc:su=3:GOTO 250
430 OUT 248,8:PRINT cl$
440 PRINT FNat$(1,0);CHR$(134);STRING$(39,138);CHR$(140)
450 PRINT FNat$(25,0);CHR$(131);STRING$(39,138);CHR$(137)
460 FOR f=6 TO 38 STEP 5
470 PRINT FNat$(1,f);CHR$(132)
480 PRINT FNat$(25,f);CHR$(129)
490 NEXT
500 FOR n=2 TO 24
510 PRINT FNat$(n,0);CHR$(133)
520 PRINT FNat$(n,41);CHR$(133)
530 FOR f=6 TO 38 STEP 5: PRINT FNat$(n,f);CHR$(149):NEXT
540 NEXT
550 FOR n=4 TO 22 STEP 3
560 PRINT FNat$(n,0);CHR$(130);STRING$(39,154);CHR$(136)
570 FOR f=6 TO 38 STEP 5:PRINT FNat$(n,f);CHR$(159):NEXT
580 NEXT
590 FOR n=1 TO 8
600 PRINT FNat$(n*3-1,42);n:PRINT FNat$(26,n*5-3);n
610 NEXT:OUT 248,7
620 x1=3:y1=3:GOSUB 640:y1=4:GOSUB 680:x1=4
630 GOSUB 640:y1=3:GOSUB 680:RETURN
640 PRINT FNat$(2+(x1*3),2+(y1*5));
650 PRINT CHR$(166);rv$;"  ";nv$;CHR$(167)
660 PRINT FNat$(3+(x1*3),2+(y1*5));
670 PRINT CHR$(169);rv$;"  ";nv$;CHR$(168):RETURN
680 PRINT FNat$(2+(x1*3),2+(y1*5));CHR$(160);
690 PRINT CHR$(162);CHR$(162);CHR$(161)
700 PRINT FNat$(3+(x1*3),2+(y1*5));CHR$(165);
710 PRINT CHR$(163);CHR$(163);CHR$(164):RETURN 
720 MEMORY &HBFFE
730 FOR hex=&HC070 TO &HC098: READ pk: POKE hex,pk: NEXT hex
740 DATA 243,62,129,211,241,62,130,211
750 DATA 242,175,95,103,22,184,58,153,192,111,41,41
760 DATA 41,25,17,154,192,235,1,8,0,237,176,62,133
770 DATA 211,241,62,134,211,242,251,201
780 FOR char=160 TO 169: POKE &HC099,char
790 FOR row=1 TO 8
800 READ binary(row):POKE &HC099+row, (binary(row)):NEXT row
810 cl=&HC070: CALL cl: NEXT char:RETURN
820 DATA 0,7,24,32,64,128,128,128,0,224,24,4,2,1,1,1
830 DATA 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255
840 DATA 1,1,1,2,4,24,224,0,128,128,128,64,32,24,7,0
850 DATA 0,7,31,63,127,255,255,255
860 DATA 0,224,248,252,254,255,255,255
870 DATA 255,255,255,254,252,248,224,0
880 DATA 255,255,255,127,63,31,7,0

Controls

       With PCW keyboard

Loading the program

 1.- Insert the CP/M disc on side 2
 2.- Write BASIC and wait for it to load
 3.- Remove the CP/M disk and insert the disk containing the Othello game
 4.- Type run "OTHELLOE" and press the "ENTER" key

Extras

  • Listing of the program in a magazine of great circulation of the time

othello_en_programa_01.jpg othello_en_programa_02.jpg othello_en_programa_03.jpg

Download

  • Othello(game in dsk format, compressed with zip)
en/othello_ingles.txt · Last modified: 2022/06/30 14:43 by jevicac