mirror of
https://github.com/jscrane/Apple1.git
synced 2024-11-22 06:31:37 +00:00
258 lines
8.0 KiB
Plaintext
258 lines
8.0 KiB
Plaintext
|
|
SCR
|
|
LOMEM=768
|
|
HIMEM=16384
|
|
10 REM DEAL OR NO DEAL
|
|
20 REM
|
|
30 REM CREATED BY VINCE BRIEL
|
|
40 REM
|
|
50 REM ON 12/20/2005
|
|
60 REM
|
|
70 DIM A(26),A$(255),N$(255),D(26),O(12)
|
|
80 FOR I=1 TO 26: PRINT :A(I)=0: D(26)=0:NEXT I
|
|
90 TAB 12: PRINT "DEAL OR NO DEAL"
|
|
95 S=1
|
|
100 PRINT : PRINT
|
|
110 INPUT "WHAT IS YOUR NAME ",N$
|
|
120 PRINT "HELLO, ";N$
|
|
130 INPUT "DO YOU NEED INSTRUCTIONS",A$
|
|
140 IF A$="Y" OR A$="YES" THEN 9000
|
|
150 PRINT : PRINT "OK, LETS SET UP THE BOARD"
|
|
160 REM SCRAMBLE THE BOARD
|
|
170 FOR I=1 TO 26
|
|
180 N=RND(26)+1:IF A(N)#0 THEN 180
|
|
190 A(N)=I:D(N)=1:NEXT I
|
|
420 REM PRINT THE BOARD, GET USERS PICK OF CASE
|
|
430 REM NO LONGER USED GOSUB 1000
|
|
440 FOR I=1 TO 1000:NEXT I
|
|
450 PRINT "OK, HERE'S THE PRIZES AVAILABLE":PRINT
|
|
460 FOR I=1 TO 13
|
|
480 GOSUB 1990+I*10
|
|
490 PRINT "$";A$;
|
|
500 TAB 20
|
|
510 GOSUB 1990+(I+13)*10
|
|
520 PRINT "$";A$;
|
|
530 PRINT:NEXT I:PRINT
|
|
550 REM PICK YOUR CASE
|
|
560 PRINT"HERE ARE THE CASES AVAILABLE:"
|
|
570 PRINT:GOSUB 1000
|
|
572 PRINT "PICK YOUR CASE ";N$;
|
|
575 INPUT Y
|
|
577 IF Y>0 AND Y<27 THEN 580
|
|
578 PRINT "PLEASE CHOOSE BETWEEN 1 AND 26.":GOTO 560
|
|
580 Y1=A(Y):A(Y)=0
|
|
585 C=6:PRINT "YOU MUST NOW CHOOSE 6 CASES. AFTER"
|
|
587 PRINT "THAT, THE BANKER WILL MAKE AN OFFER"
|
|
595 GOSUB 3000
|
|
596 REM NOW MAKE AN OFFER
|
|
600 GOSUB 5000
|
|
610 REM NO DEAL, NOW PICK 5
|
|
620 PRINT "YOU MUST NOW CHOOSE 5 CASES. A NEW OFFER"
|
|
630 PRINT "WILL BE MADE BY THE BANK AFTER YOU PICK."
|
|
632 C=5:GOSUB 3000
|
|
640 GOSUB 5000
|
|
645 REM NO DEAL, NOW PICK 4
|
|
650 PRINT "NOW, CAREFULLY PICK 4 MORE CASES."
|
|
652 PRINT "THE BANK WILL THEN MAKE A NEW OFFER."
|
|
654 C=4:GOSUB 3000
|
|
656 GOSUB 5000
|
|
660 REM NO DEAL, NOW PICK 3
|
|
666 PRINT "NOW, CAREFULLY PICK 2 MORE CASES."
|
|
668 PRINT "THE BANK WILL THEN MAKE A NEW OFFER."
|
|
669 C=2:GOSUB 3000
|
|
670 GOSUB 5000
|
|
680 REM NO DEAL, NOW PICK 2
|
|
686 PRINT "NOW, CAREFULLY PICK 2 MORE CASES."
|
|
688 PRINT "THE BANK WILL THEN MAKE A NEW OFFER."
|
|
689 C=2:GOSUB 3000
|
|
690 GOSUB 5000
|
|
700 REM NO DEAL, NOW PICK 1
|
|
703 PRINT "NOW, CAREFULLY PICK 1 MORE CASE."
|
|
704 PRINT "THE BANK WILL THEN MAKE A NEW OFFER."
|
|
705 C=1:GOSUB 3000
|
|
706 GOSUB 5000
|
|
710 REM NO DEAL, NOW PICK 1
|
|
713 PRINT "NOW, CAREFULLY PICK 1 MORE CASE."
|
|
714 PRINT "THE BANK WILL THEN MAKE A NEW OFFER.":PRINT "THIS IS GETTING TENSE."
|
|
715 C=1:GOSUB 3000
|
|
716 GOSUB 5000
|
|
720 REM NO DEAL, NOW PICK 1
|
|
723 PRINT "NOW, CAREFULLY PICK 1 MORE CASE,":PRINT "AND CHOOSE WISELY."
|
|
724 PRINT "THE BANK WILL THEN MAKE A NEW OFFER."
|
|
725 C=1:GOSUB 3000
|
|
726 GOSUB 5000
|
|
730 REM NO DEAL, NOW PICK 1
|
|
733 PRINT "NOW, CAREFULLY PICK 1 MORE CASE."
|
|
734 PRINT "THE BANK WILL THEN MAKE A NEW OFFER."
|
|
735 C=1:GOSUB 3000
|
|
736 GOSUB 5000
|
|
740 REM NO DEAL, NOW PICK 1
|
|
743 PRINT "NOW, CAREFULLY PICK 1 MORE CASE."
|
|
744 PRINT "THE BANK WILL THEN MAKE A NEW OFFER."
|
|
745 C=1:GOSUB 3000
|
|
746 GOSUB 5000
|
|
800 REM NO DEAL, LAST DRAW, THERE IS ONLY ONE CASE LEFT, SWAP?
|
|
805 PRINT "HERE IS THE REMAING CASE:":PRINT
|
|
810 GOSUB 1000:FOR I=1 TO 1500:NEXT I
|
|
815 PRINT "NOW, WE'RE GOING TO OFFER YOU SOMETHING"
|
|
820 PRINT "DIFFERENT. YOU CAN KEEP YOUR CASE #";Y
|
|
825 PRINT "OR TRADE IT FOR THE LAST CASE"
|
|
830 PRINT "REMAINING ";
|
|
835 REM FIND REMAINING CASE
|
|
840 V=0:FOR I=1 TO 26:IF A(I)=0 THEN 850
|
|
845 V=I
|
|
850 NEXT I:IF V=0 THEN 9999
|
|
855 PRINT V
|
|
860 PRINT :PRINT "DO YOU WANT TO KEEP YOUR"
|
|
870 PRINT "CASE OR EXCHANGE IT FOR ";V
|
|
880 INPUT "ANSWER 'KEEP' OR 'EXCHANGE'",A$
|
|
890 IF A$="KEEP" THEN 9500
|
|
900 REM EXCHANGE V FOR Y
|
|
910 Y=V:Y1=A(V):GOTO 9500
|
|
1000 REM PRINT BOARD ROUTINE
|
|
1010 L=22: PRINT
|
|
1020 FOR J=1 TO 3
|
|
1030 FOR I=0 TO 4
|
|
1040 REM IF L+I<>0 THEN 1060
|
|
1050 REM PRINT " ";:GOTO 1200
|
|
1060 IF J=1 THEN 1090
|
|
1070 IF J=2 THEN 1120
|
|
1080 GOTO 1170
|
|
1090 IF A(L+I)=0 THEN 1110
|
|
1100 PRINT "****** ";: GOTO 1200
|
|
1110 PRINT " ";: GOTO 1200
|
|
1120 IF A(L+I)=0 THEN 1110
|
|
1130 IF L+I<10 THEN 1150
|
|
1140 PRINT "* ";L+I;" * ";: GOTO 1200
|
|
1150 PRINT "* ";L+I;" * ";: GOTO 1200
|
|
1160 PRINT " ";: GOTO 1200
|
|
1170 IF A(L+I)=0 THEN 1190
|
|
1180 PRINT "****** ";: GOTO 1200
|
|
1190 PRINT " ";
|
|
1200 NEXT I: PRINT : NEXT J: PRINT
|
|
1210 L=L-5: IF L<0 THEN 1230
|
|
1220 GOTO 1020
|
|
1230 REM NOW PRINT #1
|
|
1240 IF A(1)=0 THEN 1280
|
|
1250 PRINT "******"
|
|
1260 PRINT "* 1 *"
|
|
1270 PRINT "******"
|
|
1280 RETURN
|
|
2000 A$=".01":RETURN
|
|
2010 A$="1":RETURN
|
|
2020 A$="5":RETURN
|
|
2030 A$="10":RETURN
|
|
2040 A$="25":RETURN
|
|
2050 A$="50":RETURN
|
|
2060 A$="75":RETURN
|
|
2070 A$="100":RETURN
|
|
2080 A$="200":RETURN
|
|
2090 A$="300":RETURN
|
|
2100 A$="400":RETURN
|
|
2110 A$="500":RETURN
|
|
2120 A$="750":RETURN
|
|
2130 A$="1,000":RETURN
|
|
2140 A$="5,000":RETURN
|
|
2150 A$="10,000":RETURN
|
|
2160 A$="25,000":RETURN
|
|
2170 A$="50,000":RETURN
|
|
2180 A$="75,000":RETURN
|
|
2190 A$="100,000":RETURN
|
|
2200 A$="200,000":RETURN
|
|
2210 A$="300,000":RETURN
|
|
2220 A$="400,000":RETURN
|
|
2230 A$="500,000":RETURN
|
|
2240 A$="750,000":RETURN
|
|
2250 A$="1,000,000":RETURN
|
|
3000 REM HERE IS WHERE YOU PICK "C" NUMBER OF CASES
|
|
3005 PRINT "NOW, HERE ARE THE REMAINING CASES:"
|
|
3006 PRINT "YOU HAVE ";C;" MORE CASES TO CHOOSE"
|
|
3007 GOSUB 1000
|
|
3010 INPUT "CHOOSE A CASE (0 TO SEE PRIZES LEFT)",B
|
|
3020 IF B>-1 AND B<27 THEN 3040
|
|
3030 PRINT "PLEASE CHOOSE BETWEEN 1 AND 26.":GOTO 3000
|
|
3040 IF B#0 THEN 3048
|
|
3041 FOR I=1 TO 13:IF D(I)=0 THEN 3044
|
|
3042 GOSUB 1990+I*10
|
|
3043 PRINT "$";A$;
|
|
3044 TAB 20:IF D(13+I)=0 THEN 3047
|
|
3045 GOSUB 1990+(I+13)*10
|
|
3046 PRINT "$";A$;
|
|
3047 PRINT:NEXT I:PRINT:GOTO 3010
|
|
3048 IF A(B)#0 THEN 3060
|
|
3050 PRINT "THAT CASE HAS BEEN CHOOSEN. TRY AGAIN.":GOTO 3000
|
|
3060 D(A(B))=0:D=A(B):GOSUB 1990+(D*10)
|
|
3070 A(B)=0:PRINT "SHOW THE CASE..."
|
|
3080 FOR I=1 TO 1000:NEXT I:PRINT
|
|
3090 TAB 12:PRINT "$";A$:FOR I=1 TO 1000:NEXT I
|
|
3094 PRINT:C=C-1:IF C>0 THEN 3000
|
|
3099 RETURN
|
|
5000 REM THIS AREA FOR WHERE YOU MAKE AN OFFER
|
|
5010 PRINT:PRINT "RING......":FOR I=1 TO 1500:NEXT I
|
|
5015 REM GET HIGHEST VALUE LEFT
|
|
5020 H=0:Z=0:FOR I=1 TO 26:IF A(I)=0 THEN 5040
|
|
5030 H=I:Z=Z+1
|
|
5040 NEXT I:J=RND(3)+1:J=J-2:H=H+J:H=H-3:Z=Z/2:H=H-Z
|
|
5042 IF H>=1 THEN O(S)=H:GOTO 5050
|
|
5043 O(S)=2
|
|
5050 IF S=1 THEN 5100
|
|
5055 PRINT "HERE ARE YOUR PREVIOUS OFFERS:"
|
|
5060 PRINT "------------------------------"
|
|
5070 PRINT :FOR I=1 TO S-1
|
|
5080 GOSUB 1990+O(I)*10
|
|
5090 TAB 5:PRINT "$";A$:NEXT I
|
|
5100 PRINT
|
|
5110 IF O(S)>16 THEN 5190
|
|
5180 PRINT "A GOOD OFFER OF ";:GOTO 5330
|
|
5190 IF O(S)>18 THEN 5200
|
|
5195 PRINT "A NICE OFFER OF ";:GOTO 5330
|
|
5200 IF O(S)>19 THEN 5220
|
|
5210 PRINT "A SWEET OFFER OF ";:GOTO 5330
|
|
5220 PRINT "A GREAT OFFER OF $";
|
|
5330 GOSUB 1990+O(S)*10
|
|
5340 PRINT A$;" IS ON THE BOARD."
|
|
5350 PRINT:PRINT "BEFORE YOU ANSWER THINK ABOUT"
|
|
5360 PRINT "IT FOR A WHILE..."
|
|
5370 FOR I=1 TO 1500:NEXT I
|
|
5380 PRINT "OK, SO HERE'S THE QUESTION...":PRINT
|
|
5390 PRINT "DEAL, OR NO DEAL."
|
|
5400 IF D(26)=0 THEN 5430
|
|
5410 PRINT "A MILLION DOLLARS COULD STILL BE"
|
|
5420 PRINT "IN YOUR CASE!":GOTO 5800
|
|
5430 IF D(25)=0 THEN 5800
|
|
5440 PRINT "$750,000 COULD BE IN YOUR CASE."
|
|
5800 PRINT "SO, I NEED AN ANSWER"
|
|
5810 INPUT "DEAL, OR NO DEAL",A$
|
|
5812 IF A$="DEAL" THEN 9500
|
|
5814 IF A$="NO DEAL" OR A$="ND" OR A$="NODEAL" THEN 5840
|
|
5820 PRINT "PLEASE ANSWER 'DEAL' OR 'NO DEAL'"
|
|
5830 GOTO 5810
|
|
5840 FOR I=1 TO 12:PRINT:NEXT I:TAB 12:PRINT "NO DEAL"
|
|
5850 S=S+1:RETURN
|
|
9000 FOR I=1 TO 24: PRINT : NEXT I
|
|
9010 TAB 12: PRINT "DEAL OR NO DEAL"
|
|
9020 PRINT
|
|
9030 PRINT "THE GAME IS PLAYED WITH 26 CASES. THE"
|
|
9040 PRINT "VALUE IN EACH CASE RANGES FROM $.01 TO"
|
|
9050 PRINT "$1,000,000! YOU CHOOSE THE ONE CASE YOU"
|
|
9060 PRINT "THINK HAS THE $1,000,000."
|
|
9070 PRINT : PRINT "NEXT YOU BEGIN OPENING CASES UP. AFTER"
|
|
9080 PRINT "A NUMBER OF CASES ARE OPENED THE BANKER"
|
|
9090 PRINT "WILL MAKE YOU AN OFFER TO BUY BACK YOUR"
|
|
9100 PRINT "CASE. YOU CAN EITHER ACCEPT THE OFFER"
|
|
9120 PRINT "FOR YOUR CASE OR CONTINUE TO OPEN MORE"
|
|
9130 PRINT "CASES. YOU PLAY UNTIL YOU RUN OUT OF"
|
|
9140 PRINT "CASES OR UNTIL YOU ACCEPT THE BANKS"
|
|
9150 PRINT "OFFER. GOOD LUCK!"
|
|
9160 FOR I=1 TO 1500: NEXT I: GOTO 150
|
|
9500 REM TOOK THE DEAL OR LAST CASE, SHOW WHAT'S IN YOUR CASE
|
|
9510 FOR I=1 TO 24:PRINT:NEXT I
|
|
9520 PRINT "AND INSIDE YOUR CASE IS":PRINT
|
|
9530 GOSUB 1990+Y1*10
|
|
9540 TAB 8:PRINT "$";A$
|
|
9550 PRINT:PRINT"SEE YOU NEXT TIME ON..."
|
|
9560 PRINT "DEAL OR NO DEAL"
|
|
9570 PRINT
|
|
9999 END
|
|
|