Compucolor.org – Virtual Media

Listing of file='DERBY.BAS;01' on disk='vmedia/blackjack-sector.ccvf'

100 REM  ** DERBY - MODIFIED JAN 23,79 **
110 FOR I= 1TO PEEK (33209):X= RND (1):NEXT I
120 PLOT 6,2,12,14,3,10,15:PRINT "WELCOME TO THE COMPUCOLOR DERBY!"
130 FOR I= 1TO 1500:NEXT I
140 CLEAR 500:PLOT 15,27,24
150 REM


160 REM  INITIALIZE VALUES
170 A$(1)= "MORNING GLORY":A$(2)= "SALVATION"
180 A$(3)= "FAST EDDIE":A$(4)= "GREASED LIGHTNING"
190 OI= 1:R= 5:Z= 5:X$= "    "
200 FOR X= 1TO 4:A(X)= 0:NEXT
210 DATA 2,254,200,204,204,126,70,255,10,26,26,26,26,26
220 DATA 2,254,0,195,60,0,0,255
230 DATA 2,254,192,3,48,12,0,255
240 FOR I= 1TO 14:READ J
250 A1$= A1$+ CHR$ (J):NEXT
260 A2$= A1$
270 FOR I= 1TO 8:READ J:A1$= A1$+ CHR$ (J):NEXT
280 FOR I= 1TO 8:READ J:A2$= A2$+ CHR$ (J):NEXT
290 A$= A1$
300 REM



310 REM  DRAW THE TRACK
320 PLOT 6,2,12
330 FOR I= 1TO 4:PLOT 3,0,I* 5,6,48:PRINT SPC( 60);""
340 PLOT 3,0,I* 5- 3,6,I:PRINT A1$
350 PLOT 3,0,I* 5- 1:PRINT A$(I)
360 NEXT I:PLOT 6,5,2,121,127,242,121,127,121,44,255
370 PLOT 6,2:GOTO 730
380 REM



390 REM  MOVE THE HORSES
400 X= RND (1)* 4+ 1:A(X)= A(X)+ Z
410 X= INT (X):I= X:I(I)= A(X)
420 IF I(I)- 5< 0THEN I(I)= 5
430 IF OI= 1THEN OI= 0:GOTO 470
440 PLOT 3,0,I* R- 3,6,0:PRINT A1$
450 PLOT 3,I(I)- 5,I* R- 3
460 PLOT 6,0:PRINT A$
470 PLOT 3,A(X),X* R- 3
480 IF A$= A1$THEN A$= A2$:GOTO 500
490 A$= A1$
500 PLOT 6,X:PRINT A$
510 IF A(X)> 54THEN 560
520 FOR G= 1TO 50:NEXT
530 GOTO 400
540 REM



550 REM  PRINT RESULTS
560 GOSUB 1070
570 PLOT 3,12,24:PRINT "AT THE POST IT IS---";A$(X)
580 HO$= A$(X):FOR X= 1TO 4:IF HO$(X)< > HO$THEN NEXT :GOTO 1050
590 PRINT
600 PRINT :PRINT NA$(X)" WINS $";:A= NA(X)* 4- NA(X):PRINT A".00 BY BETTING ON "HO$
610 X= X+ 1:IF X> 4THEN 660
620 IF HO$(X)= HO$THEN 600
630 GOTO 610
640 REM



650 REM  PLAY AGAIN?
660 PLOT 3,0,31:INPUT "WOULD YOU LIKE TO PLAY AGAIN? ";A$
670 IF LEFT$ (A$,1)< > "N"THEN 140
680 PLOT 12,14,6,2,3,25,15
690 PRINT "SEE YOU AGAIN!"
700 FOR I= 1TO 1000:NEXT I
710 LOAD "MENU":RUN
720 REM



730 REM  PRINT QUESTIONS AND ANSWERS
740 FOR Z= 1TO 4
750 GOSUB 1070:PLOT 3,0,25
760 PRINT "DOES SOMEONE";:IF Z> 1THEN PRINT " ELSE";
770 INPUT " WISH TO PLACE A BET (Y OR N) ? ";Q$
780 IF LEFT$ (Q$,1)= "N"THEN Z= 4:GOTO 940
790 PLOT 6,2
800 INPUT "WHAT IS YOUR NAME, PLEASE ?";NA$(Z)
810 INPUT "ON WHICH HORSE DO YOU WISH TO BET (ENTER FIRST LETTER)? ";HO$(Z)
820 FOR U= 1TO 4:IF LEFT$ (HO$(Z),1)= LEFT$ (A$(U),1)THEN 860
830 NEXT U
840 PRINT "TRY AGAIN"
850 FOR JK= 1TO 700:NEXT :PLOT 13,11:GOTO 810
860 PLOT 6,4
870 HO$(Z)= A$(U):PRINT "HOW MUCH DO YOU WISH TO BET ON ";HO$(Z)" ";:INPUT NA(Z)
880 PRINT :IF NA(Z)> = 2THEN 920
890 PLOT 6,1,3,0,28:FOR I= 1TO 4:PLOT 11:PRINT :NEXT I
900 PLOT 3,0,28,11:PRINT "YOU HAVE TO BET AT LEAST $2.00 ";NA$(Z)
910 GOTO 860
920 FOR LK= 26TO 30:PLOT 3,0,LK,11:NEXT
930 PLOT 6,1,3,0,26
940 NEXT Z
950 GOSUB 1070
960 REM



970 REM  PRINT THE BETS
980 PLOT 6,3,3,0,26
990 FOR X= 1TO 4:PLOT 11:PRINT TAB( 5)NA$(X)TAB( 20)"$"NA(X);
1000 PRINT TAB( 40)HO$(X):NEXT
1010 FOR X= 1TO 2:PLOT 11,10:NEXT
1020 PLOT 3,20,25,6,5:PRINT "THE BETS";TAB( 20);"THE HORSES"
1030 R= 5:Z= 5
1040 GOTO 400
1050 PRINT :PRINT :PRINT
1060 PRINT "THERE WERE NO BETS ON "HO$:PRINT :PRINT :GOTO 660
1070 PLOT 6,1,3,0,22
1080 FOR I= 1TO 9:PLOT 11:PRINT :NEXT I
1090 RETURN