home *** CD-ROM | disk | FTP | other *** search
/ The CIA World Factbook 1992 / k3bimage.iso / sel / 01 / 0188 / switchbx.doc < prev   
Encoding:
Text File  |  1991-12-02  |  10.3 KB  |  184 lines

  1.  
  2.  
  3.                             SWITCHBOX
  4.              (COMPUTE! March 1986 by Todd Heimarck)
  5.  
  6.      Switchbox is like putting dominos in place for a chain reaction --
  7. either you're setting them in position or you're knocking them over.
  8. Winning requires skill and a sense of when to go for points and when to
  9. lay back and wait for a better board.  You score points by dropping
  10. balls into a box full of two-way switches.  Each switch has a trigger
  11. and a platform.  If the ball lands on an empty platform, it stops dead.
  12. But if it hits a trigger, it reverses the switch and continues.  In
  13. many cases dropping a single ball creates a cascading effect -- one
  14. ball sets another in motion, which sets others in motion, etc., all
  15. the way down.
  16.  
  17.      Each switch has two parts, two positions, two states, two paths
  18. in, and two paths out.  The two parts are the platform and the trigger.
  19. A switch can lean to the left (platform left, trigger right) or to the
  20. right (platform right, trigger left).  The trigger is weak, and always
  21. allows balls to pass.  But the platform is strong enough to hold a
  22. single ball.  So the platform either holds a ball, or it does not and
  23. is empty.  When a ball sits on a platform, the switch is loaded.  At
  24. the beginning of the game, there are no balls on the field -- all
  25. platforms are empty -- and the position of each switch is chosen
  26. randomly.
  27.  
  28.      Players alternate dropping balls into one of eight entry points.
  29. There balls (and others) may or may not make it all the way through
  30. the switchbox, to one of the 16 exit paths.  Balls fall straight down
  31. (with one exception), so a ball's movement is always predictable.  When
  32. it hits an empty switch, one of two things can happen.  If it lands on
  33. the empty platform, it stops dead in its tracks.  But if it lands on a
  34. trigger, it falls through to the next level below.
  35.  
  36.      Moving balls always makes it through loaded switches.  Triggers
  37. allow balls to continue, and move the switch to the other position.
  38. If it's loaded, the dead ball on the platform is put into motion and
  39. it hits the trigger that just moved over.  This makes the switch go
  40. back to its original position, but with an empty platform.  So when a
  41. ball hits the trigger of a loaded switch, its motion continues
  42. unabated.  The switch moves, the ball on the platform begins to fall
  43. and it hits the newly placed trigger.  The newly emptied switch moves
  44. back again, and the two balls drop to the next level.
  45.  
  46.      There's one more possibility: a ball dropping onto a platform
  47. that already holds a ball.  A platform can't hold any more than one
  48. ball, so when this happens one of the balls slides over to the trigger.
  49. So the ball does not move straight down -- it slides over to the next
  50. pathway.  This is the exception to the rule that balls drop in a
  51. straight line.  Of course, when the ball hits the trigger, the switch
  52. changes position, causing the other ball to drop and hit the trigger.
  53.  
  54.  
  55.  
  56.      At game's start, all platforms are empty, so four of eight entry
  57. paths are blocked.  Remember that your turn ends when a ball hits an
  58. empty platform and stops.  As the switches fill up, the chances
  59. increase that a ball will descend through several levels.  The goal
  60. is to score points by getting balls to pass all the way through the
  61. maze of the switchbox.  The best way to collect a lot of points is to
  62. cause a chain reaction.
  63.  
  64.      A ball that hits a loaded switch from either side continues on
  65. its way.  And the previously insert ball on the platform starts moving.
  66. One enters, two exit.  If both of those balls encounter full platforms,
  67. four drop from the switches.  The pathways are staggered, so the
  68. effects can spread outward, with more and more balls cascading toward
  69. the bottom.
  70.  
  71.      Rather than taking an easy point or two, it's often worthwhile to
  72. build up layers of loaded switches.  Watch out for leaving yourself
  73. vulnerable, though.  Because players take turns, you'll want to leave
  74. positions where your opponent's move gives you a chance to create a
  75. chain reaction.  The best strategy is to play defensively.  Look ahead
  76. a move or two, and watch for an opening that allows you to score
  77. several points at once.
  78.  
  79.      A game of Switchbox always lasts four rounds.  In the first
  80. (equality), each exit counts for two points.  You goal is to score
  81. ten points.  The second quarter has more points available, as well as
  82. a higher goal.  If you look at the exits, you'll see that the further
  83. away from the middle, the higher the point value.  The numbers increase
  84. in a "Fibonacci" sequence: 1, 2, 3, 5, 8, and so on.  Each number is
  85. the sum of the previous two (1 + 2 is 3, 2 + 3 is 5, 3 + 5 is 8, etc.).
  86. The target score in round two is 40.
  87.  
  88.      In round three the numbers are a bit lower.  They increase
  89. arithmetically (1, 2, 3, 4, up to 8 in the corners).  A goal of 20
  90. points brings you to round four, where you can score big.  Here the
  91. numbers are squares: 1, 4, 9, 16, 25, all the way to 64 at the edges.
  92. In rounds two through four, it's sometimes prudent to leave a middle
  93. path open for your opponent to score a few points, in order to gather
  94. a high score on the big numbers to the left and right.
  95.  
  96.      Each round lasts until one player has reached the goal.  At that
  97. point the other player has one last turn before the round ends.  It's
  98. possible to win the round on this last-chance play; watch out for
  99. barely topping the goal and leaving a chain reaction open for the
  100. other player.  An arrow points to the scoreboard of the player whose
  101. turn it is.  On the other side of the screen, you'll see a number
  102. where the arrow should be.  That's the goal for the current round.
  103.  
  104.      Bonus points are awarded at the conclusion of each round.  Four
  105. numbers appear below the scorecards.  The first is simply the total
  106. so far.  The second is the total plus a bonus of th goal for the round
  107. if the player's points are equal to or greater than the goal.  For
  108. example, if the goal is 20 and you get 18, there's no bonus.  If you
  109. score 22, the bonus is the goal for that round (20) and you'd have 42
  110.  
  111. points.  The third number under the scoreboard is the difference
  112. between scores for the rounds.  If you win by two points, two is added
  113. to your score (and two is subtracted from the other player).  The final
  114. number is the grand total of the first three scores and bonuses.
  115. Rounds one and three are fairly low-scoring with low goals.  You may
  116. want to seed the field with extra balls during these quarters, so you
  117. can collect more points in the second and fourth quarters.
  118.  
  119.      Although the goal of the game is to score the most points, there's
  120. no reason you couldn't agree to play for a low score.  In a "lowball"
  121. game, you would try to avoid scoring points.  You wouldn't necessarily
  122. play backwards, you would have to adjust the strategy of where to place
  123. the balls.  Fill up the board as much as possible and leave your
  124. opponent in a situation where he or she is forced to score points.
  125.  
  126.      The DATA statements at the beginning of the program determine the
  127. goal for each round and the point values for the exit paths.  You can
  128. prolong the game by doubling the goals; this also dilutes the value of
  129. a big score at the beginning of a round, preventing one player from
  130. winning on the first or second turn.  An interesting variation is to
  131. assign negative values to some slots.  If some paths score negative
  132. points, you are forced to think harder about there the balls will drop.
  133.  
  134.      In addition to the number keys (1-8), the plus (+) and minus (-)
  135. keys are active.  Pressing plus drops a ball at random down one of the
  136. eight entry paths.  Pressing minus allows you to pass your turn to
  137. your opponent.
  138.  
  139.      Once you've mastered the regular game, you can add some new rules.
  140. Each player gets three passes per half, similar to the three timeouts
  141. in a football game.  If you don't like the looks of the board, press
  142. the minus key to use one of your passes.  After one player has skipped
  143. a turn, the other player must play (this prevents the possibility of
  144. six passes in a row).  It's also a good idea to make a rule that a
  145. player can't pass on two consecutive turns.  You can also give each
  146. player two random moves to be played for the opponent.  In other words,
  147. after making a move, you could inform your opponent that you're going
  148. to give him one of your random moves and you would press the plus key.
  149.  
  150.      Here's one more change you could make: Instead of alternating
  151. turns, allow a player to continue after scoring.  When a player drops
  152. a ball and scores some points, the other player would have to pass (by
  153. pressing the minus key).  If the first player scores again, the
  154. opponent passes again, and so on until no more points are scored.
  155.  
  156.      To drop a ball, press a numbered key (1-8).  By using the pass
  157. and random turn options, you can play against the computer.  Here are
  158. the rules for solitaire play:
  159.  
  160.           1. The computer always scores first.  At the beginning of
  161. every round, the computer plays randomly until at least one point is
  162. acquired.  Press the plus key for the computer's turn.  You must
  163. continue passing (skip your turn with the minus key) until the
  164. computer puts points on the board.
  165.  
  166.           2. After the first score by the computer, you can begin to
  167. play.  When the computer has a turn, press the plus key for a random
  168. move.
  169.  
  170.           3. Whenever you make points, you must pass again until the
  171. computer scores.  When the computer gets more points, you can begin
  172. to play again.  This rule means you should hold back on the easy
  173. scores of a few points; wait until there's an avalanche available.
  174.  
  175.           4. If you're the first to reach the goal, the computer gets
  176. a last chance.  Don't make this move randomly; figure out the best
  177. opportunity for scoring and play that move for the last-chance turn.
  178.  
  179.      In the interest of keeping the program to a manageable length,
  180. no attempt was made to provide an "intelligent" computer opponent.
  181. Once you become familiar with the game, you might find it an
  182. interesting project to try adding some routines that give the computer
  183. a rational basis for picking one move over another.
  184.