home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 44
/
044.d81
/
jump!
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
7KB
|
284 lines
10 poke53281,.:poke53280,2:printchr$(14)
20 gosub2450
30 print"[147][159] [202]ump![159] "
40 s=54272:js=56320:dimtn(12):bc=0
50 fori=1to24:pokes+i,0:next
60 fori=1to12:readtn(i):next
70 pz=1:x=1154:iffl=1thengosub990
80 iffl=2thengosub1130
90 poke53281,bc:tn=0:gosub540:x=1523
95 printchr$(142);
100 onpzgosub1400,1430,1530,2000,2090,1630,1720,1820,1910,2180,2280,2340
110 mk=0
120 pokex,peek(x)+128
130 pokex,peek(x)-128
140 joy=15-(peek(js)and15):fb=peek(js)and16:getk$
150 ifjoy=8ork$=""thengosub900
160 ifjoy=4ork$="[157]"thengosub920
170 ifjoy=1ork$="[145]"thengosub940
180 ifjoy=2ork$=""thengosub960
190 iffb=0ork$=chr$(13)then230
195 ifk$<>"[133]"then200
196 bc=bc+1:ifbc>15thenbc=0
197 ifbc=1orbc=6orbc=7thenbc=bc+1:goto197
198 poke53281,bc
200 ifk$="[140]"thenpz=1:x=1154:gosub1130:goto90
210 pokex,peek(x)+128:fort=1to50:next
220 goto130
230 gosub850:mk=mk+1:p=peek(x+s)and15
240 ifmk=1andp=1thengosub780:goto120
250 ifmk=1andp=6thena=x:pokea+s,7:q=p:goto120
260 b=x
270 pp=peek(b+s)and15:ifpp<>1thengosub780:goto120
280 c=abs(a-b):t=0
290 ifa>bthend=1:rem less
300 ifb>athend=0:rem more
310 ifc=6thent=t+1:v=3
320 ifc=240thent=t+1:v=120
330 ift=0thengosub780:goto120
340 ifd=1thenz=b+v
350 ifd=0thenz=a+v
360 if(peek(z+s)and15)<>6thengosub780:goto120
370 pokez+s,1:tn=tn+1
380 pokea+s,1:pokeb+s,6
390 iftn<tn(pz)then110
400 pokex+s,1
410 fori=1to10
420 print""tab(10)"solved!"
430 gosub850
440 print""tab(10)"[159]solved!"
450 next
460 print""tab(13)"press"
470 print""tab(13)"[153]space"
480 getk$
490 print""tab(13)"[156]space"
500 ifk$<>" "then470
510 pz=1:x=1154:gosub1130:goto90
520 end
530 :
540 a$=" ":b$=" [209] ":c$=" "
550 print"[147]";chr$(142)
560 gosub680:gosub730
570 fori=1to3
580 printtab(9):forj=1to7:printa$;:next:print
590 printtab(9):forj=1to7:printb$;:next:print
600 printtab(9):forj=1to7:printc$;:next:print
610 next
620 gosub730:gosub680
630 print""tab(28)"[176][192][192][192][192][192][192][192][192][174]"
640 printtab(28)"[221]f1 color[221]"
645 printtab(28)"[221]f8 quit[221]"
650 printtab(28)"[173][192][192][192][192][192][192][192][192][189]"
660 return
670 :
680 printtab(15):forj=1to3:printa$;:next:print
690 printtab(15):forj=1to3:printb$;:next:print
700 printtab(15):forj=1to3:printc$;:next:print
710 return
720 :
730 printtab(12):forj=1to5:printa$;:next:print
740 printtab(12):forj=1to5:printb$;:next:print
750 printtab(12):forj=1to5:printc$;:next:print
760 return
770 :
780 print"[159]illegal move!"
790 fort=1to1000:next
800 print" "
810 ifmk=2thenpokea+s,q
820 mk=0
830 return
840 :
850 pokes+24,15:pokes+5,9
860 pokes+4,17:pokes+1,17:pokes,50
870 fort=1to50:next
880 pokes+4,16:return
890 :
900 x=x+3:ifpeek(x)<>81thenx=x-3
910 return
920 x=x-3:ifpeek(x)<>81thenx=x+3
930 return
940 x=x-120:ifpeek(x)<>81thenx=x+120
950 return
960 x=x+120:ifpeek(x)<>81thenx=x-120
970 return
980 :
990 poke53281,0:print" [212]he object of these puzzles is to
1000 [153]" remove all the pegs on the grid but
1010 print" one. [217]ou may jump horizontally or
1015 [153]" vertically.
1020 print" [194]lue balls represent the pegs and
1030 [153]" white balls represent the empty "
1031 [153]" holes.
1040 print" [213]se the joystick ([208]ort 2) or the"
1050 print" cursor keys to move around the board."
1060 print" [205]ark the peg that you want to jump"
1070 print" by pushing the [198][201][210][197] button or by"
1071 print" pressing [210][197][212][213][210][206]."
1072 print" [212]hen move to the empty hole you want"
1073 print" to jump to and push the button or"
1074 print" press [210][197][212][213][210][206].
1080 [153]" (NULL)ress defasc8 at any time to quit.
1090 remprinttab(6)"[156][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
1100 printtab(6)"[153] [208]ress [158][211][208][193][195][197][194][193][210][153] to play. "
1110 remprinttab(6)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
1120 getk$:ifk$<>" "then1120
1130 printchr$(14);:print"[147][159] [202]ump![159] "
1135 poke53281,0
1140 printtab(10)"* [211]olitaire
1150 [153][163]12)"lenross right$
1160 printtab(12)"[195]ross [201][201]
1170 [153][163]12)"lenross right$right$right$
1180 printtab(12)"[195]ross [201][214]
1190 [153][163]12)"(NULL)he valleven
1200 printtab(12)"[208]yramid [201]"
1210 printtab(12)"[208]yramid [201][201]"
1220 printtab(12)"[212]he [204]amp"
1230 printtab(12)"[212]he [196]iamond"
1240 printtab(12)"[212]he [207]ctagon"
1250 printtab(12)"[212]he [208]entagon"
1260 printtab(12)"[197]xit [208]rogram"
1270 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
1280 print"[221][153] [205]ove the asterisk ([158]*[153]) with joystick [221]";
1290 print"[221][153] or cursor keys and press either [221]";
1295 print"[221][153] [158][198][201][210][197][153] or [158][210][197][212][213][210][206][153] to select. [221]";
1300 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
1310 jo=15-(peek(js)and15):pokex,32:pokex+s,14:getk$
1320 ifjo=1ork$="[145]"thenx=x-40:pz=pz-1:ifpz<1thenx=1634:pz=13
1330 ifjo=2ork$=""thenx=x+40:pz=pz+1:ifpz>13thenx=1154:pz=1
1340 pokex,42:pokex+s,14
1350 fb=peek(js)and16:iffb=0ork$=chr$(13)then1370
1360 goto1310
1370 gosub850:ifpz<>13thenreturn
1375 print"[145][145][145][145][145][145][145] [193]re you sure you want to quit? ([159][217]/[159][206])"
1376 geta$:ifa$<>"y"anda$<>"n"then1376
1377 ifa$="n"thenpz=1:x=1154:goto1130
1380 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
1385 ifer<>63thenend
1390 load "hello connect",8
1400 print"[159] solitaire[159] "
1410 pokex+s,1:return
1420 :
1430 print"[159] cross i[159] "
1440 printtab(16)"[209][209][209]"
1450 printtab(13)"[209][209][209][209]"
1460 printtab(10)"[209][209][209][209]"
1470 printtab(10)"[209][209][209][209][209][209]"
1480 printtab(10)"[209][209][209][209][209][209]"
1490 printtab(13)"[209][209][209][209][209]"
1500 printtab(16)"[209][209][209]"
1510 return
1520 :
1530 print"[159] cross ii[159] "
1540 printtab(16)"[209][209][209]"
1550 printtab(13)"[209][209][209][209]"
1560 printtab(10)"[209][209][209][209][209][209]"
1570 printtab(10)"[209][209]"
1580 printtab(10)"[209][209][209][209][209][209]"
1590 printtab(13)"[209][209][209][209]"
1600 printtab(16)"[209][209][209]"
1610 return
1620 :
1630 print"[159] the eleven[159] "
1640 printtab(13)"[209][209]"
1650 printtab(10)"[209][209][209][209]"
1660 printtab(10)"[209][209][209][209][209]"
1670 printtab(10)"[209][209][209][209][209][209][209]"
1680 printtab(13)"[209][209][209][209][209]"
1690 printtab(16)"[209][209][209]"
1700 return
1710 :
1720 print"[159] pyramid i[159] "
1730 printtab(16)"[209][209][209]"
1740 printtab(13)"[209][209][209][209][209]"
1750 printtab(10)"[209][209][209][209][209][209]"
1760 printtab(10)"[209][209][209][209]"
1770 printtab(10)"[209][209]"
1780 printtab(13)"[209][209][209][209][209]"
1790 printtab(16)"[209][209][209]"
1800 return
1810 :
1820 print"[159] pyramid ii[159] "
1830 printtab(16)"[209][209][209]"
1840 print