home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 125
/
125.d81
/
b.petals
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
231 lines
1 rem 2/12/93 11:45 am
3 dv=peek(186):ifdv<8then dv=8
4 print"[147][159]":poke53280,.:poke53281,.
5 poke788,52
10 gosub60000
60 d1$="[209][209][209][209][209][209][209][209][209]"
70 d2$="[209][209][209]"
80 d3$="[209][209][209][209][209][209][209][209][209]"
90 dimrn(24):dimi$(20)
100 forl=1to2000:next
102 print"[147]"
105 poke53281,15:poke53280,15
110 i$(0)="[208][197][212][193][204][211] [193][210][207][213][206][196] [212][200][197] [210][207][211][197]"+chr$(13)
120 i$(1)="[151] [212]his is a game played with six dice."
130 i$(2)="[212]he computer rolls the dice, assesses"
140 i$(3)="the outcome, and announces a number. [193]s"
150 i$(4)="[208][207][212][197][206][212][193][212][197] [207][198] [212][200][197] [210][207][211][197][151], the computer"
160 i$(5)="knows the secret. [208]layers must"
170 i$(6)="determine the formula by which the"
180 i$(7)="[208][207][212][197][206][212][193][212][197][151] derives the number."+chr$(13)
190 i$(8)="[212]he name of the game is significant!!!"
200 i$(9)="[151][212]he announced number is always even and"
210 i$(10)="is indeed a true function of the six"
220 i$(11)="faces of the dice."+chr$(13)
230 i$(12)=" [208]ress any key to display four rolls of"
240 i$(13)="the dice along with the correct"
250 i$(14)="response that the [208][207][212][197][206][212][193][212][197] [207][198] [212][200][197] [210][207][211][197]"
260 i$(15)="[151]should give with each."+chr$(13)
270 i$(16)=" [195]an you figure out what simple system"
280 i$(17)="is used to come up with each answer?"
400 fori=0to17:printtab(20-(len(i$(i))/2))i$(i):next
405 printtab(14)"[208]ress any key"
410 geta$:ifa$=""then410
500 print"[147]"chr$(142);:gosub8000
505 poke646,0
510 forl=1to4
520 foraa=1to6
530 print"[213][192][192][192][201]";
540 next
550 print
560 forbb=1to6
570 print"[221] [221]";
580 nextbb
590 print
600 forcc=1to6
610 print"[221] [221]";
620 nextcc
630 print" = "
640 fordd=1to6
650 print"[221] [221]";
660 nextdd
670 print
680 foree=1to6
690 print"[202][192][192][192][203]";
700 nextee
710 print
720 nextl
740 x=rnd(ti)
750 rem generate dots for dice
760 forb=1to24
770 rn(b)=int(rnd(1)*6)+1
780 nextb
810 poke214,1:print
820 p=0:og$="":pp$="[156]"
830 forb=1to6
835 cc$="[156]":iffl$="y"thengosub1900
840 printcc$mid$(d1$,((rn(b)*5)-4),5);
845 ifrn(b)=3thenp=p+2
847 ifrn(b)=5thenp=p+4
848 cc$="[156]"
860 nextb
870 print
880 forb=1to6
890 printcc$mid$(d2$,((rn(b)*5)-4),5);
900 nextb
905 ifz$="s"thent1=p:p=0:print:goto930
910 print""og$;p;pp$:p=0
930 forb=1to6
935 iffl$="y"thengosub1900
940 printcc$mid$(d3$,((rn(b)*5)-4),5);
945 cc$="[156]"
950 nextb
960 print:print:print
1000 forb=7to12
1005 iffl$="y"thengosub1900
1010 printcc$mid$(d1$,((rn(b)*5)-4),5);
1015 ifrn(b)=3thenp=p+2
1017 ifrn(b)=5thenp=p+4
1018 cc$="[156]"
1020 nextb
1030 print
1040 forb=7to12
1050 printcc$mid$(d2$,((rn(b)*5)-4),5);
1060 nextb
1065 ifz$="s"thent2=p:p=0:print:goto1080
1070 print""og$;p;pp$:p=0
1080 forb=7to12
1085 iffl$="y"thengosub1900
1090 printcc$mid$(d3$,((rn(b)*5)-4),5);
1095 cc$="[156]"
1100 nextb
1110 print:print:print
1150 forb=13to18
1155 iffl$="y"thengosub1900
1160 printcc$mid$(d1$,((rn(b)*5)-4),5);
1165 ifrn(b)=3thenp=p+2
1167 ifrn(b)=5thenp=p+4
1168 cc$="[156]"
1170 nextb
1180 print
1190 forb=13to18
1200 printcc$mid$(d2$,((rn(b)*5)-4),5);
1210 nextb
1215 ifz$="s"thent3=p:p=0:print:goto1230
1220 print""og$;p;pp$:p=0
1230 forb=13to18
1235 iffl$="y"thengosub1900
1240 printcc$mid$(d3$,((rn(b)*5)-4),5);
1245 cc$="[156]"
1250 nextb
1260 print:print:print
1270 forb=19to24
1275 iffl$="y"thengosub1900
1280 printcc$mid$(d1$,((rn(b)*5)-4),5);
1285 ifrn(b)=3thenp=p+2
1287 ifrn(b)=5thenp=p+4
1288 cc$="[156]"
1290 nextb
1300 print
1310 forb=19to24
1320 printcc$mid$(d2$,((rn(b)*5)-4),5);
1330 nextb
1335 ifz$="s"thent4=p:p=0:print:goto1350
1340 print""og$;p;pp$:p=0
1350 forb=19to24
1355 iffl$="y"thengosub1900
1360 printcc$mid$(d3$,((rn(b)*5)-4),5);
1365 cc$="[156]"
1370 nextb
1375 print:print:ifz$="s"then1500
1380 poke214,21:print:print"[151] enter [144]m[146][151]ore/[144]s[146][151]olve/[144]h[146][151]int/[144]q[146][151]uit "
1400 getz$:ifz$=""then1400
1410 ifz$="m"thenfl$="n":goto500
1420 ifz$="s"then500
1430 ifz$="h"then4000
1440 ifz$="q"thenfl$="n":goto6000
1450 goto1400
1500 poke214,20:print:e$="no":poke19,65:rt$="right":wr$="[144]wrong"
1510 print"[151] first total should be [157][157][157][157]";:gosub50000:tt$=q9$:gosub4300
1515 if v$="n"then1500
1520 iftt=t1thenpoke214,2:print:poke211,30:printt1;rt$:goto1600
1530 poke214,2:print:poke211,30:print tt;wr$:gosub4100:goto1600
1600 poke214,20:print
1610 print"[151]second total should be [157][157][157][157]";:gosub50000:tt$=q9$:gosub4300
1615 if v$="n"then1600
1620 iftt=t2thenpoke214,7:print:poke211,30:printt2;rt$:goto1700
1630 poke214,7:print:poke211,30:print tt;wr$:gosub4100:goto1700
1700 poke214,20:print
1710 print"[151] third total should be [157][157][157][157]";:gosub50000:tt$=q9$:gosub4300
1715 if v$="n"then1700
1720 iftt=t3thenpoke214,12:print:poke211,30:printt3;rt$:goto1800
1730 poke214,12:print:poke211,30:print tt;wr$:gosub4100:goto1800
1800 poke214,20:print
1810 print"[151]fourth total should be [157][157][157]";:gosub50000:tt$=q9$:gosub4300
1815 if v$="n"then1800
1820 iftt=t4thenpoke214,17:print:poke211,30:printt4;rt$:goto4200
1830 poke214,17:print:poke211,30:print tt;wr$:gosub4100:goto4200
1900 ifrn(b)=3orrn(b)=5thencc$="":return
1910 cc$="[156]":return
4000 fl$="y":goto500
4100 e$="yes":return
4200 ife$="yes"thenprint"[151] whoops, better try again!":goto5000
4210 print"[151] congratulations, you got it!!!":goto5000
4300 iflen(tt$)=1thentt$=" "+tt$
4310 tt$=left$(tt$,2)
4312 iftt$=" 0"then4320
4320 tt=val(tt$):v$="y":return
5000 forx=1to3000:next:goto1380
6000 rem: quit has been entered
6010 i$(0)="[208][197][212][193][204][211] [193][210][207][213][206][196] [212][200][197] [210][207][211][197]"+chr$(13)
6020 i$(1)="[151] [193]t this point you have determined the"
6030 i$(2)=" system by which the [208][207][212][197][206][212][193][212][197][151] derives"
6040 i$(3)="the numbers -"+chr$(13)
6050 i$(4)="-[207][210]-"+chr$(13)
6060 i$(5)="[217]ou have given up on finding the secret"+chr$(13)
6070 i$(6)="-[207][210]-"+chr$(13)
6080 i$(7)="[217]ou will try again another time."+chr$(13)
6090 i$(8)="[212]o find or verify the solution, exit"
6100 i$(9)="to [204][207][193][196][211][212][193][210] and read the text."+chr$(13)
6110 i$(10)=""
6120 i$(11)=" [216][151] = [197]xit to [204][207][193][196][211][212][193][210]"+chr$(13)
6130 i$(12)=" [210][151] = [210]eturn to instructions"
6140 poke53272,23:print"[147]"
6150 fori=0to12:printtab(20-(len(i$(i))/2))i$(i):next
6160 geta$:ifa$=""then6160
6170 ifa$="x"then40000
6180 ifa$="r"then102
6200 goto6160
8000 print"[147]"
8010 print" [150][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]":poke214,24:print
8020 print" [150][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][152]"
8100 return
9999 goto9999
10000 open15,8,15,"s0:b.petals":close15:save"b.petals",8:end
40000 poke788,49
40002 a$="hello connect":fori=8to12:close2:open2,i,2:close2:ifstthen40020
40010 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then40030
40020 next:print"[147][146]":poke2048,0:poke44,8:poke53272,23:poke186,8:end
40030 poke646,peek(53281):print"[147][146]load"chr$(34)a$chr$(34)","i:poke43,1
40040 print"run":poke44,8:poke2048,0:poke631,13:poke632,13:poke198,2:end
50000 q9$="":u9=53280:poke198,0
50010 geta$
50020 poke646,rnd(1)*15+1:print"[164][157]";:ifa$=""then50010
50030 ifa$=chr$(13)thenprint" ":return
50040 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto50080
50050 iflen(q9$)>=2thent9%=peek(u9):pokeu9,1:pokeu9,t9%:goto50010
50060 ifa$<"0"ora$>"9"then50010
50070 q9$=q9$+a$
50080 print""a$;:goto5001