home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / pg / pggame / puzzl4.200 < prev    next >
Text File  |  2006-10-19  |  6KB  |  160 lines

  1.   PUZZLE-4  by Paul Globman 
  2.                Copyright (c) 1990
  3. ---------------------------------------
  4. Puzzle #4 is not your ordinary puzzle.  It is a MAZE and the object is to get
  5. to the final room marked "FINISH".
  6.  
  7. But this is not an ordinary MAZE.  Puzzle #4 is a four dimensional maze that
  8. is based on the principle that two things can occupy the same space at the
  9. same time.
  10.  
  11. It is easy to imagine a two dimensional grid, such as a bordered tic-tac-toe
  12. board.  And it is easy to imagine a three dimensional grid, such as a Rubiks
  13. cube.  Now imagine three rubiks cubes overlaying each other in the same
  14. physical space. This would be 3 by 3 by 3 by 3 grid, representing 4 dimensional
  15. space.
  16.  
  17. Imagine a Rubiks cube as a building with 27 rooms (3 floors with 9 rooms per
  18. floor).  These rooms have doors so you may pass from room to room on the same
  19. floor.  These rooms have cutouts in the floor and ceiling, so you may travel
  20. from floor to floor.  And these rooms have a "space portal" that allow you to
  21. pass into an entirely different cube!
  22.  
  23. With 3 cubes, the maze has 81 different rooms.  You will begin in room #1 and
  24. finish in room #81.  You will not pass through every room, but will pass
  25. through each floor of each cube, at least once.
  26.  
  27. The VIEW
  28. ========
  29.  
  30. When you run the PUZZL4.BA program you will first see room #0.  This room is
  31. not part of the puzzle, but is provided to demonstrate the EIGHT possible moves
  32. (directions) you may select from.
  33.  
  34. The view is always the same, that is, you are looking DOWN into the room,
  35. through a "glass" ceiling.
  36.  
  37. DOORS - the 4 doors shown in room #0 will allow a move to an adjacent room on
  38. the same floor of the same cube.  This is done with one of the 4 ARROW keys.
  39.  
  40. CUTOUTS - there are two possible cutouts, both shown in room #0.  The small
  41. square in the center of the room represents a hole in the floor, which allow
  42. you to move to the room directly below the room shown.  The large square
  43. represents a hole in the ceiling (thru which you are looking) and this allows
  44. you to move to the room directly above the room shown.  These moves are made
  45. by pressing SHIFT UP/DOWN ARROW, to move up or down one level.
  46.  
  47. SPACE PORTALS - When looking at room #0, you will notice that the left and
  48. right walls are not a solid black border, as the top and bottom walls.  When
  49. you enter a room whose wall is not SOLID, you are in a room that will permit
  50. the overlaying of the entire structure (cube).  SHIFT LEFT/RIGHT ARROW will
  51. allow the shifting of space so a new cube exists in the space of the old cube,
  52. and your position within the new cube remains the same as the position you
  53. were in, in the old cube.
  54.  
  55. SUGGESTIONS
  56. ===========
  57.  
  58. There are quite a few possible paths to take, and only one will take you
  59. through the maze.  If you accept the challenge and wish to find the correct
  60. path, you should work with a note pad and document your movement through the
  61. maze.  Keep track of the rooms you pass through and make a note of where they
  62. lead.  Use your imagination and try to draw each of the three floor plans for
  63. each of the three cubes.
  64.  
  65. With a total of 81 rooms, you may think this maze is equivalent to a two
  66. dimensional maze that is 9 by 9.  Don't let over-simplification limit your
  67. approach.  Just try to draw the 81 rooms with their inter-connections and you
  68. will see this is much more involved than a simple 9 by 9 grid.
  69.  
  70. GOAL
  71. ====
  72.  
  73. Your goal is to find the sequence of rooms that lead to the FINISH (room #81).
  74.  
  75. ESCAPE
  76. ======
  77.  
  78. When you first run PUZZLE-4 you will see room #0.  ANY KEY begins the game and
  79. puts you in room #1.  There is one exception... the ESC key.  ESC from room #0
  80. will abort the game and return you to the Tandy 200 menu.  Once the game has
  81. begun, ESC will restart the program and show you room #0.
  82.  
  83.  
  84. GOOD LUCK AND HAVE FUN... Paul Globman [72227,1661]
  85.  
  86. =======================================
  87. 0 REM PUZZL4.BA by Paul Globman (c)1990
  88. 1 DIMS(81):E$=CHR$(27):GOSUB63:GOTO14
  89. 2 K$=INKEY$:IFK$=""THEN2ELSEK=ASC(K$)
  90. 3 IFK=27THENIFS=0THENMENUELSERUN
  91. 4 IFS=0THENS=1:GOTO14
  92. 5 IFK=28THENA=1:M=1:GOTO13
  93. 6 IFK=29THENA=-1:M=2:GOTO13
  94. 7 IFK=30THENA=-3:M=4:GOTO13
  95. 8 IFK=31THENA=3:M=8:GOTO13
  96. 9 IFK=2THENA=9:M=128:GOTO13
  97. 10 IFK=20THENA=-9:M=64:GOTO13
  98. 11 IFK=1THENA=-27:M=32:GOTO13
  99. 12 IFK<>6THEN2ELSEA=27:M=16
  100. 13 IF(S(S)ANDM)=0THEN2ELSES=S+A
  101. 14 GOSUB23:IF(S(S)AND1)=1THENGOSUB35
  102. 15 IF(S(S)AND2)=2THENGOSUB39
  103. 16 IF(S(S)AND4)=4THENGOSUB43
  104. 17 IF(S(S)AND8)=8THENGOSUB47
  105. 18 IF(S(S)AND16)=16THENGOSUB62
  106. 19 IF(S(S)AND32)=32THENGOSUB61
  107. 20 IF(S(S)AND64)=64THENGOSUB51
  108. 21 IF(S(S)AND128)=128THENGOSUB57
  109. 22 GOTO2
  110. 23 CLS:PRINT@77,S:FORI=0TO2
  111. 24 LINE(8+I,8+I)-(222-I,122-I),1,B
  112. 25 NEXT:LINE(30,30)-(200,100),1,B
  113. 26 LINE(10,10)-(30,30)
  114. 27 LINE(10,120)-(30,100)
  115. 28 LINE(220,10)-(200,30)
  116. 29 LINE(220,120)-(200,100)
  117. 30 IFS=1THENPRINT@297,"START
  118. 31 IFS<>81THENRETURN
  119. 32 PRINT@296,"FINISH
  120. 33 PRINT@372,"MAZE COMPLETED
  121. 34 K$=INKEY$:IFK$<>E$THEN34ELSERUN
  122. 35 FORI=0TO2:LINE(200,55-I)-(215,45-I)
  123. 36 LINE(200,75+I)-(215,85+I):NEXT
  124. 37 LINE(215,45)-(215,85)
  125. 38 LINE(200,55)-(200,75),0:RETURN
  126. 39 FORI=0TO2:LINE(30,55-I)-(15,45-I)
  127. 40 LINE(30,75+I)-(15,85+I):NEXT
  128. 41 LINE(15,45)-(15,85)
  129. 42 LINE(30,55)-(30,75),0:RETURN
  130. 43 FORI=0TO2:LINE(105-I,30)-(95-I,15)
  131. 44 LINE(125+I,30)-(135+I,15):NEXT
  132. 45 LINE(95,15)-(135,15)
  133. 46 LINE(105,30)-(125,30),0:RETURN
  134. 47 FORI=0TO2:LINE(105-I,100)-(95-I,115)
  135. 48 LINE(125+I,100)-(135+I,115):NEXT
  136. 49 LINE(95,115)-(135,115)
  137. 50 LINE(105,100)-(125,100),0:RETURN
  138. 51 FORI=0TO4
  139. 52 LINE(70+I,20+I)-(160-I,110-I),1,B
  140. 53 NEXT:LINE(71,21)-(74,24),0
  141. 54 LINE(159,21)-(156,24),0
  142. 55 LINE(71,109)-(74,106),0
  143. 56 LINE(159,109)-(156,106),0:RETURN
  144. 57 FORI=0TO2
  145. 58 LINE(103+I,53+I)-(128-I,78-I),1,B
  146. 59 NEXT:LINE(104,54)-(127,77),0
  147. 60 LINE(127,54)-(104,77),0:RETURN
  148. 61 LINE(9,11)-(9,119),0:RETURN
  149. 62 LINE(221,11)-(221,119),0:RETURN
  150. 63 FORI=0TO81:READS(I):NEXT:RETURN
  151. 64 DATA 255,9,3,146,140,9,18,20,132,144
  152. 65 DATA 136,129,66,84,129,10,128,82,196
  153. 66 DATA 64,65,2,9,66,16,68,17,66
  154. 67 DATA 136,145,34,5,3,34,48,16,48
  155. 68 DATA 65,67,10,32,16,140,17,34,20
  156. 69 DATA 17,3,18,24,17,98,20,33,2
  157. 70 DATA 137,34,136,4,128,12,33,162,36
  158. 71 DATA 65,130,192,128,97,130,32,64,32
  159. 72 DATA 40,64,96,100,32,72,33,3,6
  160.