Trailing-Edge
-
PDP-10 Archives
-
decus_20tap1_198111
-
decus/20-0020/1queen.gam
There are 2 other files named 1queen.gam in the archive. Click here to see a list.
100' NAME--1QUEEN
110'
120' DESCRIPTION--PLAYS GAME BASED ON CHESS MOVES.
130'
140' SOURCE--UNKNOWN
150'
160' INSTRUCTIONS--TYPE "RUN" AND FOLLOW DIRECTIONS.
170'
180'
190' * * * * * * MAIN PROGRAM * * * * * * *
200'
210 PRINT "DO YOU WISH INSTRUCTIONS";
220 RANDOMIZE
230 DIM S(64)
240 FOR I = 1 TO 64
250 READ S(I)
260 NEXT I
270 DATA 81, 71, 61, 51, 41, 31, 21, 11
280 DATA 92, 82, 72, 62, 52, 42, 32, 22
290 DATA 103, 93, 83, 73, 63, 53, 43, 33
300 DATA 114, 104, 94, 84, 74, 64, 54, 44
310 DATA 125, 115, 105, 95, 85, 75, 65, 55
320 DATA 136, 126, 116, 106, 96, 86, 76, 66
330 DATA 147, 137, 127, 117, 107, 97, 87, 77
340 DATA 158, 148, 138, 128, 118, 108, 98, 88
350 INPUT W$
360 IF W$="NO" THEN 420
370 IF W$="YES" THEN 400
380 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'";
390 GOTO 350
400 GOSUB 1590
410 GOTO 430
420 GOSUB 1740
430 REM ERROR CHECKS.
440 PRINT "WHERE WOULD YOU LIKE TO START";
450 INPUT M1
460 IF M1 = 0 THEN 610
470 LET T1 = INT(M1/10)
480 LET U1 = M1 - 10*T1
490 IF U1 = 1 THEN 550
500 IF U1 = T1 THEN 550
510 PRINT "PLEASE READ THE DIRECTIONS AGAIN."
520 PRINT "YOU HAVE BEGUN ILLEGALLY."
530 PRINT
540 GO TO 440
550 GO SUB 780
560 PRINT "MACHINE MOVES TO SQUARE"M
570 IF M = 158 THEN 1330
580 PRINT "WHAT IS YOUR MOVE";
590 INPUT M1
600 IF M1 <> 0 THEN 650
610 PRINT
620 PRINT "IT LOOKS LIKE I HAVE WON BY FORFEIT."
630 PRINT
640 GO TO 1490
650 IF M1 <= M THEN 1200
660 LET T1 = INT(M1/10)
670 LET U1 = M1 - 10*T1
680 LET P = U1 - U
690 IF P <> 0 THEN 730
700 LET L = T1 - T
710 IF L <= 0 THEN 1200
720 GO TO 550
730 IF T1 - T <> P THEN 750
740 GO TO 550
750 IF T1 - T <> 2*P THEN 1200
760 GO TO 550
770 REM LOCATE MOVE FOR MACHINE.
780 IF M1 = 41 THEN 1010
790 IF M1 = 44 THEN 1010
800 IF M1 = 73 THEN 1010
810 IF M1 = 75 THEN 1010
820 IF M1 = 126 THEN 1010
830 IF M1 = 127 THEN 1010
840 IF M1 = 158 THEN 1240
850 LET C = 0
860 FOR K = 7 TO 1 STEP -1
870 LET U = U1
880 LET T = T1 + K
890 GO SUB 1390
900 IF C = 1 THEN 990
910 LET U = U + K
920 GO SUB 1390
930 IF C = 1 THEN 990
940 LET T = T + K
950 GO SUB 1390
960 IF C = 1 THEN 990
970 NEXT K
980 GO TO 1010
990 LET C = 0
1000 RETURN
1010 GO SUB 1040
1020 RETURN
1030 REM RANDOM MOVE.
1040 LET Z=RND
1050 IF Z > .6 THEN 1150
1060 IF Z > .3 THEN 1110
1070 LET U = U1
1080 LET T = T1 + 1
1090 LET M = 10*T + U
1100 RETURN
1110 LET U = U1 + 1
1120 LET T = T1 + 2
1130 LET M = 10*T + U
1140 RETURN
1150 LET U = U1 + 1
1160 LET T = T1 + 1
1170 LET M = 10*T + U
1180 RETURN
1190 REM ILLEGAL MOVE MESSAGE.
1200 PRINT
1210 PRINT "Y O U C H E A T . . . TRY AGAIN";
1220 GO TO 590
1230 REM PLAYER WINS.
1240 PRINT
1250 PRINT "C O N G R A T U L A T I O N S . . . "
1260 PRINT
1270 PRINT "YOU HAVE WON--VERY WELL PLAYED."
1280 PRINT "IT LOOKS LIKE I HAVE MET MY MATCH."
1290 PRINT "THANKS FOR PLAYING--I CAN'T WIN ALL THE TIME."
1300 PRINT
1310 GO TO 1490
1320 REM MACHINE WINS.
1330 PRINT
1340 PRINT "NICE TRY, BUT IT LOOKS LIKE I HAVE WON."
1350 PRINT "THANKS FOR PLAYING."
1360 PRINT
1370 GO TO 1490
1380 REM TEST FOR MACHINE MOVE.
1390 LET M = 10*T + U
1400 IF M = 158 THEN 1460
1410 IF M = 127 THEN 1460
1420 IF M = 126 THEN 1460
1430 IF M = 75 THEN 1460
1440 IF M = 73 THEN 1460
1450 RETURN
1460 LET C = 1
1470 GO TO 1450
1480 REM ANOTHER GAME?
1490 PRINT "ANYONE ELSE CARE TO TRY";
1500 INPUT Q$
1510 PRINT
1520 IF Q$="YES" THEN440
1530 IF Q$="NO" THEN 1560
1540 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'";
1550 GOTO 1500
1560 PRINT "OK - - THANKS AGAIN."
1570 STOP
1580 REM DIRECTIONS, ETC. . .
1590 PRINT "WE ARE GOING TO PLAY A GAME BASED ON ONE OF THE CHESS MOVES."
1600 PRINT "OUR QUEEN WILL BE ABLE TO MOVE ONLY TO THE LEFT,"
1610 PRINT "DOWN, AND DIAGONALLY DOWN TO THE LEFT."
1620 PRINT
1630 PRINT "THE OBJECT OF THE GAME IS TO PLACE THE QUEEN IN THE"
1640 PRINT "LOWER LEFT-HAND SQUARE BY ALTERNATING MOVES BETWEEN"
1650 PRINT "YOU AND THE MACHINE/ THE FIRST ONE TO PLACE THE QUEEN"
1660 PRINT "THERE, WINS."
1670 PRINT
1680 PRINT "YOU GO FIRST AND PLACE THE QUEEN IN ANY ONE OF THE"
1690 PRINT "SQUARES ON THE TOP ROW OR THE RIGHT-HAND COLUMN."
1700 PRINT "THAT WILL BE YOUR FIRST MOVE."
1710 PRINT "WE WILL THEN ALTERNATE MOVES."
1720 PRINT "YOU MAY FORFEIT AT ANY TIME BY TYPING '0' AS YOUR MOVE."
1730 PRINT "BE SURE TO PUSH THE 'RETURN' KEY AFTER EACH RESPONSE."
1740 PRINT
1750 FOR A = 0 TO 7
1760 FOR B = 1 TO 8
1770 LET I = 8*A + B
1780 PRINT TAB(6*(B-1)+1);S(I);
1790 NEXT B
1800 PRINT
1810 PRINT
1820 PRINT
1830 NEXT A
1840 PRINT
1850 RETURN
1860 END