home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RUN Flagazine Extra: Special 3
/
run-special-3.zip
/
BOKAEI.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-11-24
|
2KB
|
49 lines
100 REM BOTER, KAAS EN EIEREN - GWBASIC MONO
110 CLS:KEY OFF:DEFINT A-Z:E$="Doorgaan":C$=STRING$(3,32)+CHR$(219)
120 M$="Mens":DIM H(9),V(9),LIJN(8,3),PY(9),PX(9)
130 LOCATE 1,14:PRINT CHR$(201)STRING$(29,205)CHR$(187)
140 FOR Q=2 TO 13:LOCATE Q,14:PRINT CHR$(186)STRING$(29,32)CHR$(186)
150 NEXT:LOCATE 13,14:PRINT CHR$(200)STRING$(29,205)CHR$(188)
160 RANDOMIZE -TIMER:IF RND<.5 THEN B$=M$
170 FOR I=1 TO 9:READ PY(I),PX(I)
180 LOCATE PY(I)-1,PX(I)-2:PRINT I;:NEXT
190 FOR I=1 TO 9:READ V(I):NEXT
200 FOR I=1 TO 8:FOR J=1 TO 3:READ LIJN(I,J):NEXT:NEXT
210 DATA 4,20,4,30,4,40,8,20,8,30,8,40,12,20,12,30,12,40
220 DATA 5,1,3,7,9,2,4,6,8
230 DATA 1,2,3,4,5,6,7,8,9,1,4,7,2,5,8,3,6,9,1,5,9,3,5,7
240 WHILE E$="Doorgaan"
250 IF B$=M$ THEN B$=C$ ELSE B$=M$
260 GOSUB 280:GOSUB 470:GOSUB 500:WEND:LOCATE 14,14
270 PRINT"Einde van dit spel met winst voor ";E$;
271 WHILE INKEY$ = "": WEND:END
280 Z=0:IF B$=STRING$(3,32)+CHR$(219) THEN 310
290 LOCATE 14,20:INPUT"Uw zet:";Z:IF H(Z)>0 THEN 290
300 RETURN
310 FOR L=1 TO 8:SOM=0:FOR C=1 TO 3:SOM=SOM+H(LIJN(L,C))
320 NEXT:IF SOM<>8 THEN 370
330 IF H(LIJN(L,1))=0 THEN Z=LIJN(L,1)
340 IF H(LIJN(L,2))=0 THEN Z=LIJN(L,2)
350 IF H(LIJN(L,3))=0 THEN Z=LIJN(L,3)
360 L=8:NEXT
370 IF Z>0 THEN RETURN
380 FOR L=1 TO 8:SOM=0:FOR C=1 TO 3:SOM=SOM+H(LIJN(L,C))
390 NEXT:IF SOM<>2 THEN 440
400 IF H(LIJN(L,1))=0 THEN Z=LIJN(L,1)
410 IF H(LIJN(L,2))=0 THEN Z=LIJN(L,2)
420 IF H(LIJN(L,3))=0 THEN Z=LIJN(L,3)
430 L=8
440 NEXT:IF Z>0 THEN RETURN
450 FOR I=1 TO 9:C=V(I):IF H(C)=0 THEN Z=C:I=9
460 NEXT:RETURN
470 IF B$="Mens" THEN H(Z)=1 ELSE H(Z)=4
480 COLOR 15,0:LOCATE PY(Z)-1,PX(Z)-H(Z):PRINT B$;
490 RETURN
500 E$="niemand":FOR L=1 TO 8:SOM=0:FOR C=1 TO 3
510 SOM=SOM+H(LIJN(L,C)):NEXT
520 IF SOM=12 THEN E$="de computer":L=8
530 IF SOM=3 THEN E$="de speler":L=8
540 NEXT:IF E$<>"niemand" THEN RETURN
550 FOR I=1 TO 9:IF H(I)=0 THEN E$="Doorgaan":I=9
560 NEXT:RETURN