Skip to content

Commit 43f2ec0

Browse files
committed
add 00_Alternate_Langage folder and move alternate ports there
1 parent a093170 commit 43f2ec0

File tree

1,789 files changed

+85900
-446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,789 files changed

+85900
-446
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Please refer to the `readme.md` in the parent folder.
2+
3+
Each subfolder represents a port of this program to a language which is _not_ one of the agreed upon 10 languages, which are intended to meet these three criteria:
4+
5+
1. Popular (by TIOBE index)
6+
2. Memory safe
7+
3. Generally considered a 'scripting' language
8+
9+
We welcome additional ports, but these additional ports are for educational purposes only.
10+
11+
#### External Links
12+
- Common Lisp: https://github.com/koalahedron/lisp-computer-games/blob/master/01%20Acey%20Ducey/common-lisp/acey-deucy.lisp
13+
- PowerShell: https://github.com/eweilnau/basic-computer-games-powershell/blob/main/AceyDucey.ps1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
10 PRINT TAB(26);"ACEY DUCEY CARD GAME"
2+
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
3+
21 PRINT
4+
22 PRINT
5+
30 PRINT"ACEY-DUCEY IS PLAYED IN THE FOLLOWING MANNER "
6+
40 PRINT"THE DEALER (COMPUTER) DEALS TWO CARDS FACE UP"
7+
50 PRINT"YOU HAVE AN OPTION TO BET OR NOT BET DEPENDING"
8+
60 PRINT"ON WHETHER OR NOT YOU FEEL THE CARD WILL HAVE"
9+
70 PRINT"A VALUE BETWEEN THE FIRST TWO."
10+
80 PRINT"IF YOU DO NOT WANT TO BET, INPUT A 0"
11+
100 N=100
12+
110 Q=100
13+
120 PRINT "YOU NOW HAVE ";Q;" DOLLARS."
14+
130 PRINT
15+
140 GOTO 260
16+
210 Q=Q+M
17+
220 GOTO 120
18+
240 Q=Q-M
19+
250 GOTO 120
20+
260 PRINT"HERE ARE YOUR NEXT TWO CARDS: "
21+
270 A=INT(14*RND(1))+2
22+
280 IF A<2 THEN 270
23+
290 IF A>14 THEN 270
24+
300 B=INT(14*RND(1))+2
25+
310 IF B<2 THEN 300
26+
320 IF B>14 THEN 300
27+
330 IF A>=B THEN 270
28+
350 IF A<11 THEN 400
29+
360 IF A=11 THEN 420
30+
370 IF A=12 THEN 440
31+
380 IF A=13 THEN 460
32+
390 IF A=14 THEN 480
33+
400 PRINT A
34+
410 GOTO 500
35+
420 PRINT"JACK"
36+
430 GOTO 500
37+
440 PRINT"QUEEN"
38+
450 GOTO 500
39+
460 PRINT"KING"
40+
470 GOTO 500
41+
480 PRINT"ACE"
42+
500 IF B<11 THEN 550
43+
510 IF B=11 THEN 570
44+
520 IF B=12 THEN 590
45+
530 IF B=13 THEN 610
46+
540 IF B=14 THEN 630
47+
550 PRINT B
48+
560 GOTO 650
49+
570 PRINT"JACK"
50+
580 GOTO 650
51+
590 PRINT"QUEEN"
52+
600 GOTO 650
53+
610 PRINT"KING"
54+
620 GOTO 650
55+
630 PRINT"ACE"
56+
640 PRINT
57+
650 PRINT
58+
660 INPUT"WHAT IS YOUR BET";M
59+
670 IF M<>0 THEN 680
60+
675 PRINT"CHICKEN!!"
61+
676 PRINT
62+
677 GOTO 260
63+
680 IF M<=Q THEN 730
64+
690 PRINT"SORRY, MY FRIEND, BUT YOU BET TOO MUCH."
65+
700 PRINT"YOU HAVE ONLY ";Q;" DOLLARS TO BET."
66+
710 GOTO 650
67+
730 C=INT(14*RND(1))+2
68+
740 IF C<2 THEN 730
69+
750 IF C>14 THEN 730
70+
760 IF C<11 THEN 810
71+
770 IF C=11 THEN 830
72+
780 IF C=12 THEN 850
73+
790 IF C=13 THEN 870
74+
800 IF C=14 THEN 890
75+
810 PRINT C
76+
820 GOTO 910
77+
830 PRINT"JACK"
78+
840 GOTO 910
79+
850 PRINT"QUEEN"
80+
860 GOTO 910
81+
870 PRINT"KING"
82+
880 GOTO 910
83+
890 PRINT "ACE"
84+
900 PRINT
85+
910 IF C>A THEN 930
86+
920 GOTO 970
87+
930 IF C>=B THEN 970
88+
950 PRINT"YOU WIN!!!"
89+
960 GOTO 210
90+
970 PRINT"SORRY, YOU LOSE"
91+
980 IF M<Q THEN 240
92+
990 PRINT
93+
1000 PRINT
94+
1010 PRINT"SORRY, FRIEND, BUT YOU BLEW YOUR WAD."
95+
1015 PRINT:PRINT
96+
1020 INPUT"TRY AGAIN (YES OR NO)";A$
97+
1025 PRINT:PRINT
98+
1030 IF A$="YES" THEN 110
99+
1040 PRINT"O.K., HOPE YOU HAD FUN!"
100+
1050 END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Please refer to the `readme.md` in the parent folder.
2+
3+
Each subfolder represents a port of this program to a language which is _not_ one of the agreed upon 10 languages, which are intended to meet these three criteria:
4+
5+
1. Popular (by TIOBE index)
6+
2. Memory safe
7+
3. Generally considered a 'scripting' language
8+
9+
We welcome additional ports, but these additional ports are for educational purposes only.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
10 PRINT TAB(28);"AMAZING PROGRAM"
2+
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
3+
30 PRINT:PRINT:PRINT:PRINT
4+
100 INPUT "WHAT ARE YOUR WIDTH AND LENGTH";H,V
5+
102 IF H<>1 AND V<>1 THEN 110
6+
104 PRINT "MEANINGLESS DIMENSIONS. TRY AGAIN.":GOTO 100
7+
110 DIM W(H,V),V(H,V)
8+
120 PRINT
9+
130 PRINT
10+
140 PRINT
11+
150 PRINT
12+
160 Q=0:Z=0:X=INT(RND(1)*H+1)
13+
165 FOR I=1 TO H
14+
170 IF I=X THEN 173
15+
171 PRINT ".--";:GOTO 180
16+
173 PRINT ". ";
17+
180 NEXT I
18+
190 PRINT "."
19+
195 C=1:W(X,1)=C:C=C+1
20+
200 R=X:S=1:GOTO 260
21+
210 IF R<>H THEN 240
22+
215 IF S<>V THEN 230
23+
220 R=1:S=1:GOTO 250
24+
230 R=1:S=S+1:GOTO 250
25+
240 R=R+1
26+
250 IF W(R,S)=0 THEN 210
27+
260 IF R-1=0 THEN 530
28+
265 IF W(R-1,S)<>0 THEN 530
29+
270 IF S-1=0 THEN 390
30+
280 IF W(R,S-1)<>0 THEN 390
31+
290 IF R=H THEN 330
32+
300 IF W(R+1,S)<>0 THEN 330
33+
310 X=INT(RND(1)*3+1)
34+
320 ON X GOTO 790,820,860
35+
330 IF S<>V THEN 340
36+
334 IF Z=1 THEN 370
37+
338 Q=1:GOTO 350
38+
340 IF W(R,S+1)<>0 THEN 370
39+
350 X=INT(RND(1)*3+1)
40+
360 ON X GOTO 790,820,910
41+
370 X=INT(RND(1)*2+1)
42+
380 ON X GOTO 790,820
43+
390 IF R=H THEN 470
44+
400 IF W(R+1,S)<>0 THEN 470
45+
405 IF S<>V THEN 420
46+
410 IF Z=1 THEN 450
47+
415 Q=1:GOTO 430
48+
420 IF W(R,S+1)<>0 THEN 450
49+
430 X=INT(RND(1)*3+1)
50+
440 ON X GOTO 790,860,910
51+
450 X=INT(RND(1)*2+1)
52+
460 ON X GOTO 790,860
53+
470 IF S<>V THEN 490
54+
480 IF Z=1 THEN 520
55+
485 Q=1:GOTO 500
56+
490 IF W(R,S+1)<>0 THEN 520
57+
500 X=INT(RND(1)*2+1)
58+
510 ON X GOTO 790,910
59+
520 GOTO 790
60+
530 IF S-1=0 THEN 670
61+
540 IF W(R,S-1)<>0 THEN 670
62+
545 IF R=H THEN 610
63+
547 IF W(R+1,S)<>0 THEN 610
64+
550 IF S<>V THEN 560
65+
552 IF Z=1 THEN 590
66+
554 Q=1:GOTO 570
67+
560 IF W(R,S+1)<>0 THEN 590
68+
570 X=INT(RND(1)*3+1)
69+
580 ON X GOTO 820,860,910
70+
590 X=INT(RND(1)*2+1)
71+
600 ON X GOTO 820,860
72+
610 IF S<>V THEN 630
73+
620 IF Z=1 THEN 660
74+
625 Q=1:GOTO 640
75+
630 IF W(R,S+1)<>0 THEN 660
76+
640 X=INT(RND(1)*2+1)
77+
650 ON X GOTO 820,910
78+
660 GOTO 820
79+
670 IF R=H THEN 740
80+
680 IF W(R+1,S)<>0 THEN 740
81+
685 IF S<>V THEN 700
82+
690 IF Z=1 THEN 730
83+
695 Q=1:GOTO 710
84+
700 IF W(R,S+1)<>0 THEN 730
85+
710 X=INT(RND(1)*2+1)
86+
720 ON X GOTO 860,910
87+
730 GOTO 860
88+
740 IF S<>V THEN 760
89+
750 IF Z=1 THEN 780
90+
755 Q=1:GOTO 770
91+
760 IF W(R,S+1)<>0 THEN 780
92+
770 GOTO 910
93+
780 GOTO 1000
94+
790 W(R-1,S)=C
95+
800 C=C+1:V(R-1,S)=2:R=R-1
96+
810 IF C=H*V+1 THEN 1010
97+
815 Q=0:GOTO 260
98+
820 W(R,S-1)=C
99+
830 C=C+1
100+
840 V(R,S-1)=1:S=S-1:IF C=H*V+1 THEN 1010
101+
850 Q=0:GOTO 260
102+
860 W(R+1,S)=C
103+
870 C=C+1:IF V(R,S)=0 THEN 880
104+
875 V(R,S)=3:GOTO 890
105+
880 V(R,S)=2
106+
890 R=R+1
107+
900 IF C=H*V+1 THEN 1010
108+
905 GOTO 530
109+
910 IF Q=1 THEN 960
110+
920 W(R,S+1)=C:C=C+1:IF V(R,S)=0 THEN 940
111+
930 V(R,S)=3:GOTO 950
112+
940 V(R,S)=1
113+
950 S=S+1:IF C=H*V+1 THEN 1010
114+
955 GOTO 260
115+
960 Z=1
116+
970 IF V(R,S)=0 THEN 980
117+
975 V(R,S)=3:Q=0:GOTO 1000
118+
980 V(R,S)=1:Q=0:R=1:S=1:GOTO 250
119+
1000 GOTO 210
120+
1010 IF Z=1 THEN 1015
121+
1011 X=INT(RND(1)*H+1)
122+
1012 IF V(X,V)=0 THEN 1014
123+
1013 V(X,V)=3: GOTO 1015
124+
1014 V(X,V)=1
125+
1015 FOR J=1 TO V
126+
1016 PRINT "I";
127+
1017 FOR I=1 TO H
128+
1018 IF V(I,J)<2 THEN 1030
129+
1020 PRINT " ";
130+
1021 GOTO 1040
131+
1030 PRINT " I";
132+
1040 NEXT I
133+
1041 PRINT
134+
1043 FOR I=1 TO H
135+
1045 IF V(I,J)=0 THEN 1060
136+
1050 IF V(I,J)=2 THEN 1060
137+
1051 PRINT ": ";
138+
1052 GOTO 1070
139+
1060 PRINT ":--";
140+
1070 NEXT I
141+
1071 PRINT "."
142+
1072 NEXT J
143+
1073 END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Please refer to the `readme.md` in the parent folder.
2+
3+
Each subfolder represents a port of this program to a language which is _not_ one of the agreed upon 10 languages, which are intended to meet these three criteria:
4+
5+
1. Popular (by TIOBE index)
6+
2. Memory safe
7+
3. Generally considered a 'scripting' language
8+
9+
We welcome additional ports, but these additional ports are for educational purposes only.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
10 PRINT TAB(32);"ANIMAL"
2+
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
3+
30 PRINT: PRINT: PRINT
4+
40 PRINT "PLAY 'GUESS THE ANIMAL'"
5+
45 PRINT
6+
50 PRINT "THINK OF AN ANIMAL AND THE COMPUTER WILL TRY TO GUESS IT."
7+
60 PRINT
8+
70 DIM A$(200)
9+
80 FOR I=0 TO 3
10+
90 READ A$(I)
11+
100 NEXT I
12+
110 N=VAL(A$(0))
13+
120 REM MAIN CONTROL SECTION
14+
130 INPUT "ARE YOU THINKING OF AN ANIMAL";A$
15+
140 IF A$="LIST" THEN 600
16+
150 IF LEFT$(A$,1)<>"Y" THEN 120
17+
160 K=1
18+
170 GOSUB 390
19+
180 IF LEN(A$(K))=0 THEN 999
20+
190 IF LEFT$(A$(K),2)="\Q" THEN 170
21+
200 PRINT "IS IT A ";RIGHT$(A$(K),LEN(A$(K))-2);
22+
210 INPUT A$
23+
220 A$=LEFT$(A$,1)
24+
230 IF LEFT$(A$,1)="Y" THEN PRINT "WHY NOT TRY ANOTHER ANIMAL?": GOTO 120
25+
240 INPUT "THE ANIMAL YOU WERE THINKING OF WAS A ";V$
26+
250 PRINT "PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A"
27+
260 PRINT V$;" FROM A ";RIGHT$(A$(K),LEN(A$(K))-2)
28+
270 INPUT X$
29+
280 PRINT "FOR A ";V$;" THE ANSWER WOULD BE ";
30+
290 INPUT A$
31+
300 A$=LEFT$(A$,1): IF A$<>"Y" AND A$<>"N" THEN 280
32+
310 IF A$="Y" THEN B$="N"
33+
320 IF A$="N" THEN B$="Y"
34+
330 Z1=VAL(A$(0))
35+
340 A$(0)=STR$(Z1+2)
36+
350 A$(Z1)=A$(K)
37+
360 A$(Z1+1)="\A"+V$
38+
370 A$(K)="\Q"+X$+"\"+A$+STR$(Z1+1)+"\"+B$+STR$(Z1)+"\"
39+
380 GOTO 120
40+
390 REM SUBROUTINE TO PRINT QUESTIONS
41+
400 Q$=A$(K)
42+
410 FOR Z=3 TO LEN(Q$)
43+
415 IF MID$(Q$,Z,1)<>"\" THEN PRINT MID$(Q$,Z,1);: NEXT Z
44+
420 INPUT C$
45+
430 C$=LEFT$(C$,1)
46+
440 IF C$<>"Y" AND C$<>"N" THEN 410
47+
450 T$="\"+C$
48+
455 FOR X=3 TO LEN(Q$)-1
49+
460 IF MID$(Q$,X,2)=T$ THEN 480
50+
470 NEXT X
51+
475 STOP
52+
480 FOR Y=X+1 TO LEN(Q$)
53+
490 IF MID$(Q$,Y,1)="\" THEN 510
54+
500 NEXT Y
55+
505 STOP
56+
510 K=VAL(MID$(Q$,X+2,Y-X-2))
57+
520 RETURN
58+
530 DATA "4","\QDOES IT SWIM\Y2\N3\","\AFISH","\ABIRD"
59+
600 PRINT:PRINT "ANIMALS I ALREADY KNOW ARE:"
60+
605 X=0
61+
610 FOR I=1 TO 200
62+
620 IF LEFT$(A$(I),2)<>"\A" THEN 650
63+
624 PRINT TAB(15*X);
64+
630 FOR Z=3 TO LEN(A$(I))
65+
640 IF MID$(A$(I),Z,1)<>"\" THEN PRINT MID$(A$(I),Z,1);: NEXT Z
66+
645 X=X+1: IF X=4 THEN X=0: PRINT
67+
650 NEXT I
68+
660 PRINT
69+
670 PRINT
70+
680 GOTO 120
71+
999 END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Please refer to the `readme.md` in the parent folder.
2+
3+
Each subfolder represents a port of this program to a language which is _not_ one of the agreed upon 10 languages, which are intended to meet these three criteria:
4+
5+
1. Popular (by TIOBE index)
6+
2. Memory safe
7+
3. Generally considered a 'scripting' language
8+
9+
We welcome additional ports, but these additional ports are for educational purposes only.

0 commit comments

Comments
 (0)