Trailing-Edge
-
PDP-10 Archives
-
decuslib10-01
-
43,50110/bingo.gam
There are 2 other files named bingo.gam in the archive. Click here to see a list.
100' NAME--BINGO
110'
120' DESCRIPTION--PLAYS A GAME OF BINGO
130'
140' SOURCE--LARRY BETHURUM,PHILLIPS EXETER ACADEMY, 1/23/66.
150'
160' INSTRUCTIONS--TYPE "RUN" AND FOLLOW DIRECTIONS.
170'
180'
190' * * * * * * MAIN PROGRAM * * * * * * * * * * *
200'
210 RANDOMIZE
220
230 PRINT"YOU ARE NOW GOING TO PLAY A COMPUTERIZED VERSION OF BINGO--"
240 LET F=1
250 DIM B(10,10)
260 DIM L(75)
270 MAT READ A$(5)
280 DATA B ,I ,N ,G ,O
290 REM THIS SEQUENCE GENERATES THE CARD NUMBERS (LINES 240-430)
300 FOR K1=1 TO 75
310 LET L(K1)=0
320 NEXT K1
330 PRINT" "," HERE'S ";
340 IF F>1 THEN 370
350 PRINT"YOUR CARD"
360 GOTO 380
370 PRINT"MY CARD"
380 LET M=16
390 LET G=F+4
400 FOR Y=F TO G
410 FOR X=F TO G
420 LET R=INT(M*RND)
430 IF R<M-15 THEN 420
440 IF L(R)<>0 THEN 420
450 LET B(X,Y)=R
460 LET L(R)=1
470 NEXT X
480 LET M=M+15
490 NEXT Y
500 REM THIS SEQUENCE PRINTS THE CARD (LINES 440-670)
510 PRINT
520 PRINT"--B--","--I--","--N--","--G--","--O--"
530 FOR X=F TO G
540 PRINT
550 PRINT
560 PRINT
570 FOR Y=F TO G
580 IF B(X,Y)=B(F+2,F+2) THEN 610
590 PRINT B(X,Y),
600 GOTO 620
610 PRINT"FREE",
620 NEXT Y
630 NEXT X
640 PRINT
650 PRINT
660 PRINT
670 PRINT"----------------------------------------------------------------------"
680 PRINT" [TEAR OFF AFTER MACHINE AUTOMATICALLY ADVANCES PAPER]"
690 FOR K9=1 TO 9
700 PRINT
710 NEXT K9
720 IF F=6 THEN 750
730 LET F=6
740 GOTO 300
750 PRINT
760 PRINT"NOW WE'RE ALL SET TO PLAY THE GAME. USE A PENCIL TO MARK OFF"
770 PRINT"THE NUMBERS ON YOUR CARD AS THEY ARE CALLED."
780 PRINT" (PLEASE PLAY MY CARD AS WELL AS YOUR OWN)"
790 PRINT"***DON'T GET SMART. I'LL BE PLAYING BOTH YOUR CARD AND MINE"
800 PRINT" UP HERE IN DARTMOUTH. (SO, THERE--)"
810 PRINT
820 PRINT "ARE YOU READY";
830 INPUT R$
840 IF R$<>"NO" THEN 880
850 PRINT
860 PRINT"*********:HURRY UP:*********"
870 GOTO 810
880 REM
890 FOR K1=1 TO 75
900 LET L(K1)=0
910 NEXT K1
920 PRINT
930 LET B(3,3)=0
940 LET B(8,8)=0
950 REM THIS SEQUENCE GENERATES THE BINGO NUMBERS (LINES 880-1100)
960 LET U=INT(75*RND)+1
970 IF L(U)<>0 THEN 960
980 LET L(U)=1
990 PRINT
1000 IF RND > .5 THEN 1030
1010 PRINT"THE NUMBER COMES UP:",
1020 GOTO 1040
1030 PRINT"THE NEXT ONE IS:",
1040 PRINT A$(INT((U-1)/15)+1);U
1050 REM THIS IS THE "NUMBER ON CARD?" SEQUENCE (LINES 1110-1260)
1060 FOR Y=1 TO 10
1070 FOR X=1 TO 10
1080 IF B(X,Y)=U THEN 1200
1090 NEXT X
1100 NEXT Y
1110 LET F=1
1120 GOSUB 1250
1130 LET F=6
1140 GOSUB 1250
1150 IF V=0 THEN 1180
1160 IF W=1 THEN 1900
1170 GOTO 2000
1180 IF W=0 THEN 960
1190 GOTO 2080
1200 LET B(X,Y)=0
1210 GOTO 1090
1220 REM THIS IS THE BINGO DETERMINING SEQUENCE (LINES 1270-1950)
1230
1240 REM THIS IS THE VERTICAL CHECK FOR BINGO*** (LINES 1270-1430)
1250 LET G=F+4
1260 FOR Y=F TO G
1270 FOR X=F TO G
1280 IF B(X,Y)<>0 THEN 1400
1290 IF X<F+4 THEN 1390
1300 IF F=6 THEN 1350
1310 PRINT
1320 PRINT"YOU'VE GOT A B I N G O * * *"
1330 LET W=1
1340 RETURN
1350 PRINT
1360 PRINT"I'VE GOT A B I N G O * * * * *"
1370 LET V=1
1380 GOTO 1410
1390 NEXT X
1400 NEXT Y
1410 REM THIS IS THE HORIZONTAL CHECK FOR BINGO*** (LINES 1450-1610)
1420 LET G=F+4
1430 FOR X=F TO G
1440 FOR Y=F TO G
1450 IF B(X,Y)<>0 THEN 1570
1460 IF Y<F+4 THEN 1560
1470 IF F=6 THEN 1520
1480 PRINT
1490 PRINT"YOU'VE GOT A B I N G O * * *"
1500 LET W=1
1510 RETURN
1520 PRINT
1530 PRINT"I'VE GOT A B I N G O * * * * *"
1540 LET V=1
1550 GOTO 1590
1560 NEXT Y
1570 NEXT X
1580 REM THIS IS THE SLANT CHECK (M=-1) FOR BINGO*** (LINES 1620-1770)
1590 LET X=F
1600 LET Y=F
1610 IF B(X,Y)<>0 THEN 1720
1620 LET X=X+1
1630 LET Y=Y+1
1640 IF Y<F+5 THEN 1610
1650 IF Y=11 THEN 1700
1660 LET W=1
1670 PRINT
1680 PRINT"YOU'VE GOT A B I N G O * * *"
1690 RETURN
1700 PRINT"I'VE GOT A B I N G O * * * * *"
1710 LET V=1
1720 RETURN
1730 REM THIS IS THE SLANT CHECK (M=1) FOR BINGO*** (LINES 1780-1950)
1740 LET X=F+4
1750 LET Y=X
1760 IF B(X,Y)<>0 THEN 1880
1770 LET X=X-1
1780 LET Y=Y+1
1790 IF Y<F+5 THEN 1760
1800 IF Y=11 THEN 1850
1810 PRINT
1820 PRINT"YOU'VE GOT A B I N G O * * *"
1830 LET W=1
1840 RETURN
1850 PRINT
1860 PRINT"I'VE GOT A B I N G O * * * * *"
1870 LET V=1
1880 RETURN
1890 REM THIS THE TIE PRINTOUT SEQUENCE
1900 PRINT
1910 PRINT" *********** IT'S A TIE ***********"
1920 REM THIS IS THE "PLAY AGAIN?" SEQUENCE
1930 PRINT
1940 PRINT "DO YOU WANT TO PLAY AGAIN";
1950 INPUT E$
1960 PRINT
1970 IF E$="YES" THEN 240
1980 STOP
1990 REM THIS IS THE "I WIN" SEQUENCE
2000 PRINT
2010 FOR S=1 TO 6
2020 PRINT"I WIN. ";
2030 NEXT S
2040 PRINT
2050 PRINT
2060 GOTO 1930
2070 REM THIS IS THE "YOU WIN" SEQUENCE
2080 PRINT
2090 PRINT" YOU WIN..... YOU WIN....... YOU WIN......."
2100 GOTO 1930
2110 REM THIS IS THE "END" OF THE LIST OF PROGRAM ENTITLED "BINGO"
2120 END