"The Game of GAMBLER!" (from Vol. 1 No. 8) GAMBLER! is more than a dozen different games of chance. Youand as many as three of your friends compete in a contest tosee who can parlay a $100 stake into $1000 first. Thecomputer would not be content to just keep score and watchall this money change hands so it becomes a "player" withjust the same chances of winning and losing as you have! On each player's turn, he is first given the opportunity tobuy as many as three lottery tickets. A lottery ticketcosts $10, but may return $100 to the owner if it matchesthe winning numbers in the lottery held occasionally. Afterpurchasing any tickets desired, the wheel of fortune isshown. A graphic pointer dances randomly around the boardstopping momentarily beside the name of one of the manygames which can be played. The player touches any key andthe pointer slowly settles into one category -- that is thegame which the player will participate in on his turn. There are many types of games available in GAMBLER! Someare very simple; you may be instructed by a mysteriousfortune teller to give or receive amounts of money to orfrom other players or the bank. The names of some of thesecategories are somewhat deceptive so pay close attention asthe message crawls slowly across the screen. There are also several betting games involving dice. Youcan win or lose money by betting on the outcome of two dicerolls -- will the total be even, will your roll be highest,or will it be the lucky number seven? There is even a formof "dice poker" with the best hand taking the pot. The game of GAMBLER! even has its own horse racing track sothat all the players can bet on the outcome and try to winthe purse. Lotteries are also held once in a while to payoff the winning lottery tickets. Big money is availablewhenever a sweepstakes is held. The correct bet on theoutcome of the roll of six dice can bring the winner $150,$200, $300, or even $450. GAMBLER! is loosely based on a board game with many extrasadded. Because the computer always plays, you can practicewith it. And since as many as four humans can play alongwith the computer, it makes a great game for parties or whenyou have a large crowd eager to play with the computer.Overall, the program is fairly straightforward and easy touse. The Grandy will make all its own decisions and even "touchkeys" as directed by the program. The only exception tothis is the note at the bottom of the page asking you to"TOUCH ANY KEY TO CONTINUE". Usually, this delay is toallow you to read some instructions or make a decision.Even when it is the computer's turn, it will wait for you togive the signal to continue. The winner is the first player to go over the $1000 mark.In case of a tie, the game continues until someone getsahead. Should you go broke, the bank will advance you $100but will charge you with one IOU. As soon as you are able,you must pay the IOU back at a price of $110. Thesetransactions will take place only on your turn. Let's look at how the program works. Lines 1 through 60perform some initialization chores. Lines 30 and 40 set thenumber of players N. Line 50 determines the player's namesand initializes money M(I), number of IOUs IO(I), andlottery tickets L$(I). If desired, instructions aredisplayed after prompting in line 50. The main game loop is found in lines 70 through 190. Theloop using variable IP cycles through each player's turn.Present money totals are displayed in line 80. Problemsdealing with players who have gone broke are handled inlines 90 through 120. Lottery tickets are bought in lines130 through 150. A game number is selected in subroutine290, and line 180 transfers control to the appropriateroutine. Subroutine 200 is called from the main loop to check for awinner. The highest money total is found in line 200. Ifthat value is greater than $1000, then the winner isnotified; otherwise, the game continues. The option ofplaying a new game is presented in lines 240 and 250. The lottery subroutine begins in line 260. The programselects a two-digit lottery ticket that is different fromall other lottery tickets issued. The results are displayedin line 280. The game selection routine begins in line 290. The borderis printed, and the names of the games are read from DATAstatements beginning at line 390. Lines 320 through 350wait for players to touch any key. Lines 360 through 380settle on one game, set the game number GN, and return. Subroutine 420 performs some graphics initialization,setting up graphics variables D$(1) through D$(6), which arepictures of the six dice. Lines 460 through 480 set up the graphics display for thesweepstakes routine. Line 490 offers optional instructions,which are in lines 510 through 530. Lines 540 through 600record each player's sweepstakes bet in S$(J). Line 620rolls six dice, displays them, and records them in D(X).The highest number rolled is stored in HN. Line 630 checksfor pairs, 640 and 650 for a straight, 660 for a split, and670 for single spots. Instructions for the lottery and all lottery tickets issuedare displayed in line 710. Array D(J) is set equal to zero;six dice are rolled and displayed. If a number J is rolled,D(J) is set to 1. Winning tickets are evaluated in line730. The horse race routine begins at line 750. The heading andinstructions are displayed in lines 750 and 760. Array D(K)holds the horizontal screen position for each of the sixhorses. Each of the six horses are randomly advanced byincrementing its screen print position. When D(K)approaches the edge of the screen in line 780, the winner isannounced in lines 790 and 800. The fortune teller routine beginning at line 800 randomlyselects a message in lines 810 through 880. The message isdisplayed in lines 900 through 920. Instructions for thehigh roller game are presented in line 940; each playerrolls two dice in line 950. The high roll is determined inlines 960 and 970. A single winner is announced in line980; a tie causes a re-roll in lines 990 through 1010. The poker party subroutine instructions are found in line1020. Three dice are rolled in lines 1030 for all players.Line 1040 checks for three of a kind; line 1050 checks for apair; and line 1070 checks for a straight. The winner isannounced in line 1120. A number of short message routines follow: Love Thy Neighbor(in line 1130), E-Z Come E-Z Go (1170), Win a Few (1190),Unlucky Seven (1200), Lose a Few (1230), Even Steven (1240),Pot Luck (1300), Jackpot (1310), $100 Bonus (1320), Lose aTurn (1330), Tax Time (1340), Bonanza (1350), and Mad Money(1360). Game instructions are found in line 1370. Subroutine 1460places a die on the screen. Subroutine 1470 presents the"touch any key to continue" message, and waits for akeystroke before returning. So the time has come. Type in this program, gather three ofyour friends around the video screen, and see who is thechampion gambler in your household.