Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0020/bandit.gam
There are 2 other files named bandit.gam in the archive. Click here to see a list.
100'  NAME--BANDIT
110'  
120'  DESCRIPTION--THE COMPUTER IS A SLOT MACHINE AND YOU ARE THE PLAYER
130'
140'  SOURCE--UNKNOWN
150'
160'  INSTRUCTIONS--TYPE "RUN" AND FOLLOW INSTRUCTIONS.
170'
180'
190'  *  *  *  *  *  *   MAIN PROGRAM   *  *  *  *  *  *  *  *  *  *
200'
210 PRINT"THIS DEMONSTRATION SHOWS YOU SOME VERSATILE FEATURES"
220 PRINT" OF  DIGITAL EQUIPMENTS TIMESHARING PDP 10 BY SIMULATING A SLOT"
230 PRINT"MACHINE --- THE ONE-ARMED BANDIT."
240 PRINT
250 GOTO 410
260 PRINT"WHAT IS YOUR LUCKY NUMBER TODAY, BETWEEN 1 AND 711";
270 INPUT Q
280 IF Q<1 THEN 240
290 IF Q>711 THEN 240
300 PRINT
310 DATA 43
320 READ Q9
330 LET U=INT(Q+Q9)
340 FOR I=1 TO U
350 LET V=RND
360 NEXT I
370 LET S=INT(30+15*V)
380 PRINT"GOOD. YOUR STARTING BALANCE IS $";S
390 GOTO 510
400 PRINT
410 PRINT"EACH PLAY YOU CAN PUT ANY AMOUNT OF SILVER DOLLARS INTO"
420 PRINT"THE MACHINE, UP TO THE BALANCE YOU HAVE, BY TYPING IN"
430 PRINT"THE QUANTITY OF DOLLARS."
440 PRINT
450 PRINT"YOU 'PULL DOWN THE HANDLE' BY DEPRESSING THE 'RETURN' KEY."
460 PRINT
470 PRINT"WHEN YOUR BALANCE REACHES ZERO, THE GAME IS OVER....."
480 PRINT"OR TYPE 'STOP' TO QUIT AT ANY TIME. GOOD LUCK..."
490 PRINT
500 GOTO 260
510 PRINT"HOW MANY DOLLARS DO YOU WANT TO PUT IN ON YOUR FIRST PLAY";
520 INPUT Z
530 IF Z<=0 THEN 550
540 IF Z<S+1 THEN 580
550 PRINT
560 PRINT "...ILLEGAL PLAY....TRY AGAIN";
570 GOTO 520
580 PRINT
590 DIM R(3),T(3),P(3,6)
600 FOR I=1 TO 3
610 FOR J=1 TO 6
620 READ P(I,J)
630 NEXT J
640 NEXT I
650 LET E4=0
660 FOR I=1 TO 3
670 LET R=RND
680 FOR J=1 TO 6
690 LET T(I)=J
700 IF R<P(I,J) THEN 720
710 NEXT J
720 NEXT I
730 FOR I=1 TO 3
740 LET W=T(I)
750 IF W=1 THEN 810
760 IF W=2 THEN 830
770 IF W=3 THEN 850
780 IF W=4 THEN 870
790 IF W=5 THEN 890
800 IF W=6 THEN 910
810 PRINT"LEMON   ";
820 GOTO 930
830 PRINT"CHERRY  ";
840 GOTO 930
850 PRINT"ORANGE  ";
860 GOTO 930
870 PRINT"PLUM    ";
880 GOTO 930
890 PRINT"BELL    ";
900 GOTO 930
910 PRINT"LIBERTY ";
920 GOTO 930
930 NEXT I
940 LET D=100*T(1)+10*T(2)+T(3)
950 IF D=221 THEN 1100
960 IF D=223 THEN 1100
970 IF D=224 THEN 1100
980 IF D=225 THEN 1110
990 IF D=226 THEN 1130
1000 IF D=333 THEN 1170
1010 IF D=444 THEN 1190
1020 IF D=555 THEN 1210
1030 IF D=336 THEN 1230
1040 IF D=446 THEN 1250
1050 IF D=556 THEN 1270
1060 IF D=666 THEN 1290
1070 LET D=0
1080 PRINT "...A LOSER      ";
1090 GOTO 1330
1100 LET D=2*Z
1110 LET D=4*Z
1120 GOTO 1330
1130 LET D=6*Z
1140 GOTO 1330
1150 LET D=8*Z
1160 GOTO 1330
1170 LET D=10*Z
1180 GOTO 1330
1190 LET D=12*Z
1200 GOTO 1330
1210 LET D=14*Z
1220 GOTO 1330
1230 LET D=16*Z
1240 GOTO 1330
1250 LET D=18*Z
1260 GOTO 1330
1270 LET D=20*Z
1280 GOTO 1330
1290 LET D=INT(200+400*RND)
1300 PRINT "...YOU HIT THE JACKPOT OF $";D
1310 PRINT
1320 LET E4=1
1330 LET S=S+D-Z
1340 IF S>0 THEN 1380
1350 PRINT
1360 PRINT "YOU HAVE RUN OUT OF MONEY..."
1370 GOTO 1520
1380 IF D=0 THEN 1410
1390 IF E4=1 THEN 1410
1400 PRINT "YOU WIN: $";D;
1410 PRINT "BALANCE: $";S;"AGAIN";
1420 INPUT Z
1430 IF Z<=0 THEN 1460
1440 IF Z=999 THEN 1510
1450 IF Z<S+1 THEN 1490
1460 PRINT
1470 PRINT "...ILLEGAL PLAY....TRY AGAIN";
1480 GOTO 1420
1490 PRINT
1500 GOTO 660
1510 PRINT
1520 PRINT"THE GAME IS OVER...BETTER LUCK NEXT TIME."
1530 GOTO1570
1540 DATA 0.00, 0.40, 0.65, 0.83, 0.94, 1.00
1550 DATA 0.10, 0.45, 0.65, 0.80, 0.90, 1.00
1560 DATA 0.30, 0.30, 0.50, 0.70, 0.82, 1.00
1570 PRINT
1580 PRINT
1590 PRINT
1600 PRINT
1610 PRINT
1620 PRINT
1630 PRINT
1640 PRINT
1650 PRINT
1660 END