Program listing on 48K Spectrum.
Key showing in-game features (labels refer to single player mode).
1 DIM t(91): INPUT "1-2?";f: READ n,t(41),t(42),t(50),t(51),t(1),z,p: DATA 23620,2,1,1,2,3,2,2: LET p=3-p: LET q=z>1: DIM c(3): FOR a=1 TO 8: FOR b=1 TO 8: LET k=t(a*9+b+1): PRINT AT 9,b;b;AT a,0;a;AT a,b; PAPER k+p*p*(a*9+b+1=z);" ": LET c(k+1)=c(k+1)+1: NEXT b: NEXT a: PRINT ''c(2);"x";c(3),: IF c(1)*c(p+1) THEN BORDER p: POKE (f<p)*n,20: INPUT a,b: FOR i=1 TO 62: LET z=CODE "!2j+qX=0-ol_D?ZB]HT\@[QAKOF/.nmVMYPG>^ULC9876fedcka4,ph;1:bg5!"(i)-32+(a*9+b)*(a*b>0)*(b<9): BEEP .01,i: 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,32: LET w=w+d: POKE (t(w)<>p)*n,26: LET w=w-d: LET t(w)=p: POKE (w<>z)*n,29: NEXT j: POKE n,4+15*(2*(i*q<62)-(z>1=i))*(t(z)*j=0): NEXT i |
During the course of the game, the players alternate turns to place a piece onto an empty square on the board, with the human player always moving first. The most recent move taken by either player is highlighted in a lighter colour than usual, so it is easy to stay aware of the last move made. Human player is blue (last move appears in cyan), CPU (or second player) is red (last move appears in magenta).
If there are no valid moves available for you to play, simply enter your move as 0 (for both ROW and COLUMN) to request a PASS. In this case, the computer will scan the board to confirm that you really don't have any valid move before accepting your PASS. However, if you attempt a PASS when there are still valid moves available, then the computer will interpret it as a request for HELP, and choose the best move it can find on your behalf.
The match is finished when one of the following end game conditions is met:-
(1) A player has had all of his pieces eliminated from the board (he loses the game); |
(2) The board is completely full (the player with the highest number of pieces on the board at this point wins the game); or |
(3) Neither player has a valid move remaining (again, highest number of pieces wins). |