Isolation is played on a 7×7 board of + squares, rows A–G and columns 1–7. You type a letter and then a number to knock out a square; the computer then marks one of its own, though now and then you get a second move first. When you enter a number instead of a letter the game ends and you score a point for every computer square completely surrounded by knocked-out squares or the edge.
The program is the type-in from SYNC v2 n2 (1982) (see the article Isolation). Bob Swoger’s copy was transferred from the TS1000 to the TS2068 with Upload 2000.
Program Analysis
The board is held in DIM A(81), a 9×9 array whose outer ring is preset to 1 so that neighbour tests never fall off the edge. Line 500 counts the computer’s squares whose eight neighbours are all taken.
Notable Techniques
- A border of filled cells around the 7×7 board removes all edge checks from the scoring loop.
This copy came from a Larken disk. The disk copy still POKEd the ZX81 display file, so line 391 now prints the square with PRINT AT (the computer’s mark is a checkered graphic), caps lock is set at the start, and any number now ends the game as the instructions say. Tested in ZEsarUX on a stock TS2068.
Source Code
1 REM ISOLATION
2 PAPER 7: INK 0: BORDER 7: CLS : POKE 23658,8: FOR i=0 TO 7: POKE USR "a"+i,170-85*(i-2*INT (i/2)): NEXT i
10 REM ??
20 DIM A(81)
30 LET T=0
40 LET S=0
45 FOR I=1 TO 81
50 IF I<=10 OR I=18 OR I=19 OR I=27 OR I=28 OR I=36 OR I=37 OR I=45 OR I=46 OR I=54 OR I=55 OR I=63 OR I=64 OR I>=72 THEN LET A(I)=1
60 NEXT I
70 FOR I=1 TO 7
80 PRINT "::::";
90 FOR J=1 TO 7
100 PRINT "+";
110 NEXT J
120 PRINT "";CHR$ (I+64);""
130 NEXT I
150 PRINT "::::1234567::"
160 PRINT "::::::::::::::::::::"
162 PRINT AT 0,11;"ENTER A LETTER FIRST"
164 PRINT AT 1,11;"THEN A NUMBER. TO "
166 PRINT AT 2,11;"STOP ENTER A NUMBER"
167 PRINT AT 3,11;"LARGER THAN 7."
168 PRINT
170 REM ??
180 LET D=INT (RND*61)+11
190 IF A(D)>0 THEN GO TO 180
200 LET A(D)=2
210 LET Y=INT (D/9)
220 LET X=D-9*Y-1
230 LET M=9
240 GO SUB 380
250 INPUT Y$
260 INPUT X$
270 LET Y=(CODE (Y$))-64
280 IF Y<1 THEN GO TO 480
290 LET X=(CODE (X$))-48
300 IF Y>7 OR X>7 THEN GO TO 250
310 LET C=9*Y+X+1
320 IF A(C)>0 THEN GO TO 250
330 LET A(C)=1
340 LET M=0
350 GO SUB 380
360 IF INT (RND*5)=2 THEN GO TO 250
370 GO TO 180
380 LET P=X+2+33*(Y-1)
390 REM POKE PEEK (16396)+256*PEEK (16397)+P,M
391 PRINT AT Y-1,X+1;CHR$ (32+112*(M=9))
400 LET T=T+1
410 IF T=49 THEN GO TO 480
420 IF T=16 THEN PRINT AT 12,2;"HOW ARE YOU DOING ?"
430 IF T=28 THEN PRINT AT 12,2;"YOU AREN'T TRYING!"
440 IF T=40 THEN PRINT AT 12,2;"WHATS THE MATTER?"
450 IF T=40 THEN PRINT AT 13,0;"THE COMPUTER RUNNING CIRCLES"
460 IF T=40 THEN PRINT AT 14,8;"AROUND YOU?"
470 RETURN
480 FOR I=11 TO 71
490 REM ??
500 IF A(I)=2 AND A(I-10)=1 AND A(I-9)=1 AND A(I-8)=1 AND A(I-1)=1 AND A(I+1)=1 AND A(I+8)=1 AND A(I+9)=1 AND A(I+10)=1 THEN LET S=S+1
510 NEXT I
520 PRINT "POINTS= ";S
530 STOP
540 GO TO 10
8200 REM removed (LKDOS-only)
8391 REM removed (LKDOS-only)
8400 REM removed (LKDOS-only)
8410 REM removed (LKDOS-only)
9989 REM removed (LKDOS-only)
9992 SAVE "ISOLAT.B1" LINE 1
9998 REM was LKDOS-onlyNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

