home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 35 / 035.d81 / hexapuzzler (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  70 lines

  1. 1 ifx=0thengosub1500
  2. 100 ifx=0thenx=1:load"text.2.o",8,1
  3. 110 ifx=1thenx=2:load"font3",8,1
  4. 120 ifx=2thenx=3:load"slider.lnk",8,1
  5. 130 ifx=3thenx=4:load"unpacker",8,1
  6. 140 ifx=4thenx=5:load"hand.spr",8,1
  7. 145 gosub1700:poke249,224:poke250,204:dima%(16):sys51459
  8. 170 poke828,0:poke829,39:poke830,0:poke831,24:sys49152:sys49158,22:poke828,1:poke829,38:poke830,1:poke831,23:sys49152:sys49158,1:poke828,9:poke829,30:poke830,3:poke831,16:sys49152:sys49158,18:sys49161,"move hand with",12,20,0:poke829,38:sys49161,"joystick or cursor keys",8,21,0
  9. 230 sys49161,"[press 'q' to quit]",10,22,1:poke251,0:poke252,64:poke253,32:poke254,8:poke255,16:sys51462:xp=3.34:v=53248:poke1016+52224,24:pokev+39,0:pokev,99:pokev+1,90:pokev+29,0:pokev+23,0:pokev+16,0:pokev+21,1:forx=1to16:a%(x)=x:next:forx=1to16:r1=rnd(1)*16+1:r2=rnd(1)*16+1:t=a%(r1):a%(r1)=a%(r2)
  10. 330 a%(r2)=t:next:xp=2:yp=1:fl=0:forx=0to15:ifa%(x+1)<>x+1thenfl=1
  11. 370 ifint(x/4)=x/4thenyp=yp+3:xp=2
  12. 380 poke251,0:poke252,64:poke253,xp*5:poke254,yp:poke255,a%(x+1)-1:sys51462:ag=3.34:xp=xp+1:next:ro=0:co=1
  13. 440 fl=0:forx=0to15:ifa%(x+1)<>x+1thenfl=1
  14. 470 ifa%(x+1)=16thenbl=x
  15. 480 next:iffl=0thensys49161,"you won!!",15,0,0:goto1350
  16. 510 j=56320
  17. 520 gosub910:a=co+ro*4:br=int(bl/4):bc=bl-4*br:bc=bc+1:if(br<>roandbc<>co)ora%(a)=16then840
  18. 650 ifbr<>rothen770
  19. 660 ifbc>cothenb=bc:e=co+1:i=-1
  20. 670 ifbc<cothenb=bc:e=co-1:i=1
  21. 680 forx=btoestepi:t=ro*4+x:f=ro*4+x+i:a%(t)=a%(f):poke254,4+ro*3:poke253,5+x*5:poke255,a%(t)-1:sys51462:poke254,4+ro*3:poke253,5+(x+i)*5:poke255,15:sys51462:next:ag=3.34:a%(ro*4+x)=16:goto440
  22. 770 ifbc<>cothen830
  23. 780 ifbr>rothenb=br:e=ro+1:i=-1
  24. 790 ifbr<rothenb=br:e=ro-1:i=1
  25. 800 forx=btoestepi:t=x*4+co:f=(x+i)*4+co:a%(t)=a%(f):poke253,5+co*5:poke254,4+x*3:poke255,a%(t)-1:sys51462:poke253,5+co*5:poke254,4+(x+i)*3:poke255,15:sys51462:ag=3.34:next:a%(x*4+co)=16:goto440
  26. 830 :
  27. 840 sys49161,"illegal move",13,0,0:sys49167,1000,33,15,15:fordl=1to500:next:sys49167,0,32,0,0:sys49161,"            ",13,0,0:goto520
  28. 890 sys51459:stop
  29. 891 pokev+21,0:pokev+16,0:print"[147]":sys51459:open15,8,15,"r0:hello connect=hello connect":input#15,er:close15:ifer<>63thenend
  30. 896 load"hello connect",8:end
  31. 910 :
  32. 920 if(peek(198)=0)and(peek(j)=127)then920
  33. 930 geta$:js=peek(j):ifjs=111ora$=chr$(13)thenreturn
  34. 940 ifa$="q"ora$="[209]"thengosub1220:goto920
  35. 950 ifa$=""orjs=119thenco=co+1
  36. 960 ifa$="[157]"orjs=123thenco=co-1
  37. 970 ifa$=""orjs=125thenro=ro+1
  38. 980 ifa$="[145]"orjs=126thenro=ro-1
  39. 990 ifjs=118thenco=co+1:ro=ro-1
  40. 1000 ifjs=117thenco=co+1:ro=ro+1
  41. 1010 ifjs=121thenco=co-1:ro=ro+1
  42. 1020 ifjs=122thenco=co-1:ro=ro-1
  43. 1050 ifco<1thenco=1
  44. 1060 ifro<0thenro=0
  45. 1070 ifro>3thenro=3
  46. 1075 qf=0:ifco>4then1120
  47. 1090 pokev,60+co*39:pokev+1,90+ro*24:pokev+16,0:goto920
  48. 1120 pokev+21,0:pokev,17:pokev+16,1:pokev+1,132:pokev+21,1
  49. 1150 ifpeek(198)=0andpeek(j)=127then1150
  50. 1160 geta$:js=peek(j):ifa$="[157]"orjs=123orjs=122orjs=121thenqf=0:co=4:goto1090
  51. 1190 ifa$="q"ora$="[209]"ora$=chr$(13)ora$=" "orjs=111thengosub1220
  52. 1200 goto1150
  53. 1220 :
  54. 1230 sys49161,"are you sure you want to quit?",5,0,0:forx=1to100:ifpeek(198)=0thennext
  55. 1250 ifpeek(198)<>0then1310
  56. 1260 sys49161,"                              ",5,0,0:fory=1to100:ifpeek(198)=0thennext
  57. 1280 ifpeek(198)<>0then1310
  58. 1290 goto1230
  59. 1310 geta$:ifa$<>"y"anda$<>"[217]"thensys49161,"                              ",5,0,0:return
  60. 1340 goto1420
  61. 1350 forx=1000to20000step500:sys49167,x,33,15,15:next:forx=1000to20000step500:sys49167,x,33,15,15:next:forx=1000to20000step500:sys49167,x,33,15,15:next:sys49167,0,32,0,0:fordl=1to100:next
  62. 1420 sys49161,"  do you want to play again?  ",5,0,0
  63. 1430 poke198,0:wait198,1:geta$:ifa$="y"ora$="[217]"then170
  64. 1450 ifa$<>"n"anda$<>"[206]"then1430
  65. 1460 goto891
  66. 1500 print"[147]"chr$(142):poke53281,1:poke53280,5:print"                             ":print"           loadstar presents [144] ":print"                             [144] ":print"                              ":print:print:print:print:print"                                 
  67. 1600 [153]"             hexapuzzler         stop ":[153]"                                 stop ":[153]"        written by alan gardner  stop ":[153]"                                 stop ":[153]"                                  ":[153]:[153]"              (c) 1987":[153]
  68. 1680 [153]"     loadstar is not public domain":[153]"  please respect the author's rights.":[142]
  69. 1700 [153]:[153]"                           ":[153]"             press any key stop ":[153]"                           stop ":[153]"                            ";:[153]"";:[151]198,0:[146]198,1:[151]198,0:[142]
  70.