Horse Race


Horse Race is a racing and betting game for any numbers of players in which six horses race across the screen. At the beginning of the game you can choose how many races there will be at the meeting.

Before the start of each race the betting form is displayed, complete with the tipsters odds on each runner. The odds are a fairly accurate reflection of each horse's potential.

Starting with £200, each player may bet on one horse in each race and the winner is the player who ends up with the largest amount of money at the end of the meeting. If you want the rules to allow cheating then players who lose all their money may have the option of accepting the offer of an additional £50, otherwise they are out of the game.

    1 REM *** BBC VERSION ***
    2 REM *** HORSE RACE  ***
   10  MODE1:VDU23,1,0;0;0;0;:GOSUB910:GOSUB6
80:CLS
   20  COLOUR3: PRINTTAB(4,7)"How many races 
would you like":VDU31,4,8:INPUT "there to be 
at this meeting",RACES
   30  VDU31,4,18:INPUT"How many punters are 
there ",A
   40  DIMP(A):DIMF(6):DIME(A):DIMB(A):DIMX(6
):DIMH(6):FORC=1TOA:P(C)=200:NEXT
   50  CLS:GOSUB 480
   60  FORC=2TO12STEP2:COLOUR3:PRINTTAB(4,C+5
);C/2:COLOUR1:VDU31,6,C+5,141:COLOUR2:VDU31,6
,C+4,142:NEXT:COLOUR2:VDU31,6,18,142
   70  COLOUR2:GCOL0,2:MOVE 1136,842:DRAW 113
6,423
   80  PRINTTAB(35,5)"o"
   90  A$="FINISH":FORC=1TO6:PRINTTAB(35,19+C
)MID$(A$,C,1):NEXT:FORC=1TO7:MOVE 194,368+64*
C:DRAW 1136,368+64*C:NEXT
  100  GOSUB 120
  110  END
  120  SOUND2,-12,25,8:COLOUR1:PRINTTAB(6,20)
"READY":FORI=1TO2000:NEXT:SOUND2,-12,53,4:PRI
NTTAB(6,20)"STEADY":FORI=1TO2000:NEXT:SOUND2,
-12,81,6:PRINTTAB(6,20)"GO     ":FORI=1TO2000
:NEXT:SOUND2,-12,109,5:PRINTTAB(6,20)"   "
  130  GE=0:FORC=1TO6:X(C)=2:NEXT
  140  FORC=1TO6:SOUND0,-12,80,1:SOUND0,-12,1
50,1:X(C)=X(C)-(F(C)=1 AND RND(1)<.8)-(F(C)=2
 AND RND(1)<.77)-(F(C)=4 AND RND(1)<.74)-(F(C
)=8 AND RND(1)<.71)-(F(C)=16 AND RND(1)<.68)-
(F(C)=32 AND RND(1)<.65)
  150    VDU31,X(C)+3,C*2+5,32,141
  160    IF X(C)=31THEN GE=1
  170  NEXT
  180  IFGE=1THENGOTO200
  190  GOTO140
  200  MANY=0:FOR C=1TO6
  210    IFX(C)=31THEN MANY=MANY+1:H(MANY)=C
  220  NEXT
  230  IFMANY=1THENWINNER=H(1):GOTO370
  240  PRINTTAB(4,25)"There is a photo-finish
":PRINTTAB(4,26)"between these horses:  ":PRI
NTTAB(28,26);H(1);"  ";H(2);"  ";
  250  IFMANY=3THENPRINT;H(3);
  260  IFMANY=4THENPRINT;"  ";H(4)
  270  FORC=1TO10000:NEXT
  280  ER=INT(RND(1)*4)+1
  290  WINNER=H(ER)
  300  IF WINNER=0THENGOTO280
  310  IFRND(1)<.33THEN G$="a short head":GOT
O340
  320  IFRND(1)<.4THENG$="a neck":GOTO340
  330  G$="1 length"
  340  VDU31,4,25:I=0:REPEAT:I=I+1:PRINT" ";:
UNTIL I=80
  350  PRINTTAB(5,25)"The winner is ";WINNER:
PRINTTAB(5,26)"who won by ";G$:FORI=1TO10000:
NEXT
  360  CLS:GOTO380
  370  PRINTTAB(5,25)"The winner is ";WINNER:
PRINTTAB(5,26)"who won by ";RND(2)+2;" length
s.":FORI=1TO10000:NEXT:CLS
  380  FOR R=1TOA
  390    IFP(R)=0THEN R=R+1:GOTO-1101*(R<A+1)
-1130*(R=A+1)
  400   IFE(R)=WINNER THEN P(R)=P(R)+B(R)*F(W
INNER):GOTO420
  410   P(R)=P(R)-B(R)
  420   IFP(R)<=0THENGOTO 830
  430   IFE(R)<>WINNER THEN GOTO450
  440   CLS:PRINTTAB(8,15);"Well done punter 
";R;" !":PRINTTAB(8,16);"Your horse won and y
ou":PRINTTAB(8,17)" now have `";P(R):FOR I=1T
O10000:NEXT:CLS:GOTO460
  450   CLS:PRINTTAB(8,15);"Bad luck punter "
;R;" !":PRINTTAB(8,16)"Your horse did not win
, and so ":PRINTTAB(8,17)"you now have `";P(R
):FORI=1TO10000:NEXT:CLS
  460  NEXT
  470  GOTO 50
  480  RACES=RACES+1:IFRACES=-1THENGOTO620
  490  FORC=1TO6:F(C)=2^INT(RND(1)*6):NEXT
  500  COLOUR1:PRINTTAB(4,6)"The tipsters rec
kon the betting:":FORC=1TO6:VDU31,6,2*C+7:PRI
NT"HORSE ";C;"    ";F(C);":1"
  510    IFF(C)=1THEN VDU31,17,2*C+7:PRINT"EV
ENS"
  520  NEXT
  530  COLOUR2:FORJ=1TOA:SOUND2,-14,35+J*7,3
  540    IF P(J)=0 THENJ=J+1:GOTO-2031*(J<A+1
)-2050*(J=A+1)
  550   PRINTTAB(5,21)"Punter ";J;" :":PRINTT
AB(5,22)"You have `";P(J);".       ":PRINTTAB
(5,23)"How much would you like to bet"
  560    VDU31,36,23:INPUT B(J):IFB(J)>P(J)TH
ENPRINTTAB(36,23)"    ":GOTO560
  570    IFB(J)<>INT(B(J))THENGOTO560
  580    PRINTTAB(5,25)"On which horse is thi
s to":PRINTTAB(5,26)"be placed"
  590    VDU31,13,26:INPUT E(J):IFE(J)<1ORE(J
)>6THEN:PRINTTAB(13,26)"      ":GOTO590
  600    PRINTTAB(36,23)"     ":VDU31,5,25:I=
0:REPEAT:I=I+1:PRINT" ";:UNTIL I=50
  610  NEXT:CLS:RETURN
  620  CLS:COLOUR2:PRINTTAB(6,9)"THE MEETING 
IS NOW FINISHED"
  630  FORI=1TOA
  640    IFP(I)=0THEN I=I+1:GOTO -6015*(I<A+1
)-6040*(I=A+1)
  650   VDU10:PRINTTAB(6)"Punter ";I;" finish
es with `";P(I)
  660 NEXT
  670 PRINTTAB(6,25)"Press any key to play ag
ain.":I=GET:RUN
  680 COLOUR2:VDU19,2,4,0,0,0
  690  VDU31,4,5,32,32,32,144,32,32,144,32,14
4,144,144,144,32,144,144,144,144,32,144,144,1
44,144,32,144,144,144,144,31,7,6,144,32,32,14
4,32,144,144,144,144,32,144,32,32,144,32,144,
32,32,32,32,144
  700  VDU31,7,7,144,32,32,144,32,144,32,32,1
44,32,144,32,32,144,32,144,32,32,32,32,144
  710  VDU31,7,8,144,144,144,144,32,144,32,32
,144,32,144,144,144,144,32,144,144,144,144,32
,144,144,144,144
  720  VDU31,7,9,144,32,32,144,32,144,32,32,1
44,32,144,144,32,32,32,32,32,32,144,32,144
  730  VDU31,7,10,144,32,32,144,32,144,144,14
4,144,32,144,32,144,32,32,32,32,32,144,32,144
  740  VDU31,7,11,144,32,32,144,32,144,144,14
4,144,32,144,32,32,144,32,144,144,144,144,32,
144,144,144,144
  750  VDU31,9,13,144,144,144,144,32,32,32,14
4,32,32,32,144,144,144,144,32,144,144,144,144
,31,9,14,144,32,32,144,32,32,144,32,144,32,32
,144,32,32,32,32,144
  760  VDU31,9,15,144,32,32,144,32,144,32,32,
32,144,32,144,32,32,32,32,144,31,9,16,144,144
,144,144,32,144,32,32,32,144,32,144,32,32,32,
32,144,14,144,144
  770  VDU31,9,17,144,144,32,32,32,144,144,14
4,144,144,32,144,32,32,32,32,144,31,9,18,144,
32,144,32,32,144,32,32,32,144,32,144,32,32,32
,32,144
  780  VDU31,9,19,144,32,32,144,32,144,32,32,
32,144,32,144,144,144,144,32,144,144,144,144:
FOR I=1TO5000:NEXT:VDU20
  790  COLOUR1: PRINTTAB(1,25)"A gambling gam
e for the whole family":COLOUR2:PRINTTAB(8,27
)" @ PAUL STANLEY"
  800  FORI=1TO10000:NEXT:RETURN
  810  FORI=1TO10000:NEXT
  820  RETURN
  830  CLS:COLOUR2:PRINTTAB(4,10)"Tut Tut! Pu
nter ";R;", you have":PRINTTAB(4,11)"run out 
of money."
  840  PRINTTAB(4,13)"I must therefore not le
t you":PRINTAB(4,14)"Bet any more."
  850  PRINTTAB(4,16)"However, if your rules 
are to ":PRINTTAB(4,17)"allow cheating, if yo
u press C":PRINTTAB(4,18)"I will give you `50
 more."
  860  PRINTTAB(4,19)"Otherwise press X and I
 will",TAB(4,20),"cancel you from the game"
  870  G$=INKEY$(30):IF G$="X"ORG$="x" THENP(
R)=0:GOTO900
  880  G$=INKEY$(30):IFG$="C"ORG$="c"THENP(R)
=50:GOTO900
  890  GOTO870
  900  CLS:GOTO460
  910  VDU23,141,16,27,18,254,62,102,170,34
  920  VDU23,142,255,255,255,255,255,255,255,
255
  930  VDU23,144,239,220,237,1,193,153,85,221
  940  RETURN