home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / Apps / Games / How / How_1.5 / Source / how.bas < prev    next >
Encoding:
BASIC Source File  |  2017-09-01  |  9.5 KB  |  576 lines

  1. DECLARE SUB dark ()
  2. DECLARE SUB light ()
  3. START:
  4.  
  5. DECLARE SUB counter ()
  6. DECLARE SUB result ()
  7. DECLARE SUB cardtwo ()
  8. DECLARE SUB cardthree ()
  9. DECLARE SUB cardfour ()
  10. DECLARE SUB cardfive ()
  11. DECLARE SUB cardsix ()
  12. DECLARE SUB cardseven ()
  13. DECLARE SUB titlepage ()
  14. DECLARE SUB SECRET ()
  15. DECLARE SUB intro ()
  16. DECLARE SUB cardone ()
  17. DECLARE SUB answer ()
  18. COMMON SHARED end$
  19. COMMON SHARED totall
  20. LET totall = 0
  21.  
  22.  
  23.  
  24. CALL titlepage
  25. CALL intro
  26.  
  27. CALL cardone
  28. CALL cardtwo
  29. CALL cardthree
  30. CALL cardfour
  31. CALL cardfive
  32. CALL cardsix
  33. CALL cardseven
  34.  
  35. CALL result
  36.  
  37. REM Checks if the user typed q or Q for quit in the
  38. REM result subroutine
  39. IF end$ = "Q" OR end$ = "q" THEN END
  40.  
  41. GOTO START
  42.  
  43.  
  44. END
  45.  
  46.  
  47. SUB cardfive
  48.  
  49. 5 REM restart sub
  50.  
  51. CLS
  52. SCREEN 1    'Graphic mode 320 X 200 pixel resolutio
  53. PRINT
  54. PRINT
  55. PRINT
  56. PRINT
  57. PRINT
  58. PRINT " 16  17  18  19  20  21  22  23  24  25"
  59. PRINT
  60. PRINT " 26  27  28  29  30  31  48  49  50  51"
  61. PRINT
  62. PRINT " 52  53  54  55  56  57  59  60  61  63"
  63. PRINT
  64. PRINT
  65. PRINT
  66. PRINT
  67. PRINT
  68. PRINT
  69. PRINT
  70. LINE (5, 35)-(312, 100), , B
  71. BEEP
  72. INPUT "     Is your number here? <y/n>"; key$
  73.  
  74. IF key$ = "yes" OR key$ = "Y" OR key$ = "y" OR key$ = "YES" THEN
  75. totall = totall + 16
  76. GOTO 52
  77. END IF
  78.  
  79. IF key$ = "N" OR key$ = "n" THEN
  80. GOTO 52
  81. END IF
  82.  
  83. GOTO 5
  84.  
  85. 52 REM Label
  86.  
  87. END SUB
  88.  
  89. SUB cardfour
  90.  
  91. 4 REM restart sub
  92.  
  93. CLS
  94. SCREEN 1    'Graphic mode 320 X 200 pixel resolutio
  95. PRINT
  96. PRINT
  97. PRINT
  98. PRINT
  99. PRINT
  100. PRINT "  8   9  10  11  12  13  14  15  24  25"
  101. PRINT
  102. PRINT " 26  27  28  29  30  31  40  41  42  43"
  103. PRINT
  104. PRINT " 44  45  46  47  56  57  58  59  60  61"
  105. PRINT
  106. PRINT " 62  63  72  73  74  75"
  107. PRINT
  108. PRINT
  109. PRINT
  110. PRINT
  111. PRINT
  112. LINE (5, 35)-(312, 100), , B
  113. BEEP
  114. INPUT "     Is your number here? <y/n>"; key$
  115.  
  116. IF key$ = "yes" OR key$ = "Y" OR key$ = "y" OR key$ = "YES" THEN
  117. totall = totall + 8
  118. GOTO 42
  119. END IF
  120.  
  121. IF key$ = "N" OR key$ = "n" THEN
  122. GOTO 42
  123. END IF
  124.  
  125. GOTO 4
  126.  
  127. 42 REM Label
  128.  
  129. END SUB
  130.  
  131. SUB cardone
  132.  
  133. 1 REM restart sub
  134.  
  135. CLS
  136. SCREEN 1    'Graphic mode 320 X 200 pixel resolutio
  137. PRINT
  138. PRINT
  139. PRINT
  140. PRINT
  141. PRINT
  142. PRINT "  1   3   5   7   9  11  13  15  17  19"
  143. PRINT
  144. PRINT " 21  23  25  27  29  31  33  35  37  39"
  145. PRINT
  146. PRINT " 41  43  45  47  49  51  53  55  57  59"
  147. PRINT
  148. PRINT " 61  63  65  67  69  71  73  75"
  149. PRINT
  150. PRINT
  151. PRINT
  152. PRINT
  153. PRINT
  154. LINE (5, 35)-(312, 100), , B
  155. BEEP
  156. INPUT "     Is your number here? <y/n>"; key$
  157.  
  158. IF key$ = "yes" OR key$ = "Y" OR key$ = "y" OR key$ = "YES" THEN
  159. LET totall = totall + 1
  160. GOTO 12
  161. END IF
  162.  
  163. IF key$ = "N" OR key$ = "n" THEN
  164. GOTO 12
  165. END IF
  166.  
  167. GOTO 1
  168.  
  169. 12 REM Label
  170.  
  171. END SUB
  172.  
  173. SUB cardseven
  174.  
  175. 7 REM restart sub
  176.  
  177. CLS
  178. SCREEN 1    'Graphic mode 320 X 200 pixel resolutio
  179. PRINT
  180. PRINT
  181. PRINT
  182. PRINT
  183. PRINT
  184. PRINT " 64  65  66  67  68  69  70  71  72  73"
  185. PRINT
  186. PRINT " 74  75"
  187. PRINT
  188. PRINT
  189. PRINT
  190. PRINT
  191. PRINT
  192. PRINT
  193. PRINT
  194. PRINT
  195. PRINT
  196. LINE (5, 35)-(312, 100), , B
  197. BEEP
  198. INPUT "     Is your number here? <y/n>"; key$
  199.  
  200. IF key$ = "yes" OR key$ = "Y" OR key$ = "y" OR key$ = "YES" THEN
  201. totall = totall + 64
  202. GOTO 72
  203. END IF
  204.  
  205. IF key$ = "N" OR key$ = "n" THEN
  206. GOTO 72
  207. END IF
  208.  
  209. GOTO 7
  210.  
  211. 72 REM Label
  212.  
  213. END SUB
  214.  
  215. SUB cardsix
  216.  
  217. 6 REM restart sub
  218.  
  219. CLS
  220. SCREEN 1    'Graphic mode 320 X 200 pixel resolutio
  221. PRINT
  222. PRINT
  223. PRINT
  224. PRINT
  225. PRINT
  226. PRINT " 32  33  34  35  36  37  38  39  40  41"
  227. PRINT
  228. PRINT " 42  43  44  45  46  47  48  49  50  51"
  229. PRINT
  230. PRINT " 52  53  54  55  56  57  58  59  60  61"
  231. PRINT
  232. PRINT " 62  63"
  233. PRINT
  234. PRINT
  235. PRINT
  236. PRINT
  237. PRINT
  238. LINE (5, 35)-(312, 100), , B
  239. BEEP
  240. INPUT "     Is your number here? <y/n>"; key$
  241.  
  242. IF key$ = "yes" OR key$ = "Y" OR key$ = "y" OR key$ = "YES" THEN
  243. totall = totall + 32
  244. GOTO 62
  245. END IF
  246.  
  247. IF key$ = "N" OR key$ = "n" THEN
  248. GOTO 62
  249. END IF
  250.  
  251. GOTO 6
  252.  
  253. 62 REM Label
  254.  
  255. END SUB
  256.  
  257. SUB cardthree
  258.  
  259. 3 REM restart sub
  260.  
  261. CLS
  262. SCREEN 1    'Graphic mode 320 X 200 pixel resolutio
  263. PRINT
  264. PRINT
  265. PRINT
  266. PRINT
  267. PRINT
  268. PRINT "  4   5   6   7  12  13  14  15  20  21"
  269. PRINT
  270. PRINT " 22  23  28  29  30  31  36  37  38  39"
  271. PRINT
  272. PRINT " 44  45  46  47  52  53  54  55  60  61"
  273. PRINT
  274. PRINT " 62  63  68  69  70  71"
  275. PRINT
  276. PRINT
  277. PRINT
  278. PRINT
  279. PRINT
  280. LINE (5, 35)-(312, 100), , B
  281. BEEP
  282. INPUT "     Is your number here? <y/n>"; key$
  283.  
  284. IF key$ = "yes" OR key$ = "Y" OR key$ = "y" OR key$ = "YES" THEN
  285. totall = totall + 4
  286. GOTO 32
  287. END IF
  288.  
  289. IF key$ = "N" OR key$ = "n" THEN
  290. GOTO 32
  291. END IF
  292.  
  293. GOTO 3
  294.  
  295. 32 REM Label
  296.  
  297. END SUB
  298.  
  299. SUB cardtwo
  300.  
  301. 2 REM start sub again
  302.  
  303. CLS
  304. SCREEN 1    'Graphic mode 320 X 200 pixel resolutio
  305. PRINT
  306. PRINT
  307. PRINT
  308. PRINT
  309. PRINT
  310. PRINT "  2   3   6   7  10  11  14  15  18  19"
  311. PRINT
  312. PRINT " 22  23  26  27  30  31  34  35  38  39"
  313. PRINT
  314. PRINT " 42  43  46  47  50  51  54  55  58  59"
  315. PRINT
  316. PRINT " 62  63  66  67  70  71  74  75"
  317. PRINT
  318. PRINT
  319. PRINT
  320. PRINT
  321. PRINT
  322. LINE (5, 35)-(312, 100), , B
  323. BEEP
  324. INPUT "     Is your number here? <y/n>"; key$
  325.  
  326.  
  327. IF key$ = "yes" OR key$ = "Y" OR key$ = "y" OR key$ = "YES" THEN
  328. totall = totall + 2
  329. GOTO 22
  330. END IF
  331.  
  332. IF key$ = "N" OR key$ = "n" THEN
  333. GOTO 22
  334. END IF
  335.  
  336. GOTO 2
  337.  
  338. 22 REM Label
  339.  
  340. END SUB
  341.  
  342. SUB dark
  343.  
  344. FOR x = 1 TO 200
  345. NEXT x
  346. LINE (95, 60)-(220, 90), , B
  347.  
  348.  
  349. END SUB
  350.  
  351. SUB intro
  352. CLS
  353. SCREEN 1    'Graphic mode 320 X 200 pixel resolution
  354. PRINT
  355. PRINT
  356. PRINT "    ***   ***  **********  ***    ***"
  357. PRINT "    ***   ***  **********  ***    *** "
  358. PRINT "    ***   ***  ***    ***  ***    *** "
  359. PRINT "    ***   ***  ***    ***  ***    ***"
  360. PRINT "    *********  ***    ***  ***    ***"
  361. PRINT "    *********  ***    ***  *** ** ***"
  362. PRINT "    ***   ***  ***    ***  *** ** ***"
  363. PRINT "    ***   ***  ***    ***  *** ** ***"
  364. PRINT "    ***   ***  **********  **********"
  365. PRINT "    ***   ***  **********  **********"
  366. PRINT
  367. PRINT
  368. PRINT "     Please choose a number between"
  369. PRINT
  370. PRINT "               1 and 75"
  371. PRINT
  372. PRINT "     The computer  will try to read"
  373. PRINT "     Your mind in order to find the"
  374. PRINT "     number that you chose."
  375. PRINT
  376. PRINT
  377. REM    Draws a box around the choose a number box
  378. LINE (35, 105)-(285, 140), , B
  379. BEEP
  380. INPUT "            Press <Return>"; dummy$
  381. IF dummy$ = "SECRET" THEN CALL SECRET
  382.  
  383. END SUB
  384.  
  385.  
  386.  
  387. SUB light
  388.  
  389. FOR x = 1 TO 200
  390. NEXT x
  391.  
  392. LINE (95, 60)-(220, 90), 1, B
  393.  
  394. END SUB
  395.  
  396. SUB result
  397.  
  398. CLS
  399. SCREEN 1    'Graphic mode 320 X 200 pixel resolution
  400.  
  401. REM    Draws a box around the choose a number box
  402. LINE (100, 65)-(215, 85), , B
  403.  
  404. LOCATE 5, 1
  405. PRINT "    The computer is now calculating!"
  406.  
  407. LOCATE 10, 15
  408. PRINT "Please wait!"
  409. CALL dark
  410.  
  411. LOCATE 10, 15
  412. PRINT " lease wait!"
  413. CALL light
  414.  
  415. LOCATE 10, 15
  416. PRINT "  ease wait!"
  417. CALL dark
  418.  
  419. LOCATE 10, 15
  420. PRINT "   ase wait!"
  421. CALL light
  422.  
  423. LOCATE 10, 15
  424. PRINT "    se wait!"
  425. CALL dark
  426.  
  427. LOCATE 10, 15
  428. PRINT "     e wait!"
  429. CALL light
  430.  
  431. LOCATE 10, 15
  432. PRINT "       wait!"
  433. CALL dark
  434.  
  435. LOCATE 10, 15
  436. PRINT "        ait!"
  437. CALL light
  438.  
  439. LOCATE 10, 15
  440. PRINT "         it!"
  441. CALL dark
  442.  
  443. LOCATE 10, 15
  444. PRINT "          t!"
  445. CALL light
  446.  
  447. LOCATE 10, 15
  448. PRINT "           !"
  449. CALL dark
  450.  
  451. LOCATE 10, 15
  452. PRINT "            "
  453. CALL light
  454.  
  455. LOCATE 10, 15
  456. PRINT "P          !"
  457. CALL dark
  458.  
  459. LOCATE 10, 15
  460. PRINT "Pl        t!"
  461. CALL light
  462.  
  463. LOCATE 10, 15
  464. PRINT "Ple      it!"
  465. CALL dark
  466.  
  467. LOCATE 10, 15
  468. PRINT "Plea    ait!"
  469. CALL light
  470.  
  471. LOCATE 10, 15
  472. PRINT "Pleas  wait!"
  473. CALL dark
  474.  
  475. LOCATE 10, 15
  476. PRINT "Please wait!"
  477. CALL light
  478.  
  479. CALL dark
  480.  
  481. LOCATE 10, 15
  482. PRINT "            "
  483.  
  484. LINE (95, 60)-(220, 90), 0, B     'Removes the box
  485. LINE (100, 65)-(215, 85), 0, B
  486.  
  487.  
  488. LINE (60, 60)-(230, 90), , B      'New box
  489.  
  490. LOCATE 10, 10
  491. PRINT "Your number is:"; totall;
  492.  
  493. LOCATE 16, 2
  494. PRINT "  The computer has read your mind!"
  495. BEEP
  496.  
  497. LOCATE 20, 2
  498. PRINT "     Press <Return> to restart"
  499. PRINT
  500.  
  501.  
  502. INPUT "        Enter <Q> to quit"; end$
  503.  
  504. IF end$ = "SECRET" THEN CALL SECRET
  505.  
  506. END SUB
  507.  
  508. SUB SECRET
  509.  
  510. SCREEN 1    'Graphic mode 320 X 200 pixel resolution
  511.  
  512. CLS
  513.  
  514. PRINT
  515. PRINT
  516. PRINT
  517. PRINT
  518. PRINT "  HOW was programmed by Eric Tremblay"
  519. PRINT
  520. PRINT "  Original Idea by Chantal Bellerose"
  521. PRINT
  522. PRINT "          December 25, 1988"
  523. PRINT
  524. PRINT
  525. PRINT
  526. PRINT "     IBM Version 1.0  March 2, 1991"
  527. PRINT
  528. PRINT
  529. PRINT
  530. PRINT "      CompuServe I.D. 73117,460"
  531. PRINT "          GEnie E.TREMBLAY2"
  532. PRINT
  533. PRINT
  534. PRINT
  535. PRINT
  536.  
  537. BEEP
  538.  
  539. LINE (35, 90)-(285, 107), , B
  540. INPUT "           Press <Return>"; dummy$
  541.  
  542. END SUB
  543.  
  544. SUB titlepage
  545. CLS
  546. SCREEN 2   ' Regular 80X25 text screen mode
  547. PRINT
  548. PRINT
  549. PRINT
  550. PRINT "       ******       ******    *******************   ******         ******"
  551. PRINT "       ******       ******    *******************   ******         ****** "
  552. PRINT "       ******       ******    ******       ******   ******         ****** "
  553. PRINT "       ******       ******    ******       ******   ******         ******"
  554. PRINT "       *******************    ******       ******   ******         ******"
  555. PRINT "       *******************    ******       ******   ******   ***   ******"
  556. PRINT "       ******       ******    ******       ******   ******   ***   ******"
  557. PRINT "       ******       ******    ******       ******   ******  ** **  ******"
  558. PRINT "       ******       ******    *******************   *********   *********"
  559. PRINT "       ******       ******    *******************   ******         ******"
  560. PRINT
  561. PRINT
  562. PRINT "                    A   M a t h e m a t i c a l   T r i c k"
  563. PRINT
  564. PRINT "                                By Eric Tremblay"
  565. PRINT
  566. PRINT "                           CompuServe I.D. 73117,460"
  567. PRINT "                               GEnie E.TREMBLAY2"
  568. PRINT
  569. PRINT
  570. BEEP
  571. INPUT "                                Press <Return>"; dummy$
  572. IF dummy$ = "SECRET" THEN CALL SECRET
  573.  
  574. END SUB
  575.  
  576.