CASH-FLOW by Hugh Davis from ZX Computing Feb/Mar.1986 COIN DROP Hugh Davis has been visiting the Hereford arcades and offers you the chance to get rich quick! The program 'Coin Drop' is a version of the coin-in-the-slot game popular in seaside and fairground amusement arcades. A coin is allowed to fall down a vertical pin-board bouncing from one pin to another in a random path until it reaches one of six coin-bearing channels. The channels contain anything from zero to four coins, and the aim is to bring the total up to five, upon which all five will 'drop' to the player's advantage. Coins won in this way can be retained or reinserted. The result is influenced principally by the decision when to allow the coin to fall during its passage along the top of the board. However, there is the facility to 'nudge' the coin just once in either direction. The fourth channel swallows up all coins and so should be avoided! You have only six coins to start with, and so it is essential to make an early gain. Figure 1. Lines 3000-3050 define graphics 2500-2538 write the title 2540-2580 illustrate the title page 2600-2670 print the instructions 35-65 draw the pinboard 75-85 draw the coin channels 1000-1050 draw a random number of coins in each of five channels 1105-1160 transport a coin across the top of the board 1200-1320 cause the coin to fall as far as the first pin 135-190 cause the coin to bounce down the pins as far as the coin channels 500-560 make the coin come to rest immediately above the next highest coin in its channel 604-615 empty a filled channel 2000-2080 print the Score Sheet at the end of the game Figure 2. Variables a$ top half of coin B$ bottom half of coin a to f no. of coins in the channels g no. of coins in the channel being topped up k decides direction of horizontal motion m distance fallen l gross loss w gross winnings nw net winnings in any one game ow overall winnings cr coins in hand (x,y) coin coordinates -- end of file --