High Rollers (HIROLLER.BAS)

High Rollers, game by Frank Walters, 55

Description

High Rollers, game by Frank Walters, 55

From the Antic disk of Antic: June/July 1990 - Vol. 9 No. 2 — disk A.

From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.

What is in this file

Atari BASIC program · 6.6 KB

Dialect
Atari BASIC
Lines
125
Variables
FL, I, C(, TEMP, D(, TOTAL(, P, TOT$, TEMP$, LINE$, PN, PLAYR$, WIN(, AR$, D, X, D$, NAME$, K, L, Y
BASIC listing (125 lines)
1 REM HIGH ROLLERS
2 REM BY FRANK WALTERS
3 REM (c)1990, ANTIC PUBLISHING, INC.
10 GOTO 670
20 POSITION 10,23:? "                      ";
30 RETURN
40 REM SCORE
50 FL=0:FOR I=1 TO 6
60 IF C(I)=3 THEN TEMP=TEMP+1000:FL=1
70 NEXT I
80 FOR I=1 TO 3
90 IF D(I)=1 THEN TEMP=TEMP+100:FL=1
100 IF D(I)=5 THEN TEMP=TEMP+50:FL=1
110 NEXT I
120 IF  NOT FL THEN TEMP=0:GOSUB 290:GOSUB 420:GOSUB 150
130 FL=0:RETURN
140 REM END OF TURN
150 IF TEMP=0 THEN 210
160 IF TOTAL(P)+TEMP>3000 THEN POSITION 10,23:? " YOU ARE OVER 3000";:GOSUB 1020:FOR I=1 TO 300:NEXT I:FL=1:GOTO 210
170 IF TOTAL(P)=0 AND TEMP<500 THEN POSITION 10,23:? " NEED 500 TO START";:FOR I=1 TO 300:NEXT I:GOTO 460
180 TOTAL(P)=TOTAL(P)+TEMP:TEMP=TOTAL(P):GOSUB 290:TOT$(P*4-3,P*4)=TEMP$
190 GOSUB 420
200 IF TOTAL(P)=3000 THEN POP :GOTO 540
210 POSITION 24,P*2+1:? "    "
220 POSITION 1,P*2+1:? "   "
230 GOSUB 20:IF TEMP AND  NOT FL THEN GOSUB 1000
240 IF FL THEN TEMP=0
250 IF  NOT TEMP THEN GOSUB 1020
260 TEMP$="":TEMP=0:FL=0
270 RETURN
280 REM FORMAT SCORE
290 TEMP$=""
300 IF TEMP<1000 THEN TEMP$(1)=" "
310 IF TEMP<100 THEN TEMP$(2)=" "
320 IF TEMP<10 THEN TEMP$(3)=" "
330 TEMP$(LEN(TEMP$)+1)=STR$(TEMP)
340 RETURN
350 REM PRINT GAME SCREEN
360 POSITION 0,0:? "↰             High Rollers               "
370 POSITION 5,1:? "Player       Bank  Score      Wins":POSITION 0,2:? LINE$
380 FOR I=1 TO PN
390 POSITION 5,I*2+1:? PLAYR$(I*10-9,I*10);"-␛→":? LINE$
400 IF WIN(I) THEN TEMP=WIN(I):GOSUB 290:POSITION 35,I*2+1:? TEMP$:TEMP=0
410 NEXT I:RETURN
420 POSITION 18,P*2+1:? TOT$(P*4-3,P*4):RETURN
430 REM MAIN GAME LOOP
440 P=P+1:POKE 77,0:IF P>PN THEN P=1
450 POSITION 1,P*2+1:? AR$
460 GOSUB 20:POSITION 10,23:? "PUSH STICK TO ROLL";
470 IF STRIG(0)=0 THEN GOSUB 640:GOSUB 150:GOTO 440
480 IF STICK(0)=15 THEN 470
490 GOSUB 20:FOR D=1 TO 3:GOSUB 950:NEXT D:GOSUB 980
500 GOSUB 50:GOSUB 290:IF TEMP THEN POSITION 24,P*2+1:? TEMP$
510 IF TEMP=0 THEN 440
520 GOTO 460
530 REM WINNER ROUTINE
540 FOR X=240 TO 50 STEP -2:SOUND 0,X,10,8:NEXT X:SOUND 0,0,0,0:WIN(P)=WIN(P)+1:IF WIN(P)>9 THEN WIN(P)=9
550 POSITION 24,P*2+1:? "<== ":POSITION 1,P*2+1:? "==>"
560 POSITION 0,23:? "START=REPLAY SELECT=RESTART OPTION=QUIT";
570 FOR I=1 TO 10:IF  NOT FL THEN POSITION 28,P*2+1:? "WINNER"
580 IF PEEK(53279)=6 THEN FL=0:POKE 712,0:GOTO 1030
590 IF PEEK(53279)=3 THEN GRAPHICS 0:POKE 82,2:END
600 IF PEEK(53279)=5 THEN RUN
610 IF FL THEN POSITION 28,P*2+1:? "WINNER"
620 NEXT I:FL= NOT FL:POKE 712,PEEK(53770):GOTO 570
630 REM CAN'T PASS BEFORE ROLL
640 IF TEMP=0 THEN GOSUB 20:POSITION 12,23:? "  ROLL FIRST";:FOR I=1 TO 300:NEXT I:POP :GOTO 460
650 RETURN
660 REM INITIALIZE
670 DIM D$(102),D(6),C(6),TEMP$(4),NAME$(11),PLAYR$(80),LINE$(40),AR$(3):AR$="==>"
680 LINE$="─":LINE$(40)=LINE$:LINE$(2)=LINE$
690 D$="   ↓←←← ● ↓←←←   ●  ↓←←←   ↓←←←  ●●  ↓←←← ● ↓←←←  ●● ●↓←←←   ↓←←←● ●● ●↓←←← ● ↓←←←● ●● ●↓←←←● ●↓←←←● ●"
700 PLAYR$="-":PLAYR$(80)=PLAYR$:PLAYR$(2)=PLAYR$
710 FOR I=1 TO 6:D(I)=0:C(I)=0:NEXT I
720 GRAPHICS 1:POKE 708,10:POKE 710,0:POKE 711,88:POKE 752,1:POSITION 4,3:? #6;"high  rollers"
730 POSITION 9,9:? #6;"by":POSITION 4,11:? #6;"frank walters":POSITION 4,15:? #6;"INSTRUCTIONS?"
740 POSITION 8,17:? #6;"(Y/N)":POKE 657,14:FOR I=1 TO 5 STEP 2:? D$(I*17-16,I*17);"↑↑→→";:NEXT I:POKE 82,0
750 GOSUB 1220:IF K=89 OR K=121 THEN 1050
760 IF K=78 OR K=110 THEN 790
770 GOTO 750
780 REM ENTER PLAYERS NAMES
790 GRAPHICS 0:POKE 752,1:POKE 710,128:POKE 82,0
800 ? "HOW MANY PLAYERS?";
810 GOSUB 1220
820 IF K<49 OR K>56 THEN 810
830 PN=K-48:? PN:DIM TOTAL(PN),TOT$(PN*4):FOR I=1 TO PN:TOTAL(I)=0:NEXT I:TOT$(1)=" ":TOT$(PN*4)=" ":TOT$(2)=TOT$
840 DIM WIN(PN):FOR I=1 TO PN:WIN(I)=0:NEXT I:POKE 752,0
850 FOR I=1 TO PN
860 POSITION 2,I*2:? "↑PLAYER #";I;" NAME: ◀";:NAME$=""
870 INPUT NAME$:L=LEN(NAME$):IF L>10 THEN ? :? "MAX 10 LETTERS PLEASE!":FOR X=1 TO 500:NEXT X:? "↑↑":GOTO 860
880 IF  NOT LEN(NAME$) THEN 860
890 TRAP 40000
900 PLAYR$(I*10-9,I*10)=NAME$
910 NEXT I:POKE 752,1
920 GOSUB 360:P=INT(RND(0)*PN)
930 GOTO 440
940 REM ROLL ONE DIE
950 FOR Y=1 TO 10:D(D)=INT(RND(0)*6)+1:POSITION D*6+6,19:? D$(D(D)*17-16,D(D)*17)
960 SOUND 0,100,12,15:SOUND 0,0,0,0:NEXT Y:RETURN
970 REM TOTAL ALL 3 DICE
980 FOR X=1 TO 6:C(X)=0:NEXT X:FOR D=1 TO 5:C(D(D))=C(D(D))+1:NEXT D:RETURN
990 REM SOUND SUBROUTINES
1000 FOR X=1 TO 2:SOUND 0,3,0,8:FOR Y=1 TO 8:NEXT Y:SOUND 0,0,0,0
1010 FOR Y=1 TO 3:NEXT Y:NEXT X:FOR X=14 TO 0 STEP -0.3:SOUND 0,5,10,X:SOUND 1,20,10,X:NEXT X:RETURN
1020 FOR X=8 TO 12:SOUND 0,50,X,8:NEXT X:FOR X=1 TO 20:NEXT X:SOUND 0,0,0,0:RETURN
1030 L=LEN(TOT$):TOT$=" ":TOT$(L)=TOT$:TOT$(2)=TOT$:FOR I=1 TO PN:TOTAL(I)=0:NEXT I
1040 TEMP=0:TEMP$="":GOTO 920
1050 GRAPHICS 0:POKE 752,1:POKE 710,224
1060 ? "      Instructions for High Rollers     "
1070 ? "  A 3 dice game for 2 to 8 players. If  less than 4 players, recommend each     player enter name 2 or 3 times."
1080 ? :? "OBJECT: To be the first player to bank  exactly 3000 points.":?
1090 ? "JOYSTICK #1:  PUSH TO ROLL DICE":? ,"    TRIGGER TO PASS TURN":? :? "SCORING ON EACH ROLL:":?
1100 ? "    Any 3 of a kind = 1000 points":? ," Each ace =  100 points":? ,"Each five =   50 points":?
1110 ? "The player may continue rolling as long as he/she scores on each roll. The turn ends on a 'no-score' or a pass."
1120 GOSUB 1210:? "↰       page 2    hit <1> for page 1     "
1130 ? "Opening BANK deposit requires a minimum of 500 points. Subsequent deposits may  be as little as 50 points.":?
1140 ? "If the point score would cause the BANK to exceed 3000 points, the points are   forfeited and the turn passed."
1150 ? :? "Any time a no-score is rolled, the turn is passed to next player and all points on that turn are forfeited."
1160 ? :? "ORDER OF PLAY:   The first player is    selected at random and the turn passes  in sequence.":?
1170 ? "ODDS:  Any triple   -   6 out of 216":? "       Any score    - 156 out of 216"
1180 ? "       Any no-score -  60 out of 216"
1190 GOSUB 1210:IF K=49 THEN GOTO 1050
1200 GOTO 790
1210 POSITION 6,23:? " Press any key to continue ";
1220 OPEN #1,4,0,"K:":GET #1,K:CLOSE #1:RETURN