Othello PvP

In-game screen.

Program listing on 48K Spectrum.

Text Listing

1 DIM t(91):
 READ n,t(41),t(42),t(50),t(51),t(9),t(83),z,p,q:
 POKE n+73,32:
 CLS :
 DIM c(3):
 FOR a=1 TO 8:
 FOR b=1 TO 8:
 LET k=t(a*9+b+1):
 PRINT AT 18,b+b;b;AT a+a,0;a;AT a+a,b+b; PAPER k+p*p*(a*9+b+1=z);" ":
 BEEP (k>0)/20,k*9:
 LET c(k+1)=c(k+1)+1:
 NEXT b:
 NEXT a:
 PRINT '''c(2);"x";c(3),:
 BORDER 4:
 IF c(1)*c(p+1)*(q-z) THEN BORDER p:
 LET q=z:
 INPUT a,b:
 LET v=(a*b>0)*(a<9)*(b<9):
 FOR i=7 TO 72:
 LET z=i+INT (i/8)+2+(a*9+b-8)*v:
 FOR j=0 TO 9*(t(z)=0)-1:
 LET d=j+INT (j/3)*6-10:
 LET w=z+d:
 POKE (t(w)<>3-p)*n,33:
 LET w=w+d:
 POKE (t(w)<>p)*n,26:
 POKE n-v*n,19:
 LET w=w-d:
 LET t(w)=p:
 POKE (w<>z)*n,30:
 NEXT j:
 POKE n,36-(1+16*v)*(t(z)*j=0):
 NEXT i:
 LET p=3-p:
 POKE n,5:
 DATA 23620,2,1,1,2,3,3,1,1,0

About the game

The game is based on the first Othello game in this package. It is recommended that you check that game out first, since its documentation provides playing instructions and detailed background information.

This game differs from the above in that it only supports PvP ("Player versus Player") mode. Removing the "CPU AI" (thus disabling single player mode) freed up enough space within the one-liner limits to allow additional features unique to this version: a bigger game board, refusal of invalid attempts to PASS (instead of playing on player's behalf in such case), added in-game sound, and a few other small changes from the original game.

Back to documentation index