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

  1. 10 rem   battleship booter/instructions
  2. 20 rem   copyright (c) 1987  mike cooke
  3. 30 rem   published by uptime!
  4. 41 poke52,56:poke56,56:clr
  5. 50 poke53280,0:poke53281,0
  6. 60 rem
  7. 70 rem    *** load charset ***
  8. 80 rem         made  with
  9. 90 rem       alpha-designer
  10. 100 rem
  11. 110 gt=14335
  12. 120 open15,8,15,"i0"
  13. 130 open1,8,2,"0:battledata1,s,r"
  14. 140 gosub1330:ife=1thenclose1:close15:gosub1380:run
  15. 150 fort=1to104*8
  16. 160 input#1,nu:gt=gt+1:pokegt,nu
  17. 170 next
  18. 180 close1:close15
  19. 185 print"[147][142][158]"tab(9)"one moment, please...
  20. 190 [129]t[178]1[164](256[171]104)[172]8:gt[178]gt[170]1:[151]gt,0:[130]t
  21. 210 gt[178]14336:[129]t[178]160[172]8[164]161[172]8[171]1:[151]gt[170]t,255:[130]
  22. 230 [151]53272,([194](53272)[175]240)[176]14
  23. 240 [156]
  24. 250 pp[178]831:[129]t[178]1[164]127:[135]by:[151]t[170]pp,by:[130]
  25. 260 v[178]53248:[151]v[170]21,3:[151]2040,13:[151]2041,14:[151]v[170]39,12:[151]v[170]40,12
  26. 270 [151]v[170]28,3:[151]v[170]37,11:[151]v[170]38,8
  27. 280 [151]v[170]2,74:[151]v[170]3,145:[151]v,255:[151]v[170]1,145
  28. 285 [153][199](8);[199](14)
  29. 290 [153]"listload                           "
  30. 300 [153]"              "
  31. 310 [153]"              "
  32. 320 [153]"                    "
  33. 330 [153]"             "
  34. 340 [153]"             "
  35. 350 [153]"                      "
  36. 360 [153]:[153][163]25)" "
  37. 370 [153][163]11)"         "
  38. 380 [153][163]11)"         "
  39. 390 [153][163]11)"         "
  40. 400 [153][163]11)"          "
  41. 410 [153][163]11)"      "
  42. 420 [153][163]11)"       "
  43. 430 [153]:[153]:[153][163]6)"opencopyright / 1987 mike cooke"
  44. 440 [153]:[153]" contpublished by softdisk publishing, inc.
  45. 450 print:print"press c to cont * f8 to return to uptime"
  46. 460 geta$:ifa$=""then460
  47. 470 ifa$="c"thenpokev+21,0:goto700
  48. 480 ifa$<>"[140]"then460
  49. 490 pokev+21,0
  50. 500 rem
  51. 510 rem *** return to uptime ***
  52. 520 rem
  53. 530 sys 8*4096+4
  54. 610 rem
  55. 620 rem    *** sprite data ***
  56. 630 rem
  57. 640 data 0,32,0,0,32,0,0,168,0,0,136,0,0,136,0,1,85,0,1,85,0,61,85,0
  58. 650 data 10,85,64,6,169,64,5,169,64,5,169,64,169,85,168,86,154,84,85,101
  59. 660 data 84,21,85,80,5,85,64,5,85,64,1,85,0,1,85,0,0,84,0,0
  60. 670 data 0,32,0,0,32,0,0,168,0,0,136,0,0,136,0,1,85,0,1,85,0,1,85,240,5
  61. 680 data 86,128,5,170,64,5,169,64,5,169,64,169,85,168,86,154,84,85,101,84
  62. 690 data 21,85,80,5,85,64,5,85,64,1,85,0,1,85,0,0,84,0
  63. 700 rem
  64. 710 rem    *** instructions ***
  65. 720 rem
  66. 730 print"[147][155]  do you wish to see the instructions?"
  67. 735 printtab(17)"y or n?"
  68. 740 geta$:ifa$=""then740
  69. 741 ifa$="n"then1280
  70. 750 ifa$<>"y"then740
  71. 760 print"[147]                            "
  72. 770 print"             [146] [155]instructions  [146]"
  73. 780 print"                            [155]"
  74. 790 a$="    you are the commander of a fleet":gosub1210
  75. 800 a$="in the pacific that has encountered an":gosub1210
  76. 810 a$="enemy fleet.  your job is to destroy":gosub1210
  77. 820 a$="the enemy.  quickly.  efficiently.  and":gosub1210
  78. 830 a$="of course, before they destroy you.":gosub1210
  79. 840 a$="    you have narrowed down the area":gosub1210
  80. 850 a$="that the enemy is in into a 15 by 10":gosub1210
  81. 860 a$="grid on your radar.":gosub1210:gosub1220
  82. 870 a$="[147]    now you must strategically place":gosub1210
  83. 880 a$="all of your ships in an area of equal":gosub1210
  84. 890 a$="size.  to do this, simply tell the":gosub1210
  85. 900 a$="master computer where you want to":gosub1210
  86. 910 a$="start each ship and in which direction":gosub1210
  87. 920 a$="it should point.  for example:":gosub1210
  88. 930 printtab(10)" abcdef":printtab(10)"1[154][167][167][167][167][167][167]":printtab(10)"[155]2[154][167][167][167][167][167][167]"
  89. 940 printtab(10)"[155]3[154][167][167][167][167][167][167]":printtab(10)"[155]4[154][167][167][167][167][167][167]":printtab(10)"[155]5[154][167][167][167][167][167][167]"
  90. 950 print"[145][145][145][145][145][145]":printtab(20)"[155]carrier:"
  91. 960 printtab(21)"start on a1[155]"
  92. 970 printtab(21)"point right[155]"
  93. 980 fory=1to500:nexty:print"[145][145][145][145]":printtab(11)"[210][211][212][213][214]"
  94. 990 print"":gosub1220:print"[145][145][145][145][145][145][145][145]":printtab(20)"battleship:"
  95. 1000 printtab(21)"start on c2[155]":printtab(21)"point down[155] ":fory=1to500:nexty
  96. 1010 print"[145][145][145]":printtab(13)"[198][157][199][157][200][157][201]":gosub1220
  97. 1020 a$="[147]    once your ships are positioned,":gosub1210
  98. 1030 a$="including 1 carrier, 1 battleship, 2":gosub1210
  99. 1040 a$="destroyers, 2 subs, and 2 pt boats,":gosub1210
  100. 1050 a$="it is time to do battle.  simply tell":gosub1210
  101. 1060 a$="the computer which sector to attack,":gosub1210
  102. 1070 a$="such as a1, g5, o3, etc.  but do not":gosub1210
  103. 1080 a$="expect the enemy to sit back and watch,":gosub1210
  104. 1090 a$="they will be attacking, too.":gosub1210:gosub1220
  105. 1091 a$="[147]    when you miss, a blue [164][155] will":gosub1210
  106. 1092 a$="appear and when you hit, a red [164][155] will":gosub1210
  107. 1093 a$="appear.  the computer keeps track of":gosub1210
  108. 1094 a$="hits, sunk ships, and will tell you":gosub1210
  109. 1095 a$="when a fleet is defeated.":gosub1210
  110. 1096 a$="    at the side of each grid is a row":gosub1210
  111. 1097 a$="of eight pegs.  as each ship gets":gosub1210
  112. 1098 a$="sunk, a peg will be replaced with an":gosub1210
  113. 1099 a$="red x.":gosub1210:gosub1220
  114. 1100 a$="[147]    when playing with two players,":gosub1210
  115. 1110 a$="player 1 is the allies fleet and player":gosub1210
  116. 1120 a$="2 is the enemies fleet.  when choosing":gosub1210
  117. 1130 a$="your ship locations, the other player":gosub1210
  118. 1140 a$="will be instructed to look away.  after":gosub1210
  119. 1150 a$="the locations are in the computer, the":gosub1210
  120. 1160 a$="grid will clear and the other player":gosub1210
  121. 1170 a$="can enter their locals.":gosub1210:fort=1to500:nextt
  122. 1180 a$="    can you win?":gosub1210:fort=1to500:next
  123. 1190 a$="    maybe...":gosub1210:gosub1220
  124. 1200 goto1280
  125. 1210 fort=1tolen(a$):printmid$(a$,t,1);:fory=1to30:next:next:print:print:return
  126. 1220 print"press s to skip or spacebar to continue[155]"
  127. 1230 getz$
  128. 1232 if z$="[140]" then 490
  129. 1234 if z$="s" then 1280
  130. 1236 if z$<>" " then 1230
  131. 1240 return
  132. 1250 rem
  133. 1260 rem    *** load battleship ***
  134. 1270 rem
  135. 1280 open15,8,15,"i0"
  136. 1290 print"[147]        loading [\]]^_!#$% &'(":print
  137. 1300 open1,8,2,"0:battleship.exe":gosub1330
  138. 1305 ife=1thene=0:gosub1380:close1:close15:goto1280
  139. 1310 close1:close15
  140. 1311 print"[144]load"+chr$(34)+"battleship.exe"+chr$(34)+",8"
  141. 1312 print"run:run:
  142. 1314 [151]198,3:[151]631,19:[151]632,13:[151]633,13:[162]
  143. 1320 [143]
  144. 1330 [143]      disk error trap
  145. 1340 [143]
  146. 1350 [132]15,a$,b$:[139][197](a$)[177]19[167]e[178]1
  147. 1360 [142]
  148. 1370 [143]
  149. 1380 [143]      error message
  150. 1390 [143]
  151. 1400 [153]"load"[163]15)"listdisk error"
  152. 1405 [153]" please make sure all of the following"
  153. 1410 [153][163]15)"are okay:"
  154. 1420 [153]:[153]"   disk drive is on"
  155. 1430 [153]"   door is closed"
  156. 1440 [153]"   cable is secure"
  157. 1470 [153][163]10)"press space to retry"
  158. 1471 [153][163]12)"or f8 for uptimestop"
  159. 1472 [161]a$
  160. 1473 [139] a$[178]"restore" [167] [158] 8[172]4096[170]4
  161. 1474 [139]a$[179][177][199](32)[167]1472
  162. 1480 [142]
  163.