Publication: The Plotter
Pub Details: The Plotter v6 n4 (Volume 6, Issue 4)
Date: April 1988
Pages: 3-4
10 MODE 4:WINDOW 512,256,0,0:PAPER 0:INK 7:CLS
15 WINDOW 420,200,40,26:PAPER 0:INK 7:BORDER 1,7:CLS
20 CSIZE 2,1:PRINT TO 12;"COMBINATION":CSIZE 1,0
25 PRINT " Combination was written for the TS-2068 by Vladimir and Aleksandar Bulovic. With some minor changes it now works on our QL. Plus you can play aganist the computer. Note: The computer is not that good but will give you good practice."
30 PRINT" The playing board consists of 64 boxes. The goal of the game is to get four boxes in a line filled with your colored circle. You can win in any direction: diagonal, horizontal or vertical. "
40 PRINT" To choose the column you wish play in just PRESS key 1 to 8."
50 PRINT\\:CSIZE 2,1:PRINT TO 7;"PRESS ANY KEY TO PLAY"
60 PAUSE
80 MODE 8:WINDOW 512,256,0,0:PAPER 0:INK 7:CLS
85 GO TO 200
90 DEFine PROCedure BOARD
95 title
100 INK 7:FOR a=46.9 TO 115 STEP 7.85
110 LINE a,26 TO a,89
130 END FOR a
140 FOR a=26 TO 95 STEP 7.85
150 LINE 47,a TO 109.6,a
160 END FOR a
170 END DEFine
200 name
210 b=INT(RND(1 TO 2)):b=b*2:d1=1:d2=8
300 PAPER 0:INK 7:CLS:BOARD
310 DIM s(34,34)
350 CURSOR 200,200:INK 7:PRINT"1 2 3 4 5 6 7 8"
360 DIM c(8)
370 FOR x=1 TO 8:c(x)=17
380 IF b=6 THEN b=2:END IF
390 FOR f=1 TO 9
400 PAPER b:INK 0:AT f+8,0:PRINT" "
410 END FOR f
430 AT 11,5-LEN (a$(b/2))/2:PRINT;a$(b/2)
450 CSIZE 2,0:AT 13,0:PRINT TO 6;"IS":CSIZE 3,0
460 AT 15,0:PRINT " PLAYING"
480 PAPER 0
500 FOR x=1 TO 8
510 IF c(x) <=1 THEN
520 END FOR x
530 GO TO 2000
540 ELSE :END IF
545 IF cpu=1 AND b=4 THEN
547 d= RND(d1,d2):PAUSE 30:GO TO 570
548 ELSE :END IF
550 ch=CODE(INKEY$(-1))
560 IF ch >48 AND ch < 57 THEN
565 d=ch-48
566 ELSE
567 GO TO 545:END IF
570 IF c(d)>2 THEN
575 g=25-c(d)
590 INK b:FILL 1:CIRCLE (d*2+10)*7.82/2+4,g*7.83/2-1.6,3.5:FILL 0
595 x1=c(d):y1=d*2+10:s(x1,y1)=b
600 GO TO 1000
610 ELSE
620 GO TO 545
650 END IF
1000 e=48+b
1010 IF cpu=1 AND b=2 THEN
1020 d1=d-1:IF d = 1 THEN d1=1:END IF
1030 d2=d+1:IF d = 8 THEN d2=8:END IF
1040 ELSE :END IF
1190 b=b+2
1200 RESTORE 1210
1210 DATA 0,1,1,0,1,1,-1,1
1220 FOR z=1 TO 4
1230 READ o1,o2
1240 FOR y=0 TO 3
1250 FOR x=0 TO 3
1260 n=x*-2+2*y:IF n=0 THEN
1270 NEXT x
1280 GO TO 1500
1290 ELSE :END IF
1300 x1=c(d)+n*o1:y1=d*2+10+n*o2
1305 IF x1<1 OR y1<1 THEN
1310 GO TO 1340
1312 ELSE :END IF
1315 IF s(x1,y1)=b-2 THEN
1320 NEXT x
1330 GO TO 1500
1335 ELSE :END IF
1340 NEXT y
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.