DECLARE SUB loser () DECLARE SUB winner () DECLARE SUB BetCalc () DECLARE SUB instructions () DECLARE SUB GetInfo () DECLARE SUB betting () DIM SHARED name$ DIM SHARED bet DIM SHARED lane DIM SHARED money DIM SHARED win RANDOMIZE TIMER win = 0 money = 1000 CLS GetInfo betting start: CLS LOCATE 1, 4: COLOR 10: PRINT "Start": COLOR 14: LOCATE 1, 15: PRINT "Finish": LOCATE 1, 30: PRINT "Money: $"; money LOCATE 2, 4: COLOR 10: PRINT "!"; : COLOR 15: PRINT " ! ! ! ! ! "; : COLOR 14: PRINT "!" COLOR 15: LOCATE 3, 2: PRINT 1: COLOR 10: LOCATE 3, 4: PRINT "!": COLOR 15: LOCATE 3, 22: COLOR 14: PRINT "!": LOCATE 3, 23: COLOR 15: PRINT 1 LOCATE 7, 37: COLOR 9: PRINT "You have bet $"; bet; "on Horse #"; lane: COLOR 15 LOCATE 4, 2: PRINT 2: COLOR 10: LOCATE 4, 4: PRINT "!": COLOR 15: LOCATE 4, 22: COLOR 14: PRINT "!": LOCATE 4, 23: COLOR 15: PRINT 2 LOCATE 5, 2: PRINT 3: COLOR 10: LOCATE 5, 4: PRINT "!": COLOR 15: LOCATE 5, 22: COLOR 14: PRINT "!": LOCATE 5, 23: COLOR 15: PRINT 3 LOCATE 6, 2: PRINT 4: COLOR 10: LOCATE 6, 4: PRINT "!": COLOR 15: LOCATE 6, 22: COLOR 14: PRINT "!": LOCATE 6, 23: COLOR 15: PRINT 4 LOCATE 7, 2: PRINT 5: COLOR 10: LOCATE 7, 4: PRINT "!": COLOR 15: LOCATE 7, 22: COLOR 14: PRINT "!": LOCATE 7, 23: COLOR 15: PRINT 5 LOCATE 8, 2: PRINT 6: COLOR 10: LOCATE 8, 4: PRINT "!": COLOR 15: LOCATE 8, 22: COLOR 14: PRINT "!": LOCATE 8, 23: COLOR 15: PRINT 6 LOCATE 9, 2: PRINT 7: COLOR 10: LOCATE 9, 4: PRINT "!": COLOR 15: LOCATE 9, 22: COLOR 14: PRINT "!": LOCATE 9, 23: COLOR 15: PRINT 7 LOCATE 10, 2: PRINT 8: COLOR 10: LOCATE 10, 4: PRINT "!": COLOR 15: LOCATE 10, 22: COLOR 14: PRINT "!": LOCATE 10, 23: COLOR 15: PRINT 8 LOCATE 11, 2: PRINT 9: COLOR 10: LOCATE 11, 4: PRINT "!": COLOR 15: LOCATE 11, 22: COLOR 14: PRINT "!": LOCATE 11, 23: COLOR 15: PRINT 9 LOCATE 12, 2: PRINT "10": COLOR 10: LOCATE 12, 4: PRINT "!": COLOR 15: LOCATE 12, 22: COLOR 14: PRINT "!": LOCATE 12, 23: COLOR 15: PRINT 10 COLOR 7: LOCATE 3, 5: PRINT CHR$(1) LOCATE 4, 5: PRINT CHR$(2) LOCATE 5, 5: PRINT CHR$(3) LOCATE 6, 5: PRINT CHR$(4) LOCATE 7, 5: PRINT CHR$(5) LOCATE 8, 5: PRINT CHR$(6) LOCATE 9, 5: PRINT "*" LOCATE 10, 5: PRINT CHR$(8) LOCATE 11, 5: PRINT "&" LOCATE 12, 5: PRINT "@": COLOR 15 LOCATE 14, 3: PRINT "On your marks...": SLEEP 1 LOCATE 15, 3: PRINT "Get set...": SLEEP 1 LOCATE 16, 3: PRINT "GO!" LOCATE 3, 5: PRINT CHR$(0) LOCATE 4, 5: PRINT CHR$(0) LOCATE 5, 5: PRINT CHR$(0) LOCATE 6, 5: PRINT CHR$(0) LOCATE 7, 5: PRINT CHR$(0) LOCATE 8, 5: PRINT CHR$(0) LOCATE 9, 5: PRINT CHR$(0) LOCATE 10, 5: PRINT CHR$(0) LOCATE 11, 5: PRINT CHR$(0) LOCATE 12, 5: PRINT CHR$(0) x = 3: xx = 4: xxx = 5: xxxx = 6: xxxxx = 7: six = 8: sevenx = 9: eightx = 10: ninex = 11: tenx = 12 y = 5: yy = 5: yyy = 5: yyyy = 5: yyyyy = 5: sixy = 5: seveny = 5: eighty = 5: niney = 5: teny = 5 DO IF y = 22 THEN GOTO ywin ELSEIF yy = 22 THEN GOTO yywin ELSEIF yyy = 22 THEN GOTO yyywin ELSEIF yyyy = 22 THEN GOTO yyyywin ELSEIF yyyyy = 22 THEN GOTO yyyyywin ELSEIF sixy = 22 THEN GOTO sixywin ELSEIF seveny = 22 THEN GOTO sevenywin ELSEIF eighty = 22 THEN GOTO eightywin ELSEIF niney = 22 THEN GOTO nineywin ELSEIF teny = 22 THEN GOTO tenywin ELSE b: COLOR 7 a = INT(RND(1) * 102 + 1) b = INT(RND(1) * 102 + 1) IF b > 90 AND b < 101 OR a > 90 AND a < 93 THEN GOTO y IF b > 80 AND b < 91 OR a > 80 AND a < 83 THEN GOTO yy IF b > 70 AND b < 81 OR b = 10 THEN GOTO yyy IF b > 60 AND b < 71 OR b = 20 THEN GOTO yyyy IF b > 50 AND b < 61 OR a = 45 THEN GOTO yyyyy IF b > 40 AND b < 51 OR a = 5 THEN GOTO sixy IF b > 30 AND b < 41 OR a > 30 AND a < 41 THEN GOTO seveny IF b > 20 AND b < 31 OR a > 20 AND a < 31 THEN GOTO eighty IF b > 10 AND b < 19 THEN GOTO niney IF b > 0 AND b < 9 THEN GOTO teny IF b = b THEN GOTO b y: LOCATE x, y PRINT CHR$(1) a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a > 0 AND a < 10 THEN LOCATE x, y PRINT CHR$(0) y = y + 1 END IF yy: LOCATE xx, yy PRINT CHR$(2) a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a > 25 AND a < 31 THEN LOCATE xx, yy PRINT CHR$(0) yy = yy + 1 END IF yyy: LOCATE xxx, yyy PRINT CHR$(3) a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a > 19 AND a < 22 THEN LOCATE xxx, yyy PRINT CHR$(0) yyy = yyy + 1 END IF yyyy: LOCATE xxxx, yyyy PRINT CHR$(4) a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a > 29 AND a < 31 THEN LOCATE xxxx, yyyy PRINT CHR$(0) yyyy = yyyy + 1 END IF yyyyy: LOCATE xxxxx, yyyyy PRINT CHR$(5) a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a > 39 AND a < 42 THEN LOCATE xxxxx, yyyyy PRINT CHR$(0) yyyyy = yyyyy + 1 END IF sixy: LOCATE six, sixy PRINT CHR$(6) a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a > 57 AND a < 59 THEN LOCATE six, sixy PRINT CHR$(0) sixy = sixy + 1 END IF seveny: LOCATE sevenx, seveny PRINT "*" a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a = 70 THEN LOCATE sevenx, seveny PRINT CHR$(0) seveny = seveny + 1 END IF eighty: LOCATE eightx, eighty PRINT CHR$(8) a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a = 80 THEN LOCATE eightx, eighty PRINT CHR$(0) eighty = eighty + 1 END IF niney: LOCATE ninex, niney PRINT "&" a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a = 90 OR a = 93 THEN LOCATE ninex, niney PRINT CHR$(0) niney = niney + 1 END IF teny: LOCATE tenx, teny PRINT "@" a = INT(RND(1) * 100 + 1) a = INT(RND(1) * 100 + 1) IF a = 99 OR a = 96 THEN LOCATE tenx, teny PRINT CHR$(0) teny = teny + 1 END IF ELSE END IF LOOP ywin: COLOR 15 LOCATE 3, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT CHR$(1) PRINT "Number one wins!" win = 1 SLEEP 3: BetCalc GOTO start yywin: COLOR 15 LOCATE 4, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT CHR$(2) PRINT "Number two wins!" win = 2 SLEEP 3: BetCalc GOTO start yyywin: COLOR 15 LOCATE 5, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT CHR$(3) PRINT "Number three wins!" win = 3 SLEEP 3: BetCalc GOTO start yyyywin: COLOR 15 LOCATE 6, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT CHR$(4) PRINT "Number four wins!" win = 4 SLEEP 3: BetCalc GOTO start yyyyywin: COLOR 15 LOCATE 7, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT CHR$(5) PRINT "Number five wins!" win = 5 SLEEP 3: BetCalc GOTO start sixywin: COLOR 15 LOCATE 8, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT CHR$(6) PRINT "Number six wins!" win = 6 SLEEP 3: BetCalc GOTO start sevenywin: COLOR 15 LOCATE 9, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT "*" PRINT "Number seven wins!" win = 7 SLEEP 3: BetCalc GOTO start eightywin: COLOR 15 LOCATE 10, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT CHR$(8) PRINT "Number eight wins!" win = 8 SLEEP 3: BetCalc GOTO start nineywin: COLOR 15 LOCATE 11, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT "&" PRINT "Number nine wins!" win = 9 SLEEP 3: BetCalc GOTO start tenywin: COLOR 15 LOCATE 12, 22: PRINT CHR$(0) LOCATE 18, 2: PRINT "@" PRINT "Number ten wins!" win = 10 SLEEP 3: BetCalc GOTO start SUB BetCalc SLEEP 1 CLS IF lane = win THEN winner IF lane <> win THEN loser END SUB SUB betting bets: CLS COLOR 14: LOCATE 1, 50: PRINT "Money: $"; money: COLOR 7 PRINT "Here are the odds:" PRINT PRINT "Lane Racer Odds" PRINT "1. "; CHR$(1); " ........ 20:1" PRINT "2. "; CHR$(2); " ........ 20:1" PRINT "3. "; CHR$(3); " ........ 18:1" PRINT "4. "; CHR$(4); " ........ 19:1" PRINT "5. "; CHR$(5); " ........ 3:1" PRINT "6. "; CHR$(6); " ........ 6:1" PRINT "7. * ........ 6:1" PRINT "8. "; CHR$(8); " ........ 4:1" PRINT "9. & ........ 1:1" PRINT "10. @ ........ 1:1" PRINT INPUT "To bet on a horse simply enter their lane number"; lane INPUT "How much are you willing to bet on this horse?"; bet INPUT "Is this right?"; yorn$ yorn$ = UCASE$(yorn$) IF yorn$ = "N" OR yorn$ = "NO" THEN GOTO bets money = money - bet END SUB SUB GetInfo CLS INPUT "Name?"; name$ INPUT "Age?"; age IF age < 18 THEN PRINT "You're not old enough to gamble!" PRINT "But if you don't tell anyone, I'll let you go in" END IF INPUT "Instructions?"; instr$ instr$ = UCASE$(instr$) IF instr$ = "Y" OR instr$ = "YES" THEN instructions END SUB SUB instructions CLS PRINT "Welcome, "; name$; ", to Marc Bryan's Horseracing game." PRINT PRINT "If the little things don't look like horses to you, then shut up and use your" PRINT "imagination." PRINT "The game is very simple."; PRINT "Be sure to take into consideration the odds. I've run a million races and those" PRINT "are the most accurate I could come up with." PRINT PRINT "An explanation of the odds" PRINT "Odds are the possibility that a horse is going to win the race." PRINT "Take, for example, number ten. It's odds are 1:1. So if you bet $50 on this" PRINT "horse, and number ten wins, you win your $50 back." PRINT "But, if you bet on number one, and it wins, with it's odds being 20:1, and you, once again, bet $50, you would win $1000." PRINT "However, this may sound good, but the chances of a horse with 20:1 winning are" PRINT "very slim." PRINT PRINT "You start out at $1000. You win if you reach $10000, or lose if you go -$50" PRINT "Just bet on the horse, and watch the race!" PRINT "Good luck!" PRINT PRINT "Press any key to continue" DO: LOOP WHILE INKEY$ = "" END SUB SUB loser PRINT "Ooo, sorry! You lost $"; bet IF money <= -50 THEN PRINT "Oh, you lost. Too bad! Better luck next time!" END IF PRINT "You now have $"; money INPUT "Too bad. Would you like to try again?"; yorn$ yorn$ = UCASE$(yorn$) IF yorn$ = "N" OR yorn$ = "NO" THEN END ELSE END IF betting END SUB SUB winner IF win = 1 THEN odds$ = "20:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" bet = bet * 20 PRINT "You have made "; bet money = money + bet PRINT "Your cash in hand is now $"; money ELSEIF win = 2 THEN odds$ = "20:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" bet = bet * 20 PRINT "You have made "; bet money = money + bet PRINT "Your cash in hand is now $"; money ELSEIF win = 3 THEN odds$ = "18:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" bet = bet * 18 PRINT "You have made "; bet money = money + bet PRINT "Your cash in hand is now $"; money ELSEIF win = 4 THEN odds$ = "19:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" bet = bet * 19 PRINT "You have made "; bet money = money + bet PRINT "Your cash in hand is now $"; money ELSEIF win = 5 THEN odds$ = "3:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" bet = bet * 3 PRINT "You have made "; bet money = money + bet PRINT "Your cash in hand is now $"; money ELSEIF win = 6 THEN odds$ = "6:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" bet = bet * 6 PRINT "You have made "; bet money = money + bet PRINT "Your cash in hand is now $"; money ELSEIF win = 7 THEN odds$ = "7:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" bet = bet * 7 PRINT "You have made "; bet money = money + bet PRINT "Your cash in hand is now $"; money ELSEIF win = 8 THEN odds$ = "4:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" bet = bet * 4 PRINT "You have made "; bet money = money + bet PRINT "Your cash in hand is now $"; money ELSEIF win = 9 THEN odds$ = "1:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" PRINT "You have made your money back" money = money + bet PRINT "Your cash in hand is now $"; money ELSEIF win = 10 THEN odds$ = "1:1" PRINT "Congratulations! You're a winner!" PRINT "You bet on horse #"; lane; "with a bet of $"; bet; "at the odds of "; odds$; "!" PRINT "You have made your money back" money = money + bet PRINT "Your cash in hand is now $"; money END IF IF money >= 10000 THEN PRINT "You are the most amazing person I've never met!" PRINT "Congratulations. You have won the game." END END IF PRINT "Good betting!" INPUT "Would you like to try again?"; yorn$ yorn$ = UCASE$(yorn$) IF yorn$ = "N" OR yorn$ = "NO" THEN END betting END SUB