home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 1 #9 / utv1n9s1.d64 / matrix (.txt) < prev    next >
Commodore BASIC  |  2022-08-28  |  15KB  |  412 lines

  1. 120 :
  2. 130 rem           main program
  3. 140 :
  4. 150 rem  title screen
  5. 160 poke53280,0:poke53281,0:print"[147]"chr$(8)chr$(142);
  6. 170 print"    [176][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][174]
  7. 180 [153]"    (NULL)getlogwait* wait(NULL)def coslogwait (NULL)syslogrnd*waitcos(NULL)printget*rndwaitrnd(NULL)cont rnd*wait (NULL)opengetwaitgetgetwaitget(NULL)"
  8. 190 [153]"    (NULL)get** wait(NULL)defgetlogcoswaitget(NULL)sys getwaitget (NULL)printgetlogcoswaitcos(NULL)cont getwaitget (NULL)open rnd*wait (NULL)"
  9. 200 [153]"    (NULL)getwaitget  wait(NULL)defgetwaitgetgetwaitget(NULL)sys getwaitget (NULL)printget*logwait (NULL)cont getwaitget (NULL)open**rndwaitrnd(NULL)"
  10. 210 [153]"    (NULL)logcos newwait(NULL)deflogcoslogcos(NULL)sys logcos (NULL)printlogcoslogcos(NULL)cont newnewwait (NULL)openlogcoslogcos(NULL)"
  11. 220 [153]"    /tantantantan>tantantantan>tantantantan>tantantantan>tantantantan>tantantantanexp"
  12. 230 [153]""[163]14)"ortan=tan=tan=tan=tan^":[153][163]14)"(NULL)epeekw(NULL)k(NULL)s(NULL)m(NULL)
  13. 240 printtab(14)"[171][192][219][192][219][192][219][192][219][192][179]":printtab(14)"[221]o[221]n[221]r[221]e[221]a[221]"
  14. 250 printtab(14)"[171][192][219][192][219][192][219][192][219][192][179]":printtab(14)"[221]h[221]r[221]t[221]l[221]r[221]"
  15. 260 printtab(14)"[171][192][219][192][219][192][219][192][219][192][179]":printtab(14)"[221]v[221]d[221]u[221]p[221]c[221]"
  16. 270 printtab(14)"[171][192][219][192][219][192][219][192][219][192][179]":printtab(14)"[221]i[221]c[221]v[221]h[221]f[221]"
  17. 280 printtab(14)"[173][192][177][192][177][192][177][192][177][192][189]":print""tab(7)"[159](c) 1987   by james speers"
  18. 290 print" published by softdisk publishing, inc.";
  19. 300 fori=1to10:readx:poke55671+x,1:forj=1to300:nextj,i:tb=ti
  20. 310 rem dimensions-initialize
  21. 320 diml$(300),wl$(6,40),m$(5,5),s1(25),s2(25),lo(25),pi$(5,20)
  22. 330 poke251,19:poke252,0:poke253,3:poke254,18
  23. 350 of$=chr$(146):yr=782:pr=49180:l1$="[221] [221] [221] [221] [221] [221]":bl$=" ":lr=253
  24. 360 lc=254:v=54272:ww=49152:wl=49163:c=55416:wd=49174:q$=chr$(34)
  25. 370 l2$="[176][192][178][192][178][192][178][192][178][192][174]":l3$="[171][192][219][192][219][192][219][192][219][192][179]":l4$="[173][192][177][192][177][192][177][192][177][192][189]"
  26. 380 ls$(2)="b"+"[221]":ls$(3)="c"+"[221]":ls$(d)="4"+"[221]":ls$(5)="e"+"[221]"
  27. 390 pokewr,18:pokewc,1:pokelr,3:pokelc,20:hr$=", r to review maze":pr=65520
  28. 400 of$=chr$(146):yr=782:pr=49180:xr=781:yr=782:sr=783
  29. 420 x=rnd(-ti):fori=0to24:readq:pokev+i,q:next
  30. 430 e$(1)="not adjacent, re-do":e$(2)="already used, re-do"
  31. 440 fori=1to300:readl$(i):next:fori=0to32:readq:pokeww+i,q:next
  32. 450 x=960:fori=0to23:readq:pokex+i,q:next:fori=24to63:pokex+i,0:next
  33. 460 fori=1to5:readmx(i),my(i):next
  34. 470 fori=1to5:forj=1to20:readpi$(i,j):next:next:b$="[150]"
  35. 480 lu$="[172]":ru$="[187]":ll$="[188]":rl$="[190]"
  36. 490 bb$="[162]":fori=1to37:bb$=bb$+"[162]":next:bb$=bb$+"[146]"
  37. 500 fori=1to38:tb$=tb$+"[162]":next
  38. 510 lb$="[161][146]":rb$="[161]":fori=1to36:bl$=bl$+" ":next:br$=""+bl$+"[146]"
  39. 520 cr$=" [146][157]":dl$="[157]  [157][157]"+cr$:pc=65520
  40. 530 rem   instructions? y or n
  41. 540 print"[147]":tr=10:br=14:lc=6:rc=32:c=10:gosub2000:r=11:c=7:gosub1780
  42. 550 print"[159]do you need instructions?":r=13:c=17:gosub1780
  43. 560 print"(y/n)":gosub1800:s1=89:s2=78
  44. 565 gosub1820
  45. 570 ongngoto565,565,2050,565,565,580,600,565,565
  46. 580 pn=1:gosub2170
  47. 590 rem  get number of players
  48. 600 print"[147]"
  49. 610 tr=8:br=14:lc=12:rc=26:c=10:gosub2000:r=9:c=15:gosub1780
  50. 620 print"[159]number of":r=11:c=13:gosub1780
  51. 630 print"players (1-6)":r=13:c=19:gosub1780:print"?":gosub1780
  52. 640 gosub1800:l1=49:h1=54
  53. 645 gosub1820
  54. 650 ongngoto645,645,2050,670,645,645,645,645,645
  55. 660 rem  enter player names
  56. 670 np=asc(z$)-48:fori=1tonp
  57. 680 tr=9:br=13:lc=10:rc=28:c=10:gosub2000:r=10:c=14:gosub1780
  58. 690 print"[159]player #";i:r=12:c=11:gosub1780
  59. 700 print"name:[163][163][163][163][163][163][163][163][163][163][163][163]":c=16:gosub1780
  60. 710 il=12:gosub2340:pn$(i)=in$
  61. 720 nexti:print
  62. 730 rem  get length of turn
  63. 740 tr=8:br=16:lc=12:rc=25:c=10:gosub2000:r=9:c=13:gosub1780
  64. 750 print"[159]how long for":r=11:c=14:gosub1780
  65. 760 print"each turn?":r=13:c=16:gosub1780
  66. 770 print"[163][163][145] min":r=15:gosub1780:print"[163][163][145] sec"
  67. 780 r=13:c=16:gosub1780:il=2:gosub2340:ifval(in$)<0orval(in$)>59then740
  68. 790 mi=val(in$):r=15:c=16:gosub1780:il=2:gosub2340
  69. 800 ifval(in$)<0orval(in$)>59then740
  70. 810 se=val(in$):tx=3600*mi+60*se
  71. 820 gosub2410
  72. 830 rem start player's turns
  73. 840 forp=1tonp:pokewr,18:pokewc,1:poke253,3:poke254,20:ww$="":nw(p)=1
  74. 850 print"[147]":x$=pn$(p)+"'s turn":r=10:c=int((40-len(x$))/2):gosub1780
  75. 860 print"[159]"x$"[150]":r=11:gosub1780:fori=1tolen(x$):print"[163]";:next:r=13:c=13
  76. 870 gosub1780:print"[159]hit s to start[150]":r=14:gosub1780:fori=1to14:print"[163]";:next
  77. 880 getz$:ifz$=""orz$<>"s"then880
  78. 890 rem print playing screen
  79. 900 gosub2430:print"";:r=7:c=1:gosub1780:fori=1to5:forj=1to5
  80. 910 printm$(i,j)"";:nextj:print:r=r+2:gosub1780:nexti
  81. 920 rem activate sprite-set time-play
  82. 930 poke2040,15:poke53248,72:poke53249,146:poke53269,1:poke53287,5
  83. 940 tm=ti+tx:mr=3:mc=3
  84. 950 rem read joystick
  85. 960 forz=1to30:nextz:jy=peek(56320):if(jyand16)=0thengosub2510:goto1030
  86. 970 jy=jyand15:if(jyand1)=0thenmr=mr-1:ifmr<1thenmr=1
  87. 980 if(jyand2)=0thenmr=mr+1:ifmr>5thenmr=5
  88. 990 if(jyand4)=0thenmc=mc-1:ifmc<1thenmc=1
  89. 1000 if(jyand8)=0thenmc=mc+1:ifmc>5thenmc=5
  90. 1010 poke53248,mx(mc):poke53249,my(mr)
  91. 1020 rem check function keys
  92. 1030 getz$:gosub1970:ifz$="[166]"thenprint"[147]":ds=1500:gosub2620:goto1110
  93. 1040 ifz$=""then960
  94. 1050 ifz$="[133]"thengosub2650:goto960
  95. 1060 ifz$="[134]"thengosub2680:goto960
  96. 1070 ifz$="[135]"thengosub2750:goto960
  97. 1080 ifz$="[136]"thengosub2790:goto960
  98. 1090 ifz$="[140]"then2050
  99. 1100 goto960
  100. 1110 poke53269,0:gosub2820:gosub2840:nextp
  101. 1120 print"[147]":tr=11:br=13:lc=14:rc=25:c=10:gosub2000
  102. 1130 rem mark duplicates with other players
  103. 1140 r=12:c=15:gosub1780:print"[159]scoring...":print""
  104. 1150 ifnp=1then1220
  105. 1160 forp=1tonp-1:forw=1tonw(p):cm$=wl$(p,w):ifleft$(cm$,1)="*"then1200
  106. 1170 forp2=p+1tonp:forw2=1tonw(p2):ifcm$<>wl$(p2,w2)then1190
  107. 1180 wl$(p2,w2)="*"+wl$(p2,w2):ifleft$(wl$(p,w),1)<>"*"thenwl$(p,w)="*"+wl$(p,w)
  108. 1190 nextw2,p2
  109. 1200 nextw,p
  110. 1210 rem print word lists for deletions
  111. 1220 print"[147]":poke53280,10:poke53281,6:print""
  112. 1230 forp=1tonp
  113. 1240 print"[147]":c=(40-(len(pn$(p))+7))/2:r=1:gosub1780:print""pn$(p)"'s list"
  114. 1250 r=2:gosub1780:print"[150]";:fori=1tolen(pn$(p))+7:print"[163]";:nexti
  115. 1260 poke253,4:poke254,7:fori=1tonw(p):syswl:print"";:ifi<10thenprint" ";
  116. 1270 print"";i;"[146]"wl$(p,i):ifpeek(253)=21thenpoke253,4:poke254,24
  117. 1280 next:r=21:c=3:gosub1780:printtab(12)"deletions? (y/n)";
  118. 1290 getz$:ifz$=""or(z$<>"y"andz$<>"n")then1290
  119. 1300 ifz$="n"then1340
  120. 1310 print:printtab(13)"enter number [146]";:gosub1800
  121. 1315 l1=48:h1=57:il=2:in$="":ct=0:poke204,0
  122. 1320 gosub2350:x=val(in$)
  123. 1325 if x>40 then 1340
  124. 1327 if left$(wl$(p,x),1)<>"*" then wl$(p,x)="*"+wl$(p,x)
  125. 1329 goto1240
  126. 1330 rem calculate and print scores
  127. 1340 print"[147]"
  128. 1350 c=(40-(len(pn$(p))+8))/2:r=1:gosub1780:print""pn$(p)"'s score"
  129. 1360 r=2:gosub1780:print"[150]";:fori=1tolen(pn$(p))+8:print"[163]";:nexti
  130. 1370 poke253,3:poke254,2:tb=18
  131. 1380 tl(p)=0:forw=1tonw(p):ifleft$(wl$(p,w),1)="*"thens=0:s$="0":goto1400
  132. 1390 x=len(wl$(p,w))-3:s=int((x*(x+1))/4+.55):s$=str$(s):tl(p)=tl(p)+s
  133. 1400 syswl:print""wl$(p,w);tab(tb-len(s$));s$
  134. 1410 if(peek(253))=21thenpoke253,3:poke254,22:tb=38
  135. 1420 nextw
  136. 1430 s$=str$(tl(p)):cm(p)=cm(p)+tl(p):r=22:c=2:gosub1780
  137. 1440 print"total"tab(18-len(s$));s$:r=23:c=11:gosub1780
  138. 1450 print"[150]hit c to continue[146]";
  139. 1460 getz$:ifz$=""orz$<>"c"then1460
  140. 1470 nextp
  141. 1480 rem print summary screen
  142. 1490 poke53280,6:poke53281,0:lc=3:rc=36:tr=5-int((np+1)/2):br=17+int(np/2):c=10
  143. 1500 gosub2000:tr=tr+1:br=br-1:lc=lc+1:rc=rc-1:c=3:gosub2010
  144. 1510 tr=tr+1:br=br-1:lc=lc+1:rc=rc-1:c=10:gosub2010
  145. 1520 r=tr:c=lc:gosub1780:fori=1to9+np
  146. 1530 print"                              [146]":r=r+