mirror of
https://github.com/DutchMaker/Apple-1-Mini.git
synced 2024-12-10 19:52:02 +00:00
99 lines
2.3 KiB
Plaintext
99 lines
2.3 KiB
Plaintext
|
|
SCR
|
|
LOMEM=768
|
|
HIMEM=16384
|
|
100 TAB(26):PRINT "COLUMN"
|
|
110 TAB(20):PRINT "CREATIVE COMPUTING"
|
|
120 TAB(18):PRINT "MORRISTOWN, NEW JERSEY"
|
|
125 REM PORTED TO REPLICA/1 BY CARL CLAUNCH
|
|
130 PRINT:PRINT:PRINT
|
|
140 PRINT "THIS PROGRAM WILL SHOW YOU A CARD TRICK. AFTER THE FIRST DEAL"
|
|
150 PRINT "PICK A CARD AND TYPE THE NUMBER OF THE COLUMN CONTAINING IT."
|
|
160 PRINT "THE DEALER WILL THEN PICK UP THE CARDS, A COLUMN AT A TIME"
|
|
170 PRINT "AND WILL DEAL THEM OUT AGAIN HORIZONTALLY. WHEN HE FINISHES"
|
|
180 PRINT "EACH TIME, TYPE THE NUMBER OF THE NEW COLUMN CONTAINING YOUR"
|
|
190 PRINT "CARD. FOLLOWING THE LAST DEAL THE DEALER WILL TURN OVER THE"
|
|
200 PRINT "CARDS, ONE AT A TIME, UNTIL HE REACHES THE ONE YOU PICKED."
|
|
210 PRINT:PRINT:PRINT
|
|
220 DIM A(21),B(21),C$(6),D$(2),T$(3),A$(5)
|
|
230 FOR X=1 TO 21
|
|
240 J=0
|
|
250 T=RND(52)
|
|
270 FOR Y=1 TO X-1
|
|
280 IF A(Y)=T THEN 250
|
|
290 NEXT Y
|
|
300 A(X)=T
|
|
310 NEXT X
|
|
320 N=0
|
|
330 FOR I=1 TO 3
|
|
340 FOR Z=1 TO 21
|
|
350 IF A(Z)=A(Z)/4*4 THEN 470
|
|
360 IF A(Z)-2= A(Z)/4*4 THEN 440
|
|
370 IF A(Z)-3= A(Z)/4*4 THEN 410
|
|
380 C$="SPADES"
|
|
390 D$=""
|
|
400 GOTO 490
|
|
410 C$="HEARTS"
|
|
420 D$=""
|
|
430 GOTO 490
|
|
440 C$="CLUBS"
|
|
450 D$=""
|
|
460 GOTO 490
|
|
470 C$="DIAMON"
|
|
480 D$="DS"
|
|
490 N=N+1
|
|
500 IF N#4 THEN 530
|
|
510 PRINT
|
|
520 N=1
|
|
530 IF A(Z)>35 THEN 580
|
|
540 TAB((N-1)*25):PRINT A(Z)/4+2;" OF ";C$;D$;
|
|
550 IF J=5 THEN 900
|
|
560 IF J=10 THEN 980
|
|
570 GOTO 710
|
|
580 IF A(Z)/4=9 THEN 670
|
|
590 IF A(Z)/4=10 THEN 650
|
|
600 IF A(Z)/4=11 THEN 630
|
|
610 A$="JACK"
|
|
620 GOTO 680
|
|
630 A$="QUEEN"
|
|
640 GOTO 680
|
|
650 A$="KING"
|
|
660 GOTO 680
|
|
670 A$="ACE"
|
|
680 TAB((N-1)*25):PRINT A$;" OF ";C$;D$;
|
|
690 IF J=5 THEN 900
|
|
700 IF J=10 THEN 980
|
|
710 NEXT Z
|
|
720 PRINT:PRINT
|
|
730 INPUT "WHICH COLUMN CONTAINS YOUR CARD? ",K
|
|
740 IF K>=1 AND K<=3 THEN 760
|
|
750 PRINT:PRINT "(1-3)":GOTO 730
|
|
760 PRINT:PRINT
|
|
770 T=1
|
|
780 S=K+2-3*((K+1)/3)
|
|
790 GOSUB 940
|
|
800 S=K
|
|
810 GOSUB 940
|
|
820 S=K+1-3*(K/3)
|
|
830 GOSUB 940
|
|
840 FOR C=1 TO 21
|
|
850 A(C)=B(C)
|
|
860 NEXT C
|
|
870 NEXT I
|
|
880 J=5
|
|
890 FOR Z=1 TO 11+RND(10)+1:N=0:GOTO 350
|
|
900 PRINT:NEXT Z:PRINT
|
|
910 PRINT "OOPS!!! YOUR CARD IS THE ";
|
|
920 N=1
|
|
930 J=10:Z=11:GOTO 350
|
|
940 FOR R=S TO S+18 STEP 3
|
|
950 B(T)=A(R)
|
|
960 T=T+1
|
|
970 NEXT R:RETURN
|
|
980 PRINT ".":PRINT
|
|
990 INPUT "DO YOU WANT TO SEE IT AGAIN?",T$
|
|
1000 IF T$#"YES" THEN 1020
|
|
1010 PRINT:PRINT:GOTO 230
|
|
1020 END
|
|
RUN
|