User Tools

Site Tools


en:othello_espanol

OTHELLO

Info

Author Angel Zarazaga
Computer Amstrad PCW 8256 / 8512 / 9512
Year 1987
Gender Table
Controls Keyboard
Languages Spanish
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 - OTHELLOS.BAS
10 ' *=================================*
20 ' * EL JUEGO DE 'OTHELLO', TAMBIEN  *
30 ' *    CONOCIDO COMO 'REVERSI'.     *
40 ' *---------------------------------*
50 ' *     (C) Angel Zarazaga y        *
60 ' *          AMSTRAD USER           *
70 ' *            - 1987 -             *
80 ' *=================================*
90 '
100 ' ==================
110 ' PROGRAMA PRINCIPAL
120 ' ==================
130 GOSUB 210:' Inicializa el tablero
140 GOSUB 980:' Eleccion del jugador
150 GOSUB 1660:' Eleccion del ordenador
160 GOTO 140:' Bucle hasta el final del juego
170 '----------------------------------
180 '      INICIALIZA FUNCIONES Y
190 '            VARIABLES
200 '----------------------------------
210 DIM b$(8,8),n$(8),u$(7)
220 esc$=CHR$(27)
230 home$=esc$+"H"
240 cls$=esc$+"E"+home$
250 curon$=esc$+"e"
260 curoff$=esc$+"f"
270 beep$=CHR$(7)
280 fin$="FIN DEL JUEGO, GANA JESUS, ES UN MAQUINA, UN CAMPEON"
290 u$(1)="A1A8H1H8":u$(2)="A3C1F1H3H6F8C8A6"
300 u$(3)="D1E1H4H5E8D8A5A4":u$(4)="C3F3F6C6"
310 u$(5)="D3E3F4F5E6D6C5C4":u$(6)="C2D2E2F2G3G4G5G6F7E7D7C7B6B5B4B3"
320 u$(7)="A2B2B1G1G2H2H7G7G8B8B7A7"
330 DEF FNtab$(col%,fil%,texto$)=esc$+"Y"+CHR$(32+fil%)+CHR$(32+col%)+texto$
340 DEF FNbox$(k1%,k2%,k3%,k4%,k5%,k6%)=esc$+"Y"+CHR$(32+k2%)+CHR$(32+k1%)+CHR$(k3%)+STRING$(k4%,CHR$(k5%))+CHR$(k6%)
350 '----------------------------------
360 '       DIBUJA EL TABLERO
370 '----------------------------------
380 PRINT cls$;curoff$:FOR i%=1 TO 4
390 READ k%:q$(i%)=q$(i%)+CHR$(k%)
400 READ k%,a1%:p$=CHR$(k%)+CHR$(k%)+CHR$(k%)+CHR$(a1%)
410 FOR j%=1 TO 8:q$(i%)=q$(i%)+p$:NEXT j%
420 READ k%,k1%:p$=CHR$(k%)+CHR$(k%)+CHR$(k%)+CHR$(k1%)
430 q$(i%)=q$(i%)+p$:NEXT i%
440 PRINT FNtab$(26,6,q$(1))
450 FOR i%=7 TO 21 STEP 2:PRINT FNtab$(26,i%,q$(2))
460 PRINT FNtab$(26,i%+1,q$(3)):NEXT i%
470 PRINT FNtab$(26,23,q$(2)):PRINT FNtab$(26,24,q$(4))
480 DATA 150,154,158,154,156 
490 DATA 149,32,149,32,149
500 DATA 151,154,159,154,157
510 DATA 147,154,155,154,153
520 '-----------------------------------
530 '   NUMERA LOS EJES DEL TABLERO
540 '-----------------------------------
550 r$="ABCDEFGH-":c$="12345678 "
560 FOR i%=1 TO 9:PRINT FNtab$(24+(i%*4),7,MID$(r$,i%,1))
570 PRINT FNtab$(60,7+(i%*2),MID$(c$,i%,1)):NEXT i%
580 ' ---------------------------------
590 '      DIBUJA LOS MARCADORES
600 ' ---------------------------------
610 FOR i%=1 TO 23:READ k1%,k2%,k3%,k4%,k5%,k6%
620 PRINT FNbox$(k1%,k2%,k3%,k4%,k5%,k6%):NEXT i%
630 FOR i%=1 TO 7:READ col%,fil%,texto$
640 PRINT FNtab$(col%,fil%,texto$):NEXT i%
650 DATA 26,0,150,35,154,156,26,1,149,35,32,149,26,2,151,35,154,157
660 DATA 26,3,149,35,32,149,26,4,149,35,32,149,26,5,147,35,154,153
670 DATA 0,0,150,22,154,156,0,1,149,22,32,149,0,2,147,22,154,153
680 DATA 0,3,150,22,154,156,0,4,149,22,32,149,0,5,147,22,154,153
690 DATA 65,0,150,22,154,156,65,1,149,22,32,149,65,2,147,22,154,153
700 DATA 65,3,150,22,154,156,65,4,149,22,32,149,65,5,147,22,154,153
710 DATA 12,25,150,64,154,156,12,26,149,64,32,149,12,27,151,64,154,157
720 DATA 12,28,149,64,32,149,12,29,147,64,154,153
730 DATA 28,1,"* * * *   O T H E L L O   * * * *"
740 DATA 28,3,"programado para AMSTRAD USER por"
750 DATA 28,4,"         Angel Zarazaga           "
760 DATA 2,1,"Puntos jugador:",67,1,"Puntos ordenador:"
770 DATA 2,4,"¼ ¼ ¼ ¼      ¼ ¼ ¼ ¼",67,4,"» » » »      » » » »"
780 '----------------------------------
790 '      ]NIVEL DE DIFICULTAD?
800 '----------------------------------
810 PRINT FNtab$(14,26,STRING$(60," "))
820 PRINT FNtab$(14,26,curon$+beep$+"Nivel del juego (1:novato - 2:avanzado - 3:maestro)...");
830 LINE INPUT nivel$:nivel=VAL(nivel$):PRINT curoff$;
840 IF nivel<1 OR nivel>3 THEN 810
850 FOR i%=1 TO 8:FOR j%=1 TO 8:b$(i%,j%)=" ":NEXT j%:NEXT i%
860 IF nivel=1 THEN b$(1,1)="¼":b$(8,1)="¼":b$(1,8)="¼":b$(8,8)="¼"
870 IF nivel=3 THEN b$(1,1)="»":b$(8,1)="»":b$(1,8)="»":b$(8,8)="»"
880 b$(4,4)="¼":b$(5,4)="»":b$(4,5)="»":b$(5,5)="¼":GOSUB 1190
890 '-----------------------------------
900 ' DIBUJA LAS FICHAS EN EL TABLERO
910 '-----------------------------------
920 FOR i%=1 TO 8:FOR j%=1 TO 8
930 PRINT FNtab$((j%*4)+24,(i%*2)+7,b$(j%,i%));
940 NEXT j%:NEXT i%:RETURN
950 '-----------------------------------
960 '   MOVIMIENTO DEL JUGADOR HUMANO
970 '-----------------------------------
980 PRINT FNtab$(14,26,STRING$(60," "))
990 PRINT FNtab$(14,26,beep$+curon$+"Tu mueves (p.e. e3, f4, c5, etc.)...");:LINE INPUT mov$:PRINT curoff$
1000 PRINT FNtab$(14,28,STRING$(60," "))
1010 PRINT FNtab$(14,28,"Un momento...comprovando el movimiento...")
1020 l$=UPPER$(LEFT$(mov$,1)):r$=RIGHT$(mov$,1):mov$=l$+r$
1030 x%=INSTR("ABCDEFGH",l$):y%=INSTR("12345678",r$)
1040 IF x%=0 OR y%=0 THEN GOSUB 1130:GOTO 980
1050 t$=b$(x%,y%):IF t$<>" " THEN GOSUB 1130:GOTO 980
1060 b$(x%,y%)="x":flag%=0:x$="¼":y$="»":GOSUB 920:GOSUB 1320
1070 IF s%=0 THEN b$(x%,y%)=" ":GOSUB 1130:GOTO 980
1080 IF s%>0 THEN b$(x%,y%)=x$:GOSUB 920:GOSUB 1190
1090 RETURN
1100 '----------------------------------
1110 '       MOVIMIENTO ILEGAL
1120 '----------------------------------
1130 PRINT FNtab$(14,28,STRING$(60," "))
1140 FOR n=1 TO 3:PRINT beep$;:NEXT:PRINT FNtab$(14,28,"[Movimiento ilegal! - Prueba otra vez..."):RETURN
1150 '----------------------------------
1160 ' CALCULO E IMPRESION DE PUNTOS.
1170 ' COMPRUEBA EL FINAL DEL JUEGO.
1180 '----------------------------------
1190 sc1%=0:sc2%=0:FOR i%=1 TO 8:FOR j%=1 TO 8
1200 IF b$(j%,i%)="¼" THEN sc1%=sc1%+1
1210 IF b$(j%,i%)="»" THEN sc2%=sc2%+1
1220 NEXT j%:NEXT i%
1230 PRINT FNtab$(19,1,STR$(sc1%)+" ")
1240 PRINT FNtab$(84,1,STR$(sc2%)+" ")
1250 IF x$="¼" THEN PRINT FNtab$(11,4,mov$)
1260 IF x$="»" THEN PRINT FNtab$(76,4,mov$)
1270 IF sc1%+sc2%=64 THEN FOR n=1 TO 7:PRINT beep$;:NEXT n:PRINT FNtab$(14,28,STRING$(60," ")):PRINT FNtab$(14,28,fin$+curon$):RUN "MENU"
1280 RETURN
1290 '---------------------------------
1300 ' VERIFICACION DE LOS MOVIMIENTOS
1310 '---------------------------------
1320 FOR i%=1 TO 8:n$(i%)="":NEXT i%
1330 IF y%>=3 THEN FOR i%=y% TO 1 STEP -1:n$(1)=n$(1)+b$(x%,i%):NEXT i%
1340 IF x%<=6 AND y%>=3 AND y%>9-x% THEN FOR i%=0 TO 8-x%:n$(2)=n$(2)+b$(x%+i%,y%-i%):NEXT i%:ELSE IF y%<=9-x% THEN FOR i%=0 TO y%-1:n$(2)=n$(2)+b$(x%+i%,y%-i%):NEXT i%
1350 IF x%<=6 THEN FOR i%=x% TO 8:n$(3)=n$(3)+b$(i%,y%):NEXT i%
1360 IF x%<=6 AND y%<=6 AND x%<y% THEN FOR i%=0 TO 8-y%:n$(4)=n$(4)+b$(x%+i%,y%+i%):NEXT i%:ELSE IF x%>=y% THEN FOR i%=0 TO 8-x%:n$(4)=n$(4)+b$(x%+i%,y%+i%):NEXT i%
1370 IF y%<=6 THEN FOR i%=y% TO 8:n$(5)=n$(5)+b$(x%,i%):NEXT i%
1380 IF x%>=3 AND y%<=6 AND x%>9-y% THEN FOR i%=0 TO 8-y%:n$(6)=n$(6)+b$(x%-i%,y%+i%):NEXT i%:ELSE IF x%<=9-y% THEN FOR i%=0 TO x%-1:n$(6)=n$(6)+b$(x%-i%,y%+i%):NEXT i%
1390 IF x%>=3 THEN FOR i%=x% TO 1 STEP -1:n$(7)=n$(7)+b$(i%,y%):NEXT i%
1400 IF x%>=3 AND y%>=3 AND x%<y% THEN FOR i%=0 TO x%-1:n$(8)=n$(8)+b$(x%-i%,y%-i%):NEXT i%:ELSE IF x%>=y% THEN FOR i%=0 TO y%-1:n$(8)=n$(8)+b$(x%-i%,y%-i%):NEXT i%
1410 '
1420 s%=0:t%=0:FOR j%=1 TO 8
1430 a%=INSTR(n$(j%),x$):b%=INSTR(n$(j%),y$):c%=INSTR(n$(j%)," ")
1440 IF c%=0 THEN c%=9
1450 IF a%=0 OR b%=0 OR a%<b% OR c%<a% OR c%<b% THEN 1600
1460 IF j%>=1 AND j%<=4 THEN k%=j%+4
1470 IF j%>=5 AND j%<=8 THEN k%=j%-4
1480 IF MID$(n$(j%),a%+1,1)=" " AND MID$(n$(k%),2,1)=y$ THEN t%=t%+a%
1490 IF MID$(n$(j%),a%+1,1)=y$ AND MID$(n$(k%),2,1)=" " THEN t%=t%+a%
1500 FOR k%=2 TO a%-1:s%=s%+1:MID$(n$(j%),k%,1)=x$:NEXT k%
1510 IF flag%=1 THEN 1600
1520 IF j%=1 THEN d%=0:FOR i%=y% TO 1 STEP-1:d%=d%+1:b$(x%,i%)=MID$(n$(1),d%,1):NEXT i%
1530 IF j%=2 AND y%>9-x% THEN FOR i%=0 TO 8-x%:b$(x%+i%,y%-i%)=MID$(n$(2),i%+1,1):NEXT i%:ELSE IF y%<=9-x% THEN FOR i%=0 TO y%-1:b$(x%+i%,y%-i%)=MID$(n$(2),i%+1,1):NEXT i%
1540 IF j%=3 THEN d%=0:FOR i%=x% TO 8:d%=d%+1:b$(i%,y%)=MID$(n$(3),d%,1):NEXT i%
1550 IF j%=4 AND x%<y% THEN FOR i%=0 TO 8-y%:b$(x%+i%,y%+i%)=MID$(n$(4),i%+1,1):NEXT i%:ELSE IF x%>=y% THEN FOR i%=0 TO 8-x%:b$(x%+i%,y%+i%)=MID$(n$(4),i%+1,1):NEXT i%
1560 IF j%=5 THEN d%=0:FOR i%=y% TO 8:d%=d%+1:b$(x%,i%)=MID$(n$(5),d%,1):NEXT i%
1570 IF j%=6 AND x%>9-y% THEN FOR i%=0 TO 8-y%:b$(x%-i%,y%+i%)=MID$(n$(6),i%+1,1):NEXT i%:ELSE IF x%<=9-y% THEN FOR i%=0 TO x%-1:b$(x%-i%,y%+i%)=MID$(n$(6),i%+1,1):NEXT i%
1580 IF j%=7 THEN d%=0:FOR i%=x% TO 1 STEP -1:d%=d%+1:b$(i%,y%)=MID$(n$(7),d%,1):NEXT i%
1590 IF j%=8 AND x%<y% THEN FOR i%=0 TO x%-1:b$(x%-i%,y%-i%)=MID$(n$(8),i%+1,1):NEXT i%:ELSE IF x%>=y% THEN FOR i%=0 TO y%-1:b$(x%-i%,y%-i%)=MID$(n$(8),i%+1,1):NEXT i%
1600 NEXT j%:RETURN
1610 '
1620 '---------------------------------
1630 '    CALCULA EL MOVIMIENTO DEL
1640 '            ORDENADOR
1650 '---------------------------------
1660 PRINT FNtab$(14,26,STRING$(60," ")):PRINT FNtab$(14,28,STRING$(60," "))
1670 PRINT FNtab$(14,26,beep$+"Me toca a mi...no te impacientes...")
1680 d%=0:g%=0:h%=-60:FOR r%=1 TO 7:FOR w%=1 TO LEN(u$(r%)) STEP 2
1690 d%=d%+1:PRINT FNtab$(13+d%,28,"*"):mov$=MID$(u$(r%),w%,2)
1700 l$=LEFT$(mov$,1):r$=RIGHT$(mov$,1)
1710 x%=INSTR("ABCDEFGH",l$):y%=INSTR("12345678",r$)
1720 t$=b$(x%,y%):IF t$<>" " THEN 1760
1730 b$(x%,y%)="o":flag%=1:x$="»":y$="¼":GOSUB 1320
1740 IF s%-t%>h% THEN h%=s%-t%:g%=w%
1750 b$(x%,y%)=" "
1760 NEXT w%
1770 IF h%>0 THEN GOSUB 1800:r%=7
1780 NEXT r%:RETURN
1790 '
1800 mov$=MID$(u$(r%),g%,2):l$=LEFT$(mov$,1):r$=RIGHT$(mov$,1)
1810 x%=INSTR("ABCDEFGH",l$):y%=INSTR("12345678",r$)
1820 b$(x%,y%)="o":GOSUB 920:flag%=0:x$="»":y$="¼":GOSUB 1320
1830 b$(x%,y%)="»":GOSUB 920:GOSUB 1190:RETURN

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 "OTHELLOS" and press the "ENTER" key

Extras

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

othello_sp_programa_02.jpg othello_sp_programa_01.jpg othello_sp_programa_03.jpg othello_sp_programa_04.jpg

Descarga

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