image of READY prompt

Wang2200.org

Listing of file='TACTIC' on disk='vmedia/games_vol_3.wvd.zip'

# Sector 262, program filename = 'TACTIC'
0001 REM % WTAREC09 - ie TACTIC
0010 DIM C$(5,5)
0020 PRINT HEX(03);AT(0,37);"TACTICS"
0030 PRINT AT(2,1);"THE RULES OF THIS GAME:-";AT(3,5);"1. BE THE FIRST TO FILL
      IN THE LAST OPEN POSITIONS. EACH"
0040 PRINT TAB(8);"POSITION IS CALLED A 'CELL' IN A 5 X 5 SQUARE."
0050 PRINT TAB(5);"2. WHEN IT IS YOUR TURN, I WILL PRINT 'ROW OR COLUMN,NUMBER
     ?'"
0060 PRINT TAB(8);"AFTER THAT YOU MUST ENTER EITHER 'ROW' OR 'COLUMN' AND"
0070 PRINT TAB(8);"',(NUMBER)', NUMBER = ROW NUMBER OR COLUMN NUMBER."
0080 PRINT TAB(8);"(E.G. 'ROW,2' = ROW TWO)"
0090 PRINT TAB(5);"3. THEN I WILL PRINT 'NUMBER,THROUGH NUMBER' AFTER WHICH"
0100 PRINT TAB(8);"YOU MUST ENTER THE CELL NUMBER THAT YOU WISH TO START WITH"
0110 PRINT TAB(8);"AND END WITH 'N,N' IN THE ROW OR COLUMN. (E.G. '2,5' = CELL
     S"
0120 PRINT TAB(8);"2 THROUGH 5)"
0130 PRINT TAB(5);"4. I WILL NOT TELL YOU MY MOVE'S, BUT IT WILL APPEAR"
0140 PRINT TAB(8);"AS X'S WHEN I PRINT THE BOARD AFTER MY MOVE."
0150 T=60000
   : T1=4
0160 FOR A=1TO 5
0170 FOR B=1TO 5
0180 C$(A,B)="-"
0190 NEXT B
0200 NEXT A
0210 PRINT
0220 PRINT
0230 PRINT "WOULD YOU LIKE TO GO FIRST"
   : KEYIN Z$
0240 IF Z$="Y"THEN 750
0250 REM %************COMPUTER FIRST *********************
0260 PRINT "THEN I WILL GO FIRST"
0270 C$(3,3)="X"
0280 C=1
   : GOTO 500
0290 PRINT "YOUR TURN"
0300 PRINT HEX(0A);"ROW OR COLUMN,NUMBER";
   : INPUT B$,D
0310 IF D>5THEN 300
   : IF D<1THEN 300
   : D=INT(D)
0320 PRINT "NUMBER,THROUGH NUMBER";
0330 INPUT E,F
   : IF E>5THEN 320
   : IF F>5THEN 320
0340 IF E<1THEN 320
   : IF F<1THEN 320
0350 E=INT(E)
   : F=INT(F)
   : Z=1
0360 IF B$="ROW"THEN 430
0370 FOR G=ETO F
0380 IF C$(G,D)="O"THEN 490
0390 NEXT G
   : IF Z=2THEN 850
0400 FOR G=ETO F
0410 C$(G,D)="O"
   : C$((6-G),(6-D))="X"
0420 NEXT G
   : C=1
   : GOTO 500
0430 FOR G=ETO F
0440 IF C$(D,G)="O"THEN 490
0450 NEXT G
   : IF Z=2THEN 850
0460 FOR G=ETO F
0470 C$(D,G)="O"
   : C$((6-D),(6-G))="X"
0480 NEXT G
   : C=1
   : GOTO 500
0490 PRINT HEX(0A0A);"ILLEGAL MOVE"
   : ON ZGOTO 300,780
0500 PRINT HEX(0A0A0A)
0510 FOR A=1TO 5
0520 PRINT
0530 FOR B=1TO 5
0540 PRINT C$(A,B);"   ";
0550 NEXT B
0560 PRINT
0570 NEXT A
0580 PRINT HEX(0A0A)
0590 FOR A=1TO 5
0600 FOR B=1TO 5
0620 IF C$(A,B)<>"X"THEN 640
0630 C$(A,B)="O"
0640 NEXT B
0650 NEXT A
0660 ON CGOTO 670,770
0670 H=0
0680 FOR A=1TO 5
0690 FOR B=1TO 5
0700 IF C$(A,B)="-"THEN 290
0710 NEXT B
0720 NEXT A
0730 PRINT "HA, HA - I'VE WON."
0740 PRINT "Do you want to play again?";
   : KEYIN Z$
   : IF Z$="Y"THEN 20
   : GOTO 1520
0750 REM %***************** PLAYER FIRST *********************
0760 X=3
   : Y=3
0770 PRINT "YOUR MOVE"
0780 PRINT
   : PRINT "ROW OR COLUMN,NUMBER";
   : INPUT B$,D
0790 IF D>5THEN 780
   : IF D<1THEN 780
   : D=INT(D)
0800 PRINT "NUMBER,THROUGH NUMBER";
   : INPUT E,F
0810 IF E>5THEN 800
   : IF F>5THEN 800
0820 IF E<1THEN 800
   : IF F<1THEN 800
0830 E=INT(E)
   : F=INT(F)
0840 Z=2
   : GOTO 360
0850 GOSUB 1430
0860 IF F-E=0THEN 1200
0870 IF B$="ROW"THEN 1040
   : IF B$="R"THEN 1040
0880 IF (6-D)=YTHEN 920
0890 IF D=YTHEN 1010
0900 FOR A=ETO F
   : C$(A,D)="O"
   : C$((6-A),(6-D))="X"
   : NEXT A
0910 C=2
   : GOTO 500
0920 FOR A=ETO F
   : IF (6-A)=XTHEN 950
   : NEXT A
0930 FOR A=ETO F
   : IF ABS((6-A)-X)=1THEN 950
   : NEXT A
0940 GOTO 900
0950 FOR A=ETO F
   : C$(A,D)="O"
   : C$((6-A),(6-D))="X"
   : NEXT A
0960 C$(X,Y)="X"
   : C=1
   : GOTO 500
0970 FOR A=ETO F
   : C$(A,D)="O"
   : NEXT A
0980 FOR A=ETO F
   : IF C$((6-A),(6-D))="O"THEN 1000
0990 C$((6-A),(6-D))="X"
   : Q=1
1000 NEXT A
   : IF Q<>1THEN 1230
   : C=1
   : GOTO 500
1010 FOR A=ETO F
   : IF A=XTHEN 970
   : NEXT A
1020 FOR A=ETO F
   : IF ABS(A-X)=1THEN 950
   : NEXT A
1030 GOTO 1030
1040 IF (6-D)=XTHEN 1080
1050 IF D=XTHEN 1170
1060 FOR A=ETO F
   : C$(D,A)="O"
   : C$((6-D),(6-A))="X"
   : NEXT A
1070 C=2
   : GOTO 500
1080 FOR A=ETO F
   : IF (6-A)=YTHEN 1130
   : NEXT A
1090 FOR A=ETO F
   : IF ABS((6-A)-Y)=1THEN 1110
   : NEXT A
1100 GOTO 1060
1110 FOR A=ETO F
   : C$(D,A)="O"
   : C$((6-D),(6-A))="X"
   : NEXT A
1120 C$(X,Y)="X"
   : C=1
   : GOTO 500
1130 FOR A=ETO F
   : C$(D,A)="O"
   : NEXT A
   : Q=0
1140 FOR A=ETO F
   : IF C$((6-D),(6-A))="O"THEN 1160
1150 C$((6-D),(6-A))="X"
   : Q=1
1160 NEXT A
   : IF Q<>1THEN 1340
   : C=1
   : GOTO 500
1170 FOR A=ETO F
   : IF A=YTHEN 1130
   : NEXT A
1180 FOR A=ETO F
   : IF ABS(A-Y)=1THEN 1110
   : NEXT A
1190 GOTO 1060
1200 IF B$="ROW"THEN 1310
   : IF B$="R"THEN 1310
1210 IF E<>XTHEN 1260
1220 IF D<>YTHEN 1260
1230 FOR A=ETO F
   : C$(A,D)="O"
   : NEXT A
1240 READ T
   : READ U
   : X=(6-T)
   : Y=(6-U)
   : GOSUB 1410
1250 C$(T,U)="X"
   : C=2
   : GOTO 500
1260 IF ABS(((6-E)-X))+ABS(((6-D)-Y))<>1THEN 1290
1270 C$(E,D)="O"
   : C$((6-E),(6-D))="X"
   : C$(X,Y)="X"
1280 C=1
   : GOTO 500
1290 C$(E,D)="O"
   : C$((6-E),(6-D))="X"
1300 C=2
   : GOTO 500
1310 IF E<>YTHEN 1360
1320 IF D<>XTHEN 1360
1330 FOR A=ETO F
   : C$(D,A)="O"
   : NEXT A
1340 READ T
   : READ U
   : X=(6-T)
   : Y=(6-U)
   : GOSUB 1410
1350 C$(T,U)="X"
   : C=2
   : GOTO 500
1360 IF ABS(((6-E)-Y))+ABS(((6-D)-X))<>1THEN 1390
1370 C$(D,E)="O"
   : C$((6-D),(6-E))="X"
   : C$(X,Y)="X"
1380 C=1
   : GOTO 500
1390 C$(D,E)="O"
   : C$((6-D),(6-E))="X"
1400 C=2
   : GOTO 500
1410 IF C$(T,U)="O"THEN 1240
1420 RETURN
1430 IF B$="ROW"THEN 1450
   : IF B$="R"THEN 1450
1440 FOR A=ETO F
   : C$(A,D)="O"
   : NEXT A
   : GOTO 1460
1450 FOR A=ETO F
   : C$(D,A)="O"
   : NEXT A
   : GOTO 1460
1460 FOR A=1TO 5
1470 FOR B=1TO 5
1480 IF C$(A,B)="O"THEN 1490
   : RETURN
1490 NEXT B
   : NEXT A
   : PRINT HEX(0A0A);"YOU WON!  Now I'm going to sulk!"
   : GOTO 740
1500 DATA 1,1,1,2,1,3,1,4,1,5,2,5,3,5,4,5,2,2,2,3,2,4,3,4
1510 END
1520 DEFFN'126
   : LOAD T/D11,"BGA.RTRN"
1530 DEFFN'4
   : SCRATCH T/D11,"TACTIC"
   : SAVE T/D11,()"TACTIC"
   : STOP "TACTIC SAVED"