home *** CD-ROM | disk | FTP | other *** search
- 10 rem *** bingo
- 11 rem *** by john beltrami
- 12 rem *** translated for the commodore
- 13 rem *** by donna k. woody
- 20 s$=" ":dima(5,5),b(75)
- 30 poke53281,1:poke53280,15:printchr$(144)
- 40 poke783,peek(783)and254
- 50 gosub3000:rem *** openers
- 100 rem *** main menu ***
- 110 printchr$(147)
- 115 poke781,1:poke782,13:sys65520:print"* * * * * * * *"
- 120 poke781,3:poke782,13:sys65520:print" b i n g o "
- 125 poke781,5:poke782,13:sys65520:print"* * * * * * * *[144]"
- 130 poke781,8:poke782,10:sys65520:print"1 - instructions"
- 140 poke781,10:poke782,10:sys65520:print"2 - print bingo cards"
- 150 poke781,12:poke782,10:sys65520:print"3 - start the game"
- 160 poke781,14:poke782,10:sys65520:print"4 - quit"
- 170 poke781,20:poke782,0:sys65520:print"your choice - ";
- 180 poke198,0:wait198,1:gety$:y=val(y$)
- 200 ify=4then4000:rem *** end
- 210 ify=3then1000:rem *** game
- 220 ify=2then500:rem *** cards
- 230 ify=1then5000:rem *** instructions
- 235 goto170
- 498 :
- 499 rem *** cards
- 500 printchr$(147)
- 520 poke781,2:poke782,0:sys65520
- 525 input"how many bingo cards do you need";y$
- 527 n=val(y$):ifn<1then900
- 530 poke781,4:poke782,0:sys65520:print"output these cards to the (p[144])rinter"
- 535 print" or to the (s[144])creen?";
- 536 poke198,0:wait198,1:getp$:printp$
- 540 ifp$="p"thenopen4,4:cmd4:goto550
- 545 ifp$<>"s"thengoto530
- 548 :
- 549 rem *** routine
- 550 fornn=1ton
- 600 fori=1to75:b(i)=0:nexti
- 620 fori=1to5
- 630 ll=i*15-15
- 640 forj=1to5
- 650 k=int(rnd(1)*15+1)
- 660 r=k+ll
- 670 ifb(r)>0thengoto650
- 680 b(r)=1
- 690 a(i,j)=r
- 700 nextj
- 710 nexti
- 720 print:print:print
- 730 print" b i n g o"
- 735 print
- 740 forj=1to5
- 750 f$=""
- 760 fori=1to5
- 770 ifi=3andj=3then850
- 780 c$=str$(a(i,j))
- 790 l=len(c$):ifl<3thenc$=" "+c$
- 800 f$=f$+s$+c$+s$
- 810 goto860
- 850 f$=f$+" free "
- 860 nexti
- 870 printf$:print
- 880 nextj
- 885 ifp$<>"p"thenprint:print"press <return>[160]";:poke198,0:wait198,1:gety$
- 890 nextnn
- 895 ifp$="p"thenprint#4:close4
- 900 goto100
- 998 :
- 999 rem *** game
- 1000 printchr$(147)
- 1020 print" b i n g o"
- 1030 print
- 1040 t=0
- 1050 fori=1to75:b(i)=0:nexti
- 1060 poke781,19:poke782,9:sys65520:print"last number:"
- 1065 poke781,19:poke782,25:sys65520:print"<--"
- 1100 poke781,20:poke782,5:sys65520:print"<return> for next number"
- 1110 poke781,21:poke782,5:sys65520:print"<q> to quit game"
- 1115 ift>74then1400
- 1119 poke781,19:poke782,22:sys65520
- 1120 poke198,0:wait198,1:gety$:ify$=chr$(13)then1200
- 1130 ify$<>"q"then1110
- 1140 poke781,23:poke782,5:sys65520:print"are you sure?[160]";:poke198,0:wait198,1:gety$
- 1150 ify$<>"y"thenpoke781,23:poke782,1:sys65520:forx=1to38:print" ";:next:goto1100
- 1160 goto100
- 1200 r=int(75*rnd(1)+1)
- 1210 ifb(r)>0then1200
- 1212 b(r)=1
- 1213 t=t+1
- 1215 h1=1
- 1220 ifr>15thenh1=2
- 1230 ifr>30thenh1=3
- 1240 ifr>45thenh1=4
- 1250 ifr>60thenh1=5
- 1260 h=h1*5-1
- 1270 v=r-(h1-1)*15+2
- 1280 r$=str$(r):l=len(r$):ifl<3thenr$=" "+r$
- 1300 poke781,v:poke782,h:sys65520:printr$
- 1320 poke781,19:poke782,22:sys65520:printr$
- 1330 goto1100
- 1398 :
- 1399 rem *** numbers exhausted
- 1400 poke781,22:poke782,5:sys65520
- 1410 print"all numbers have been called!"
- 1415 poke781,23:poke782,1:sys65520
- 1425 print"press <space bar> to continue.";
- 1430 poke198,0:wait198,1:gety$:ify$<>" "then1415
- 1440 goto100
- 1900 goto100
- 2998 :
- 2999 rem *** openers
- 3000 printchr$(147)
- 3010 poke783,peek(783)and254
- 3020 poke781,1:poke782,13:sys65520
- 3030 print"john beltrami"
- 3040 poke781,4:poke782,13:sys65520
- 3050 print" presents"
- 3055 poke781,7:poke782,16:sys65520:print"b i n g o"
- 3060 h=14:v=6
- 3110 fork=16to24step2
- 3120 forj=8to16step2
- 3125 poke781,j:poke782,k:sys65520
- 3130 print" [144]";
- 3140 nextj:nextk
- 3170 gosub3400:print"b"
- 3175 gosub3300
- 3180 gosub3400:print"[156]i"
- 3185 gosub3300
- 3190 gosub3400:print"[158]n"
- 3195 gosub3300
- 3200 gosub3400:print"[149]g"
- 3205 gosub3300
- 3210 gosub3400:print"[152]o[144]"
- 3215 gosub3300
- 3230 poke781,20:poke782,13:sys65520:print"copyright 1984"
- 3240 poke781,22:poke782,6:sys65520:print"press <space bar> to continue";
- 3245 poke198,0:wait198,1:gety$
- 3254 y=rnd(1)
- 3260 ify$<>" "then3240
- 3270 return
- 3298 :
- 3299 rem *** delay
- 3300 forj=1to300:nextj
- 3350 return
- 3398 :
- 3399 rem *** format
- 3400 h=h+2
- 3420 v=v+2
- 3430 poke781,v:poke782,h:sys65520
- 3490 return
- 3998 :
- 3999 rem *** end
- 4000 printchr$(147)
- 4020 poke781,6:poke782,15:sys65520:print"thanks for"
- 4030 print"playing"
- 4040 print"b i n g o !"
- 4050 print"load"chr$(34)"payload"chr$(34)",8":print"run"
- 4055 poke631,13:poke632,13:poke198,2:end
- 4998 :
- 4999 rem *** instructions
- 5000 printchr$(147)
- 5020 print"bingo is a simple game that requires":print
- 5022 print"you to mark your card as numbers are":print
- 5024 print"called out. you can play bingo with":print
- 5026 print"any standard bingo cards. if you need":print
- 5028 print"cards, consult the <print> option on":print
- 5030 print"the main menu after you complete this":print
- 5032 print"section."
- 5040 poke781,23:poke782,4:sys65520:print"press <space bar> to continue."
- 5042 poke198,0:wait198,1:gety$:ify$<>" "then5040
- 5050 printchr$(147)
- 5060 print"bingo is played by completing any row":print
- 5062 print"or column of 5 numbers (or 'free spot')":print
- 5064 print"with a mark. diagonals also win. some":print
- 5066 print"people use variations that include":print
- 5068 print"inner and outer squares, four corners,":print
- 5072 print"and others. this program does not care":print
- 5074 print"how you play!!!!"
- 5076 poke781,23:poke782,4:sys65520:print"press <space bar> to continue."
- 5077 poke198,0:wait198,1:gety$:ify$<>" "then5040
- 5090 printchr$(147)
- 5100 print"bingo will randomly call out the":print
- 5102 print"numbers until you indicate that someone":print
- 5104 print"has won. called numbers are":print
- 5106 print"continuously displayed.":print
- 5108 print" g o o d - l u c k !"
- 5200 poke781,23:poke782,4:sys65520:print"press <space bar> to continue."
- 5210 poke198,0:wait198,1:gety$:ify$<>" "then5040
- 5250 printchr$(147)
- 5900 goto100
- 63000 rem link back
- 63010 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
- 63020 poke198,0:poke631,13:poke632,13:poke198,2:end
-