From d9c712b4b712f6e0cf07d621662069eefa77c957 Mon Sep 17 00:00:00 2001 From: nanochess Date: Wed, 17 Feb 2021 16:33:50 -0600 Subject: [PATCH 01/33] Ported AWARI to Javascript --- 04 Awari/awari.bas | 2 +- 04 Awari/javascript/awari.html | 9 ++ 04 Awari/javascript/awari.js | 259 +++++++++++++++++++++++++++++++++ 3 files changed, 269 insertions(+), 1 deletion(-) create mode 100644 04 Awari/javascript/awari.html create mode 100644 04 Awari/javascript/awari.js diff --git a/04 Awari/awari.bas b/04 Awari/awari.bas index f5f66e1b..78c204e3 100644 --- a/04 Awari/awari.bas +++ b/04 Awari/awari.bas @@ -51,7 +51,7 @@ 800 D=-99:H=13 805 FOR I=0 TO 13:G(I)=B(I):NEXT I 810 FOR J=7 TO 12:IF B(J)=0 THEN 885 -815 G=0:M=J:GOSUB 600 +815 Q=0:M=J:GOSUB 600 820 FOR I=0 TO 5:IF B(I)=0 THEN 845 825 L=B(I)+I:R=0 830 IF L>13 THEN L=L-14:R=1:GOTO 830 diff --git a/04 Awari/javascript/awari.html b/04 Awari/javascript/awari.html new file mode 100644 index 00000000..1d3c6208 --- /dev/null +++ b/04 Awari/javascript/awari.html @@ -0,0 +1,9 @@ + + +AWARI + + +

+
+
+
diff --git a/04 Awari/javascript/awari.js b/04 Awari/javascript/awari.js
new file mode 100644
index 00000000..cda27c08
--- /dev/null
+++ b/04 Awari/javascript/awari.js	
@@ -0,0 +1,259 @@
+// AWARI
+//
+// Converted from BASIC to Javascript by Oscar Toledo G. (nanochess)
+//
+
+function print(str)
+{
+    document.getElementById("output").appendChild(document.createTextNode(str));
+}
+
+function input()
+{
+    var input_element;
+    var input_str;
+    
+    return new Promise(function (resolve) {
+                       input_element = document.createElement("INPUT");
+                       
+                       print("? ");
+                       input_element.setAttribute("type", "text");
+                       input_element.setAttribute("length", "50");
+                       document.getElementById("output").appendChild(input_element);
+                       input_element.focus();
+                       input_str = undefined;
+                       input_element.addEventListener("keydown", function (event) {
+                                                      if (event.keyCode == 13) {
+                                                      input_str = input_element.value;
+                                                      document.getElementById("output").removeChild(input_element);
+                                                      print(input_str);
+                                                      print("\n");
+                                                      resolve(input_str);
+                                                      }
+                                                      });
+                       });
+}
+
+function tab(space)
+{
+    var str = "";
+    while (space-- > 0)
+        str += " ";
+    return str;
+}
+
+print(tab(34) + "AWARI\n");
+print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
+
+n = 0;
+
+b = [0,0,0,0,0,0,0,0,0,0,0,0,0,0];
+g = [0,0,0,0,0,0,0,0,0,0,0,0,0,0];
+f = [];
+for (i = 0; i <= 50; i++) {
+    f[i] = 0;
+}
+
+function show_number(number)
+{
+    if (number < 10)
+        print("  " + number + " ");
+    else
+        print(" " + number + " ");
+}
+
+function show_board()
+{
+    var i;
+    
+    print("\n");
+    print("   ");
+    for (i = 12; i >= 7; i--)
+        show_number(b[i]);
+    print("\n");
+    i = 13;
+    show_number(b[i]);
+    print("                       " + b[6] + "\n");
+    print("   ");
+    for (i = 0; i <= 5; i++)
+        show_number(b[i]);
+    print("\n");
+    print("\n");
+}
+
+function do_move()
+{
+    k = m;
+    adjust_board();
+    e = 0;
+    if (k > 6)
+        k -= 7;
+    c++;
+    if (c < 9)
+        f[n] = f[n] * 6 + k
+        for (i = 0; i <= 5; i++) {
+            if (b[i] != 0) {
+                for (i = 7; i <= 12; i++) {
+                    if (b[i] != 0) {
+                        e = 1;
+                        return;
+                    }
+                }
+            }
+        }
+}
+
+function adjust_board()
+{
+    p = b[m];
+    b[m] = 0;
+    while (p >= 1) {
+        m++;
+        if (m > 13)
+            m -= 14;
+        b[m]++;
+        p--;
+    }
+    if (b[m] == 1) {
+        if (m != 6 && m != 13) {
+            if (b[12 - m] != 0) {
+                b[h] += b[12 - m] + 1;
+                b[m] = 0;
+                b[12 - m] = 0;
+            }
+        }
+    }
+}
+
+function computer_move()
+{
+    d = -99;
+    h = 13;
+    for (i = 0; i<= 13; i++)	// Backup board
+        g[i] = b[i];
+    for (j = 7; j <= 12; j++) {
+        if (b[j] == 0)
+            continue;
+        q = 0;
+        m = j;
+        adjust_board();
+        for (i = 0; i <= 5; i++) {
+            if (b[i] == 0)
+                continue;
+            l = b[i] + i;
+            r = 0;
+            while (l > 13) {
+                l -= 14;
+                r = 1;
+            }
+            if (b[l] == 0) {
+                if (l != 6 && l != 13)
+                    r = b[12 - l] + r;
+            }
+            if (r > q)
+                q = r;
+        }
+        q = b[13] - b[6] - q;
+        if (c < 8) {
+            k = j;
+            if (k > 6)
+                k -= 7;
+            for (i = 0; i <= n - 1; i++) {
+                if (f[n] * 6 + k == Math.floor(f[i] / Math.pow(7 - c, 6) + 0.1))
+                    q -= 2;
+            }
+        }
+        for (i = 0; i <= 13; i++)	// Restore board
+            b[i] = g[i];
+        if (q >= d) {
+            a = j;
+            d = q;
+        }
+    }
+    m = a;
+    print(m - 6);
+    do_move();
+}
+
+// Main program
+async function main()
+{
+    while (1) {
+        print("\n");
+        print("\n");
+        e = 0;
+        for (i = 0; i <= 12; i++)
+            b[i] = 3;
+        
+        c = 0;
+        f[n] = 0;
+        b[13] = 0;
+        b[6] = 0;
+        
+        while (1) {
+            show_board();
+            print("YOUR MOVE");
+            while (1) {
+                m = parseInt(await input());
+                if (m < 7) {
+                    if (m > 0) {
+                        m--;
+                        if (b[m] != 0)
+                            break;
+                    }
+                }
+                print("ILLEGAL MOVE\n");
+                print("AGAIN");
+            }
+            h = 6;
+            do_move();
+            show_board();
+            if (e == 0)
+                break;
+            if (m == h) {
+                print("AGAIN");
+                while (1) {
+                    m = parseInt(await input());
+                    if (m < 7) {
+                        if (m > 0) {
+                            m--;
+                            if (b[m] != 0)
+                                break;
+                        }
+                    }
+                    print("ILLEGAL MOVE\n");
+                    print("AGAIN");
+                }
+                h = 6;
+                do_move();
+                show_board();
+            }
+            if (e == 0)
+                break;
+            print("MY MOVE IS ");
+            computer_move();
+            if (e == 0)
+                break;
+            if (m == h) {
+                print(",");
+                computer_move();
+            }
+            if (e == 0)
+                break;
+        }
+        print("\n");
+        print("GAME OVER\n");
+        d = b[6] - b[13];
+        if (d < 0)
+            print("I WIN BY " + -d + " POINTS\n");
+        else if (d == 0) {
+            n++;
+            print("DRAWN GAME\n");
+        } else {
+            n++;
+            print("YOU WIN BY " + d + " POINTS\n");
+        }
+    }
+}
+
+main();

From 1f04114530515f54cb0e1ffa1766476234ef8229 Mon Sep 17 00:00:00 2001
From: nanochess 
Date: Wed, 17 Feb 2021 17:14:04 -0600
Subject: [PATCH 02/33] Ported BAGELS to Javascript

---
 05 Bagels/bagels.bas             |   6 +-
 05 Bagels/javascript/bagels.html |   9 ++
 05 Bagels/javascript/bagels.js   | 160 +++++++++++++++++++++++++++++++
 3 files changed, 172 insertions(+), 3 deletions(-)
 create mode 100644 05 Bagels/javascript/bagels.html
 create mode 100644 05 Bagels/javascript/bagels.js

diff --git a/05 Bagels/bagels.bas b/05 Bagels/bagels.bas
index 3136955b..d16c20c3 100644
--- a/05 Bagels/bagels.bas	
+++ b/05 Bagels/bagels.bas	
@@ -3,7 +3,7 @@
 15 REM *** BAGLES NUMBER GUESSING GAME
 20 REM *** ORIGINAL SOURCE UNKNOWN BUT SUSPECTED TO BE
 25 REM *** LAWRENCE HALL OF SCIENCE, U.C. BERKELY
-30 DIM A1(6),A(3),B(3)
+30 DIM A1(3),A(3),B(3)
 40 Y=0:T=255
 50 PRINT:PRINT:PRINT
 70 INPUT "WOULD YOU LIKE THE RULES (YES OR NO)";A$
@@ -66,7 +66,7 @@
 600 PRINT
 605 NEXT I
 610 PRINT "OH WELL."
-615 PRINT "THAT'S TWNETY GUESSES.  MY NUMBER WAS";100*A(1)+10*A(2)+A(3)
+615 PRINT "THAT'S TWENTY GUESSES.  MY NUMBER WAS";100*A(1)+10*A(2)+A(3)
 620 GOTO 700
 630 PRINT "TRY GUESSING A THREE-DIGIT NUMBER.":GOTO 230
 650 PRINT "OH, I FORGOT TO TELL YOU THAT THE NUMBER I HAVE IN MIND"
@@ -74,7 +74,7 @@
 680 PRINT "YOU GOT IT!!!":PRINT
 690 Y=Y+1
 700 INPUT "PLAY AGAIN (YES OR NO)";A$
-720 IF LEFT$(A$,1)="YES" THEN 150
+720 IF LEFT$(A$,1)="Y" THEN 150
 730 IF Y=0 THEN 750
 740 PRINT:PRINT "A";Y;"POINT BAGELS BUFF!!"
 750 PRINT "HOPE YOU HAD FUN.  BYE."
diff --git a/05 Bagels/javascript/bagels.html b/05 Bagels/javascript/bagels.html
new file mode 100644
index 00000000..714c3c9a
--- /dev/null
+++ b/05 Bagels/javascript/bagels.html	
@@ -0,0 +1,9 @@
+
+
+BAGELS
+
+
+

+
+
+
diff --git a/05 Bagels/javascript/bagels.js b/05 Bagels/javascript/bagels.js
new file mode 100644
index 00000000..37fa3665
--- /dev/null
+++ b/05 Bagels/javascript/bagels.js	
@@ -0,0 +1,160 @@
+// BAGELS
+//
+// Converted from BASIC to Javascript by Oscar Toledo G. (nanochess)
+//
+
+function print(str)
+{
+    document.getElementById("output").appendChild(document.createTextNode(str));
+}
+
+function input()
+{
+    var input_element;
+    var input_str;
+    
+    return new Promise(function (resolve) {
+                       input_element = document.createElement("INPUT");
+                       
+                       print("? ");
+                       input_element.setAttribute("type", "text");
+                       input_element.setAttribute("length", "50");
+                       document.getElementById("output").appendChild(input_element);
+                       input_element.focus();
+                       input_str = undefined;
+                       input_element.addEventListener("keydown", function (event) {
+                                                      if (event.keyCode == 13) {
+                                                      input_str = input_element.value;
+                                                      document.getElementById("output").removeChild(input_element);
+                                                      print(input_str);
+                                                      print("\n");
+                                                      resolve(input_str);
+                                                      }
+                                                      });
+                       });
+}
+
+function tab(space)
+{
+    var str = "";
+    while (space-- > 0)
+        str += " ";
+    return str;
+}
+
+print(tab(33) + "BAGELS\n");
+print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
+
+// *** Bagles number guessing game
+// *** Original source unknown but suspected to be
+// *** Lawrence Hall of Science, U.C. Berkeley
+
+a1 = [0,0,0,0];
+a = [0,0,0,0];
+b = [0,0,0,0];
+
+y = 0;
+t = 255;
+
+print("\n");
+print("\n");
+print("\n");
+
+// Main program
+async function main()
+{
+    while (1) {
+        print("WOULD YOU LIKE THE RULES (YES OR NO)");
+        str = await input();
+        if (str.substr(0, 1) != "N") {
+            print("\n");
+            print("I AM THINKING OF A THREE-DIGIT NUMBER.  TRY TO GUESS\n");
+            print("MY NUMBER AND I WILL GIVE YOU CLUES AS FOLLOWS:\n");
+            print("   PICO   - ONE DIGIT CORRECT BUT IN THE WRONG POSITION\n");
+            print("   FERMI  - ONE DIGIT CORRECT AND IN THE RIGHT POSITION\n");
+            print("   BAGELS - NO DIGITS CORRECT\n");
+        }
+        for (i = 1; i <= 3; i++) {
+            do {
+                a[i] = Math.floor(Math.random() * 10);
+                for (j = i - 1; j >= 1; j--) {
+                    if (a[i] == a[j])
+                        break;
+                }
+            } while (j >= 1) ;
+        }
+        print("\n");
+        print("O.K.  I HAVE A NUMBER IN MIND.\n");
+        for (i = 1; i <= 20; i++) {
+            while (1) {
+                print("GUESS #" + i);
+                str = await input();
+                if (str.length != 3) {
+                    print("TRY GUESSING A THREE-DIGIT NUMBER.\n");
+                    continue;
+                }
+                for (z = 1; z <= 3; z++)
+                    a1[z] = str.charCodeAt(z - 1);
+                for (j = 1; j <= 3; j++) {
+                    if (a1[j] < 48 || a1[j] > 57)
+                        break;
+                    b[j] = a1[j] - 48;
+                }
+                if (j <= 3) {
+                    print("WHAT?");
+                    continue;
+                }
+                if (b[1] == b[2] || b[2] == b[3] || b[3] == b[1]) {
+                    print("OH, I FORGOT TO TELL YOU THAT THE NUMBER I HAVE IN MIND\n");
+                    print("HAS NO TWO DIGITS THE SAME.\n");
+                    continue;
+                }
+                break;
+            }
+            c = 0;
+            d = 0;
+            for (j = 1; j <= 2; j++) {
+                if (a[j] == b[j + 1])
+                    c++;
+                if (a[j + 1] == b[j])
+                    c++;
+            }
+            if (a[1] == b[3])
+                c++;
+            if (a[3] == b[1])
+                c++;
+            for (j = 1; j <= 3; j++) {
+                if (a[j] == b[j])
+                    d++;
+            }
+            if (d == 3)
+                break;
+            for (j = 0; j < c; j++)
+                print("PICO ");
+            for (j = 0; j < d; j++)
+                print("FERMI ");
+            if (c + d == 0)
+                print("BAGELS");
+            print("\n");
+        }
+        if (i <= 20) {
+            print("YOU GOT IT!!!\n");
+            print("\n");
+        } else {
+            print("OH WELL.\n");
+            print("THAT'S A TWENTY GUESS.  MY NUMBER WAS " + a[1] + a[2] + a[3]);
+        }
+        y++;
+        print("PLAY AGAIN (YES OR NO)");
+        str = await input();
+        if (str.substr(0, 1) != "Y")
+            break;
+    }
+    if (y == 0)
+        print("HOPE YOU HAD FUN.  BYE.\n");
+    else
+        print("\nA " + y + " POINT BAGELS BUFF!!\n");
+    
+}
+
+main();

From 1595241e51e0e34c078225f065f74bb445b638a5 Mon Sep 17 00:00:00 2001
From: John Welch 
Date: Wed, 17 Feb 2021 23:36:12 +0000
Subject: [PATCH 03/33] Chemist in C#

---
 24 Chemist/csharp/Chemist/Chemist.sln         | 25 ++++++++++
 .../csharp/Chemist/Chemist/Chemist.csproj     |  8 +++
 24 Chemist/csharp/Chemist/Chemist/Program.cs  | 49 +++++++++++++++++++
 3 files changed, 82 insertions(+)
 create mode 100644 24 Chemist/csharp/Chemist/Chemist.sln
 create mode 100644 24 Chemist/csharp/Chemist/Chemist/Chemist.csproj
 create mode 100644 24 Chemist/csharp/Chemist/Chemist/Program.cs

diff --git a/24 Chemist/csharp/Chemist/Chemist.sln b/24 Chemist/csharp/Chemist/Chemist.sln
new file mode 100644
index 00000000..6dc7bfa2
--- /dev/null
+++ b/24 Chemist/csharp/Chemist/Chemist.sln	
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31005.135
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chemist", "Chemist\Chemist.csproj", "{8CC70F80-F2D6-47B6-8976-079352AC6C85}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{8CC70F80-F2D6-47B6-8976-079352AC6C85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8CC70F80-F2D6-47B6-8976-079352AC6C85}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8CC70F80-F2D6-47B6-8976-079352AC6C85}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8CC70F80-F2D6-47B6-8976-079352AC6C85}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {4AFDA581-82B1-42C7-9C9C-26F6B4288584}
+	EndGlobalSection
+EndGlobal
diff --git a/24 Chemist/csharp/Chemist/Chemist/Chemist.csproj b/24 Chemist/csharp/Chemist/Chemist/Chemist.csproj
new file mode 100644
index 00000000..20827042
--- /dev/null
+++ b/24 Chemist/csharp/Chemist/Chemist/Chemist.csproj	
@@ -0,0 +1,8 @@
+
+
+  
+    Exe
+    net5.0
+  
+
+
diff --git a/24 Chemist/csharp/Chemist/Chemist/Program.cs b/24 Chemist/csharp/Chemist/Chemist/Program.cs
new file mode 100644
index 00000000..64466bff
--- /dev/null
+++ b/24 Chemist/csharp/Chemist/Chemist/Program.cs	
@@ -0,0 +1,49 @@
+using System;
+const int maxLives = 9;
+
+WriteCentred("Chemist");
+WriteCentred("Creative Computing, Morristown, New Jersey");
+Console.WriteLine(@"
+
+
+The fictitious chemical kryptocyanic acid can only be
+diluted by the ratio of 7 parts water to 3 parts acid.
+If any other ratio is attempted, the acid becomes unstable
+and soon explodes.  Given the amount of acid, you must
+decide who much water to add for dilution.  If you miss
+you face the consequences.
+");
+
+var random = new Random();
+int livesUsed = 0;
+while (livesUsed < maxLives)
+{
+    int krypto = random.Next(1, 50);
+    double water = krypto * 7.0 / 3.0;
+
+    Console.WriteLine($"{krypto} Liters of kryptocyanic acid.  How much water?");
+    double answer = double.Parse(Console.ReadLine());
+
+    double diff = Math.Abs(answer - water);
+    if (diff <= water / 20)
+    {
+        Console.WriteLine("Good job! You may breathe now, but don't inhale the fumes"!);
+        Console.WriteLine();
+    }
+    else
+    {
+        Console.WriteLine("Sizzle!  You have just been desalinated into a blob\nof quivering protoplasm!");
+        Console.WriteLine();
+        livesUsed++;
+
+        if (livesUsed < maxLives)
+            Console.WriteLine("However, you may try again with another life.");
+    }
+}
+Console.WriteLine($"Your {maxLives} lives are used, but you will be long remembered for\nyour contributions to the field of comic book chemistry.");
+
+static void WriteCentred(string text)
+{
+    int indent = (Console.WindowWidth + text.Length) / 2;
+    Console.WriteLine($"{{0,{indent}}}", text);
+}

From bcf5808dbe7421a9cb3541ef2753e2b1b4e62bef Mon Sep 17 00:00:00 2001
From: nanochess 
Date: Wed, 17 Feb 2021 17:45:25 -0600
Subject: [PATCH 04/33] Ported BANNER to Javascript

---
 06 Banner/javascript/banner.html |   9 ++
 06 Banner/javascript/banner.js   | 168 +++++++++++++++++++++++++++++++
 2 files changed, 177 insertions(+)
 create mode 100644 06 Banner/javascript/banner.html
 create mode 100644 06 Banner/javascript/banner.js

diff --git a/06 Banner/javascript/banner.html b/06 Banner/javascript/banner.html
new file mode 100644
index 00000000..62f1bca8
--- /dev/null
+++ b/06 Banner/javascript/banner.html	
@@ -0,0 +1,9 @@
+
+
+BANNER
+
+
+

+
+
+
diff --git a/06 Banner/javascript/banner.js b/06 Banner/javascript/banner.js
new file mode 100644
index 00000000..ca360487
--- /dev/null
+++ b/06 Banner/javascript/banner.js	
@@ -0,0 +1,168 @@
+// BANNER
+//
+// Converted from BASIC to Javascript by Oscar Toledo G. (nanochess)
+//
+
+function print(str)
+{
+    document.getElementById("output").appendChild(document.createTextNode(str));
+}
+
+function input()
+{
+    var input_element;
+    var input_str;
+    
+    return new Promise(function (resolve) {
+                       input_element = document.createElement("INPUT");
+                       
+                       print("? ");
+                       input_element.setAttribute("type", "text");
+                       input_element.setAttribute("length", "50");
+                       document.getElementById("output").appendChild(input_element);
+                       input_element.focus();
+                       input_str = undefined;
+                       input_element.addEventListener("keydown", function (event) {
+                                                      if (event.keyCode == 13) {
+                                                      input_str = input_element.value;
+                                                      document.getElementById("output").removeChild(input_element);
+                                                      print(input_str);
+                                                      print("\n");
+                                                      resolve(input_str);
+                                                      }
+                                                      });
+                       });
+}
+
+function tab(space)
+{
+    var str = "";
+    while (space-- > 0)
+        str += " ";
+    return str;
+}
+
+var letters = [" ",0,0,0,0,0,0,0,
+               "A",505,37,35,34,35,37,505,
+               "G",125,131,258,258,290,163,101,
+               "E",512,274,274,274,274,258,258,
+               "T",2,2,2,512,2,2,2,
+               "W",256,257,129,65,129,257,256,
+               "L",512,257,257,257,257,257,257,
+               "S",69,139,274,274,274,163,69,
+               "O",125,131,258,258,258,131,125,
+               "N",512,7,9,17,33,193,512,
+               "F",512,18,18,18,18,2,2,
+               "K",512,17,17,41,69,131,258,
+               "B",512,274,274,274,274,274,239,
+               "D",512,258,258,258,258,131,125,
+               "H",512,17,17,17,17,17,512,
+               "M",512,7,13,25,13,7,512,
+               "?",5,3,2,354,18,11,5,
+               "U",128,129,257,257,257,129,128,
+               "R",512,18,18,50,82,146,271,
+               "P",512,18,18,18,18,18,15,
+               "Q",125,131,258,258,322,131,381,
+               "Y",8,9,17,481,17,9,8,
+               "V",64,65,129,257,129,65,64,
+               "X",388,69,41,17,41,69,388,
+               "Z",386,322,290,274,266,262,260,
+               "I",258,258,258,512,258,258,258,
+               "C",125,131,258,258,258,131,69,
+               "J",65,129,257,257,257,129,128,
+               "1",0,0,261,259,512,257,257,
+               "2",261,387,322,290,274,267,261,
+               "*",69,41,17,512,17,41,69,
+               "3",66,130,258,274,266,150,100,
+               "4",33,49,41,37,35,512,33,
+               "5",160,274,274,274,274,274,226,
+               "6",194,291,293,297,305,289,193,
+               "7",258,130,66,34,18,10,8,
+               "8",69,171,274,274,274,171,69,
+               "9",263,138,74,42,26,10,7,
+               "=",41,41,41,41,41,41,41,
+               "!",1,1,1,384,1,1,1,
+               "0",57,69,131,258,131,69,57,
+               ".",1,1,129,449,129,1,1];
+
+f = [];
+j = [];
+s = [];
+
+// Main program
+async function main()
+{
+    print("HORIZONTAL");
+    x = parseInt(await input());
+    print("VERTICAL");
+    y = parseInt(await input());
+    print("CENTERED");
+    ls = await input();
+    g1 = 0;
+    if (ls > "P")
+        g1 = 1;
+    print("CHARACTER (TYPE 'ALL' IF YOU WANT CHARACTER BEING PRINTED)");
+    ms = await input();
+    print("STATEMENT");
+    as = await input();
+    print("SET PAGE");	// This means to prepare printer, just press Enter
+    os = await input();
+    
+    for (t = 0; t < as.length; t++) {
+        ps = as.substr(t, 1);
+        for (o = 0; o < 50 * 8; o += 8) {
+            if (letters[o] == ps) {
+                for (u = 1; u <= 7; u++)
+                    s[u] = letters[o + u];
+                break;
+            }
+        }
+        if (o == 50 * 8) {
+            ps = " ";
+            o = 0;
+        }
+//      print("Doing " + o + "\n");
+        if (o == 0) {
+            for (h = 1; h <= 7 * x; h++)
+                print("\n");
+        } else {
+            xs = ms;
+            if (ms == "ALL")
+                xs = ps;
+            for (u = 1; u <= 7; u++) {
+                // An inefficient way of extracting bits
+                // but good enough in BASIC because there
+                // aren't bit shifting operators.
+                for (k = 8; k >= 0; k--) {
+                    if (Math.pow(2, k) >= s[u]) {
+                        j[9 - k] = 0;
+                    } else {
+                        j[9 - k] = 1;
+                        s[u] -= Math.pow(2, k);
+                        if (s[u] == 1) {
+                            f[u] = 9 - k;
+                            break;
+                        }
+                    }
+                }
+                for (t1 = 1; t1 <= x; t1++) {
+                    str = tab((63 - 4.5 * y) * g1 / xs.length + 1);
+                    for (b = 1; b <= f[u]; b++) {
+                        if (j[b] == 0) {
+                            for (i = 1; i <= y; i++)
+                                str += tab(xs.length);
+                        } else {
+                            for (i = 1; i <= y; i++)
+                                str += xs;
+                        }
+                    }
+                    print(str + "\n");	
+                }
+            }
+            for (h = 1; h <= 2 * x; h++) 
+                print("\n");
+        }
+    }    
+}
+
+main();

From c23d085099d163bd689e767bcaed66579678f9b8 Mon Sep 17 00:00:00 2001
From: John Welch 
Date: Wed, 17 Feb 2021 23:59:44 +0000
Subject: [PATCH 05/33] Sine Wave in C#

---
 78 Sine Wave/csharp/SineWave/SineWave.sln     | 25 +++++++++++++++++++
 .../csharp/SineWave/SineWave/Program.cs       | 15 +++++++++++
 .../csharp/SineWave/SineWave/SineWave.csproj  |  8 ++++++
 3 files changed, 48 insertions(+)
 create mode 100644 78 Sine Wave/csharp/SineWave/SineWave.sln
 create mode 100644 78 Sine Wave/csharp/SineWave/SineWave/Program.cs
 create mode 100644 78 Sine Wave/csharp/SineWave/SineWave/SineWave.csproj

diff --git a/78 Sine Wave/csharp/SineWave/SineWave.sln b/78 Sine Wave/csharp/SineWave/SineWave.sln
new file mode 100644
index 00000000..f32a06cd
--- /dev/null
+++ b/78 Sine Wave/csharp/SineWave/SineWave.sln	
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31005.135
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SineWave", "SineWave\SineWave.csproj", "{B316DD7F-5755-4216-AFDC-D83720F8ACA2}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{B316DD7F-5755-4216-AFDC-D83720F8ACA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B316DD7F-5755-4216-AFDC-D83720F8ACA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B316DD7F-5755-4216-AFDC-D83720F8ACA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B316DD7F-5755-4216-AFDC-D83720F8ACA2}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {32A37343-2955-4124-8765-9143F6C529DC}
+	EndGlobalSection
+EndGlobal
diff --git a/78 Sine Wave/csharp/SineWave/SineWave/Program.cs b/78 Sine Wave/csharp/SineWave/SineWave/Program.cs
new file mode 100644
index 00000000..6f44f8d5
--- /dev/null
+++ b/78 Sine Wave/csharp/SineWave/SineWave/Program.cs	
@@ -0,0 +1,15 @@
+using System;
+
+Console.WriteLine(Tab(30) + "Sine Wave");
+Console.WriteLine(Tab(15) + "Creative Computing Morristown, New Jersey\n\n\n\n\n");
+
+bool isCreative = true;
+for (double t = 0.0; t <= 40.0; t += 0.25)
+{
+    int a = (int)(26 + 25 * Math.Sin(t));
+    string word = isCreative ? "Creative" : "Computing";
+    Console.WriteLine($"{Tab(a)}{word}");
+    isCreative = !isCreative;
+}
+
+static string Tab(int n) => new string(' ', n);
\ No newline at end of file
diff --git a/78 Sine Wave/csharp/SineWave/SineWave/SineWave.csproj b/78 Sine Wave/csharp/SineWave/SineWave/SineWave.csproj
new file mode 100644
index 00000000..20827042
--- /dev/null
+++ b/78 Sine Wave/csharp/SineWave/SineWave/SineWave.csproj	
@@ -0,0 +1,8 @@
+
+
+  
+    Exe
+    net5.0
+  
+
+

From e356ecd0197f534b7ebfe0f0de3cb84fb943c554 Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Wed, 17 Feb 2021 21:02:39 -0500
Subject: [PATCH 06/33] Implement a 'Canvas' for drawing body parts

---
 44 Hangman/python/hangman.py | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100755 44 Hangman/python/hangman.py

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
new file mode 100755
index 00000000..30910fa4
--- /dev/null
+++ b/44 Hangman/python/hangman.py	
@@ -0,0 +1,42 @@
+#!/usr/bin/env python3
+
+
+class Canvas:
+    ''' For drawing text-based figures '''
+
+    def __init__(self, width=12, height=12, fill=' '):
+        self._buffer = []
+        for _ in range(height):
+            line = []
+            for _ in range(width):
+                line.append(fill[0])
+            self._buffer.append(line)
+
+    def draw(self):
+        for line  in self._buffer:
+            # Joining by the empty string ('') smooshes all of the
+            # individual characters together as one line.
+            print(''.join(line))
+
+    def put(self, character, y, x):
+        # In an effort to avoid distorting the drawn image, only write the
+        # first character of the given string to the buffer.
+        self._buffer[y][x] = character[0]
+
+
+def play():
+    canvas = Canvas()
+    canvas.put('-', 2, 5)
+    canvas.put('-', 2, 6)
+    canvas.put('-', 2, 7)
+    canvas.put('(', 3, 4)
+    canvas.put('.', 3, 5)
+    canvas.put('.', 3, 7)
+    canvas.put(')', 3, 8)
+    canvas.put('-', 4, 5)
+    canvas.put('-', 4, 6)
+    canvas.put('-', 4, 7)
+    canvas.draw()
+
+if __name__ == '__main__':
+    play()

From e8d68be1bfe480ec39ee05e9cbde4f2f4f2ea6b2 Mon Sep 17 00:00:00 2001
From: Tim <70119791+journich@users.noreply.github.com>
Date: Thu, 18 Feb 2021 13:49:33 +1030
Subject: [PATCH 07/33] Java version of Hi-Lo game

---
 47 Hi-Lo/java/Hi-Lo.iml         |  11 ++
 47 Hi-Lo/java/src/HiLo.java     | 214 ++++++++++++++++++++++++++++++++
 47 Hi-Lo/java/src/HiLoGame.java |   8 ++
 3 files changed, 233 insertions(+)
 create mode 100644 47 Hi-Lo/java/Hi-Lo.iml
 create mode 100644 47 Hi-Lo/java/src/HiLo.java
 create mode 100644 47 Hi-Lo/java/src/HiLoGame.java

diff --git a/47 Hi-Lo/java/Hi-Lo.iml b/47 Hi-Lo/java/Hi-Lo.iml
new file mode 100644
index 00000000..c90834f2
--- /dev/null
+++ b/47 Hi-Lo/java/Hi-Lo.iml	
@@ -0,0 +1,11 @@
+
+
+  
+    
+    
+      
+    
+    
+    
+  
+
\ No newline at end of file
diff --git a/47 Hi-Lo/java/src/HiLo.java b/47 Hi-Lo/java/src/HiLo.java
new file mode 100644
index 00000000..36f44ee5
--- /dev/null
+++ b/47 Hi-Lo/java/src/HiLo.java	
@@ -0,0 +1,214 @@
+import java.util.Scanner;
+
+/**
+ * Game of HiLo
+ *
+ * Based on the Basic game of Hi-Lo here
+ * https://github.com/coding-horror/basic-computer-games/blob/main/47%20Hi-Lo/hi-lo.bas
+ *
+ * Note:  The idea was to create a version of this 1970's Basic game in Java, without introducing
+ *        new features - no additional text, error checking, etc has been added.
+ */
+public class HiLo {
+
+    public static final int LOW_NUMBER_RANGE = 1;
+    public static final int HIGH_NUMBER_RANGE = 100;
+    public static final int MAX_GUESSES = 6;
+
+    private enum GAME_STATE {
+        STARTING,
+        START_GAME,
+        GUESSING,
+        PLAY_AGAIN,
+        GAME_OVER
+    }
+
+    // Used for keyboard input
+    private Scanner kbScanner;
+
+    // Current game state
+    private GAME_STATE gameState;
+
+    // Players Winnings
+    private int playerAmountWon;
+
+    // Players guess count;
+    private int playersGuesses;
+
+    // Computers random number
+    private int computersNumber;
+
+    public HiLo() {
+
+        this.gameState = GAME_STATE.STARTING;
+        this.playerAmountWon = 0;
+
+        // Initialise kb scanner
+        kbScanner = new Scanner(System.in);
+    }
+
+    /**
+     * Main game loop
+     *
+     */
+    public void play() {
+
+        do {
+            switch (gameState) {
+
+                // Show an introduction the first time the game is played.
+                case STARTING:
+                    intro();
+                    gameState = GAME_STATE.START_GAME;
+                    break;
+
+                // Generate computers number for player to guess, etc.
+                case START_GAME:
+                    init();
+                    System.out.println("O.K.  I HAVE A NUMBER IN MIND.");
+                    this.gameState = GAME_STATE.GUESSING;
+                    break;
+
+                // Player guesses the number until they get it or run out of guesses
+                case GUESSING:
+                    int guess = playerGuess();
+
+                    // Check if the player guessed the number
+                    if(validateGuess(guess)) {
+                        System.out.println("GOT IT!!!!!!!!!!   YOU WIN " + this.computersNumber
+                                + " DOLLARS.");
+                        this.playerAmountWon += this.computersNumber;
+                        System.out.println("YOUR TOTAL WINNINGS ARE NOW "
+                                + this.playerAmountWon + " DOLLARS.");
+                        this.gameState = GAME_STATE.PLAY_AGAIN;
+                    } else {
+                        // incorrect guess
+                        this.playersGuesses++;
+                        // Ran out of guesses?
+                        if (this.playersGuesses == MAX_GUESSES) {
+                            System.out.println("YOU BLEW IT...TOO BAD...THE NUMBER WAS "
+                                    + this.computersNumber);
+                            this.playerAmountWon = 0;
+                            this.gameState = GAME_STATE.PLAY_AGAIN;
+                        }
+                    }
+                    break;
+
+                // Play again, or exit game?
+                case PLAY_AGAIN:
+                    System.out.println();
+                    if(yesEntered(displayTextAndGetInput("PLAY AGAIN (YES OR NO) "))) {
+                        this.gameState = GAME_STATE.START_GAME;
+                    } else {
+                        // Chose not to play again
+                        System.out.println("SO LONG.  HOPE YOU ENJOYED YOURSELF!!!");
+                        this.gameState = GAME_STATE.GAME_OVER;
+                    }
+            }
+        } while (gameState != GAME_STATE.GAME_OVER);
+    }
+
+    /**
+     * Checks the players guess against the computers randomly generated number
+     *
+     * @param theGuess
+     * @return true if the player guessed correctly, false otherwise
+     */
+    private boolean validateGuess(int theGuess) {
+
+        // Correct guess?
+        if(theGuess == this.computersNumber) {
+            return true;
+        }
+
+        if(theGuess > this.computersNumber) {
+            System.out.println("YOUR GUESS IS TOO HIGH.");
+        } else {
+            System.out.println("YOUR GUESS IS TOO LOW.");
+        }
+
+        return false;
+    }
+
+    private void init() {
+        this.playersGuesses = 0;
+        this.computersNumber = randomNumber();
+    }
+
+    public void intro() {
+        System.out.println("HI LO");
+        System.out.println("CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY");
+        System.out.println();
+        System.out.println();
+        System.out.println("THIS IS THE GAME OF HI LO.");
+        System.out.println();
+        System.out.println("YOU WILL HAVE 6 TRIES TO GUESS THE AMOUNT OF MONEY IN THE");
+        System.out.println("HI LO JACKPOT, WHICH IS BETWEEN 1 AND 100 DOLLARS.  IF YOU");
+        System.out.println("GUESS THE AMOUNT, YOU WIN ALL THE MONEY IN THE JACKPOT!");
+        System.out.println("THEN YOU GET ANOTHER CHANCE TO WIN MORE MONEY.  HOWEVER,");
+        System.out.println("IF YOU DO NOT GUESS THE AMOUNT, THE GAME ENDS.");
+    }
+
+    /**
+     * Get players guess from kb
+     *
+     * @return players guess as an int
+     */
+    private int playerGuess() {
+        return Integer.valueOf((displayTextAndGetInput("YOUR GUESS? ")));
+    }
+
+    /**
+     * Checks whether player entered Y or YES to a question.
+     *
+     * @param text  player string from kb
+     * @return true of Y or YES was entered, otherwise false
+     */
+    private boolean yesEntered(String text) {
+        return stringIsAnyValue(text, new String[] {"Y", "YES"});
+    }
+
+    /**
+     * Check whether a string equals one of a variable number of values
+     * Useful to check for Y or YES for example
+     * Comparison is case insensitive.
+     *
+     * @param text source string
+     * @param values a range of values to compare against the source string
+     * @return true if a comparison was found in one of the variable number of strings passed
+     */
+    private boolean stringIsAnyValue(String text, String... values) {
+
+        // Cycle through the variable number of values and test each
+        for(String val:values) {
+            if(text.equalsIgnoreCase(val)) {
+                return true;
+            }
+        }
+
+        // no matches
+        return false;
+    }
+
+    /*
+     * Print a message on the screen, then accept input from Keyboard.
+     *
+     * @param text message to be displayed on screen.
+     * @return what was typed by the player.
+     */
+    private String displayTextAndGetInput(String text) {
+        System.out.print(text);
+        return kbScanner.next();
+    }
+
+    /**
+     * Generate random number
+     * Used as a single digit of the computer player
+     *
+     * @return random number
+     */
+    private int randomNumber() {
+        return (int) (Math.random()
+                * (HIGH_NUMBER_RANGE - LOW_NUMBER_RANGE + 1) + LOW_NUMBER_RANGE);
+    }
+}
\ No newline at end of file
diff --git a/47 Hi-Lo/java/src/HiLoGame.java b/47 Hi-Lo/java/src/HiLoGame.java
new file mode 100644
index 00000000..314606c4
--- /dev/null
+++ b/47 Hi-Lo/java/src/HiLoGame.java	
@@ -0,0 +1,8 @@
+public class HiLoGame {
+
+    public static void main(String[] args) {
+
+        HiLo hiLo = new HiLo();
+        hiLo.play();
+    }
+}

From 2a4b6cfd40b10f5841c37147eba5c1e17b80b040 Mon Sep 17 00:00:00 2001
From: Tim <70119791+journich@users.noreply.github.com>
Date: Thu, 18 Feb 2021 14:25:12 +1030
Subject: [PATCH 08/33] Java version of SineWave basic program

---
 78 Sine Wave/java/SineWave.java | 35 +++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 78 Sine Wave/java/SineWave.java

diff --git a/78 Sine Wave/java/SineWave.java b/78 Sine Wave/java/SineWave.java
new file mode 100644
index 00000000..7d917a75
--- /dev/null
+++ b/78 Sine Wave/java/SineWave.java	
@@ -0,0 +1,35 @@
+import java.util.Arrays;
+
+/**
+ * Sine Wave
+ *
+ * Based on the Sine Wave program here
+ * https://github.com/coding-horror/basic-computer-games/blob/main/78%20Sine%20Wave/sinewave.bas
+ *
+ * Note:  The idea was to create a version of this 1970's Basic program in Java, without introducing
+ *        new features - no additional text, error checking, etc has been added.
+ */
+public class SineWave {
+
+    public static void main(String[] args) {
+
+        System.out.println("SINE WAVE");
+        System.out.println("CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY");
+        System.out.println();
+
+        int toggle = 0;
+        for(double t = 0; t<40; t += .25) {
+            int a = 26 + (int) (25 * Math.sin(t));
+            char[] repeat = new char[a];
+            Arrays.fill(repeat,' ');
+            System.out.print(new String(repeat));
+            if (toggle == 1) {
+                System.out.println("COMPUTING");
+                toggle = 0;
+            } else {
+                System.out.println("CREATIVE");
+                toggle = 1;
+            }
+        }
+    }
+}

From 16f572f6ec502b2f4bf0cbaa0b0c2ed04703bc08 Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Wed, 17 Feb 2021 23:23:15 -0500
Subject: [PATCH 09/33] Drawing code for victim and gallows

---
 44 Hangman/python/hangman.py | 88 ++++++++++++++++++++++++++++++------
 1 file changed, 75 insertions(+), 13 deletions(-)

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
index 30910fa4..479ec733 100755
--- a/44 Hangman/python/hangman.py	
+++ b/44 Hangman/python/hangman.py	
@@ -9,33 +9,95 @@ class Canvas:
         for _ in range(height):
             line = []
             for _ in range(width):
-                line.append(fill[0])
+                line.append('')
             self._buffer.append(line)
 
+        self.clear()
+
+    def clear(self, fill=' '):
+        for row in self._buffer:
+            for x in range(len(row)):
+                row[x] = fill
+
     def draw(self):
         for line  in self._buffer:
             # Joining by the empty string ('') smooshes all of the
             # individual characters together as one line.
             print(''.join(line))
 
-    def put(self, character, y, x):
+    def put(self, s, x, y):
         # In an effort to avoid distorting the drawn image, only write the
         # first character of the given string to the buffer.
-        self._buffer[y][x] = character[0]
+        self._buffer[y][x] = s[0]
 
+def draw_head(canvas):
+    canvas.put('-', 5, 2)
+    canvas.put('-', 6, 2)
+    canvas.put('-', 7, 2)
+    canvas.put('(', 4, 3)
+    canvas.put('.', 5, 3)
+    canvas.put('.', 7, 3)
+    canvas.put(')', 8, 3)
+    canvas.put('-', 5, 4)
+    canvas.put('-', 6, 4)
+    canvas.put('-', 7, 4)
+
+def draw_gallows(canvas):
+    for i in range(12):
+        canvas.put('X', 0, i)
+    for i in range(7):
+        canvas.put('X', i, 0)
+    canvas.put('X', 6, 1)
+
+def draw_body(canvas):
+    for i in range(5, 9, 1):
+        canvas.put('X', 6, i)
+
+def draw_right_arm(canvas):
+    for i in range(3, 7):
+        canvas.put('\\', i - 1, i)
+
+def draw_left_arm(canvas):
+    canvas.put('/', 10, 3)
+    canvas.put('/', 9, 4)
+    canvas.put('/', 8, 5)
+    canvas.put('/', 7, 6)
+
+def draw_right_leg(canvas):
+    canvas.put('/', 5, 9)
+    canvas.put('/', 4, 10)
+
+def draw_left_leg(canvas):
+    canvas.put('\\', 7, 9)
+    canvas.put('\\', 8, 10)
+
+def draw_left_hand(canvas):
+    canvas.put('\\', 10, 2)
+
+def draw_right_hand(canvas):
+    canvas.put('/', 2, 2)
+
+def draw_left_foot(canvas):
+    canvas.put('\\', 9, 11)
+    canvas.put('-', 10, 11)
+
+def draw_right_foot(canvas):
+    canvas.put('-', 2, 11)
+    canvas.put('/', 3, 11)
 
 def play():
     canvas = Canvas()
-    canvas.put('-', 2, 5)
-    canvas.put('-', 2, 6)
-    canvas.put('-', 2, 7)
-    canvas.put('(', 3, 4)
-    canvas.put('.', 3, 5)
-    canvas.put('.', 3, 7)
-    canvas.put(')', 3, 8)
-    canvas.put('-', 4, 5)
-    canvas.put('-', 4, 6)
-    canvas.put('-', 4, 7)
+    draw_gallows(canvas)
+    draw_head(canvas)
+    draw_body(canvas)
+    draw_right_arm(canvas)
+    draw_left_arm(canvas)
+    draw_right_leg(canvas)
+    draw_left_leg(canvas)
+    draw_left_hand(canvas)
+    draw_right_hand(canvas)
+    draw_left_foot(canvas)
+    draw_right_foot(canvas)
     canvas.draw()
 
 if __name__ == '__main__':

From 308990104b79fd2eb150daa03cf255ac98737ab2 Mon Sep 17 00:00:00 2001
From: Tim <70119791+journich@users.noreply.github.com>
Date: Thu, 18 Feb 2021 16:53:09 +1030
Subject: [PATCH 10/33] Java version of Bullseye

---
 18 Bullseye/java/Bullseye.iml          |  11 ++
 18 Bullseye/java/src/Bullseye.java     | 248 +++++++++++++++++++++++++
 18 Bullseye/java/src/BullseyeGame.java |   8 +
 18 Bullseye/java/src/Player.java       |  26 +++
 18 Bullseye/java/src/Shot.java         |  21 +++
 5 files changed, 314 insertions(+)
 create mode 100644 18 Bullseye/java/Bullseye.iml
 create mode 100644 18 Bullseye/java/src/Bullseye.java
 create mode 100644 18 Bullseye/java/src/BullseyeGame.java
 create mode 100644 18 Bullseye/java/src/Player.java
 create mode 100644 18 Bullseye/java/src/Shot.java

diff --git a/18 Bullseye/java/Bullseye.iml b/18 Bullseye/java/Bullseye.iml
new file mode 100644
index 00000000..c90834f2
--- /dev/null
+++ b/18 Bullseye/java/Bullseye.iml	
@@ -0,0 +1,11 @@
+
+
+  
+    
+    
+      
+    
+    
+    
+  
+
\ No newline at end of file
diff --git a/18 Bullseye/java/src/Bullseye.java b/18 Bullseye/java/src/Bullseye.java
new file mode 100644
index 00000000..06090351
--- /dev/null
+++ b/18 Bullseye/java/src/Bullseye.java	
@@ -0,0 +1,248 @@
+import java.util.ArrayList;
+import java.util.Scanner;
+
+public class Bullseye {
+
+    public static final int FIRST_IDENT = 10;
+    public static final int SECOND_IDENT = 30;
+    public static final int THIRD_INDENT = 30;
+
+    public static final double[] SHOT_ONE = new double[] { .65, .55, .5, .5};
+    public static final double[] SHOT_TWO = new double[] { .99, .77, .43,.01};
+    public static final double[] SHOT_THREE = new double[] { .95, .75, .45, .05 };
+
+    private enum GAME_STATE {
+        STARTING,
+        START_GAME,
+        PLAYING,
+        GAME_OVER
+    }
+
+    private GAME_STATE gameState;
+
+    private ArrayList players;
+
+    private Shot[] shots;
+
+    // Used for keyboard input
+    private Scanner kbScanner;
+
+    private int numberOfPlayers;
+
+    private int round;
+
+    public Bullseye() {
+
+        gameState = GAME_STATE.STARTING;
+        players = new ArrayList<>();
+
+        // Save the random chances of points based on shot type
+
+        shots = new Shot[3];
+        shots[0] = new Shot(SHOT_ONE);
+        shots[1] = new Shot(SHOT_TWO);
+        shots[2] = new Shot(SHOT_THREE);
+
+        // Initialise kb scanner
+        kbScanner = new Scanner(System.in);
+    }
+
+    /**
+     * Main game loop
+     *
+     */
+    public void play() {
+
+        do {
+            switch (gameState) {
+
+                // Show an introduction the first time the game is played.
+                case STARTING:
+                    intro();
+                    gameState = GAME_STATE.START_GAME;
+                    break;
+
+                // Start the game, set the number of players, names and round
+                case START_GAME:
+
+                    this.numberOfPlayers = chooseNumberOfPlayers();
+
+                    for(int i=0; i= p1) {
+            System.out.println("BULLSEYE!!  40 POINTS!");
+            points = 40;
+            // If the throw was 1 (bullseye or missed, then make it missed
+            // N.B. This is a fix for the basic code which for shot type 1
+            // allowed a bullseye but did not make the score zero if a bullseye
+            // was not made (which it should have done).
+        } else if (playerThrow == 1) {
+            System.out.println("MISSED THE TARGET!  TOO BAD.");
+            points = 0;
+        } else if(random >= p2) {
+            System.out.println("30-POINT ZONE!");
+            points = 30;
+        } else if(random >= p3) {
+            System.out.println("20-POINT ZONE");
+            points = 20;
+        } else if(random >= p4) {
+            System.out.println("WHEW!  10 POINTS.");
+            points = 10;
+        } else {
+            System.out.println("MISSED THE TARGET!  TOO BAD.");
+            points = 0;
+        }
+
+        return points;
+    }
+
+    /**
+     * Get players shot 1,2, or 3 - ask again if invalid input
+     *
+     * @param player
+     * @return 1,2, or 3 indicating the players shot
+     */
+    private int getPlayersThrow(Player player) {
+        boolean inputCorrect = false;
+        String theThrow;
+        do {
+            theThrow = displayTextAndGetInput(player.getName() + "'S THROW ");
+            if(theThrow.equals("1") || theThrow.equals("2") || theThrow.equals("3")) {
+                inputCorrect = true;
+            } else {
+                System.out.println("INPUT 1, 2, OR 3!");
+            }
+
+        } while(!inputCorrect);
+
+        return Integer.valueOf(theThrow);
+    }
+
+
+    /**
+     * Get players guess from kb
+     *
+     * @return players guess as an int
+     */
+    private int chooseNumberOfPlayers() {
+
+        return Integer.valueOf((displayTextAndGetInput("HOW MANY PLAYERS? ")));
+    }
+    /*
+     * Print a message on the screen, then accept input from Keyboard.
+     *
+     * @param text message to be displayed on screen.
+     * @return what was typed by the player.
+     */
+    private String displayTextAndGetInput(String text) {
+        System.out.print(text);
+        return kbScanner.next();
+    }
+
+    /**
+     * Format three strings to a given number of spaces
+     * Replacing the original basic code which used tabs
+     *
+     * @param first String to print in pos 1
+     * @param second String to print in pos 2
+     * @param third String to print in pos 3
+     * @return formatted string
+     */
+    private String paddedString(String first, String second, String third) {
+        String output = String.format("%1$" + FIRST_IDENT + "s", first);
+        output += String.format("%1$" + SECOND_IDENT + "s", second);
+        output += String.format("%1$" + THIRD_INDENT + "s", third);
+        return output;
+    }
+}
diff --git a/18 Bullseye/java/src/BullseyeGame.java b/18 Bullseye/java/src/BullseyeGame.java
new file mode 100644
index 00000000..19be8fec
--- /dev/null
+++ b/18 Bullseye/java/src/BullseyeGame.java	
@@ -0,0 +1,8 @@
+public class BullseyeGame {
+
+    public static void main(String[] args) {
+
+        Bullseye bullseye = new Bullseye();
+        bullseye.play();
+    }
+}
diff --git a/18 Bullseye/java/src/Player.java b/18 Bullseye/java/src/Player.java
new file mode 100644
index 00000000..b67b9309
--- /dev/null
+++ b/18 Bullseye/java/src/Player.java	
@@ -0,0 +1,26 @@
+/**
+ * A Player in the game - consists of name and score
+ *
+ */
+public class Player {
+
+    private String name;
+    private int score;
+
+    Player(String name) {
+        this.name = name;
+        this.score = 0;
+    }
+
+    public void addScore(int score) {
+        this.score += score;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public int getScore() {
+        return score;
+    }
+}
diff --git a/18 Bullseye/java/src/Shot.java b/18 Bullseye/java/src/Shot.java
new file mode 100644
index 00000000..01d8b283
--- /dev/null
+++ b/18 Bullseye/java/src/Shot.java	
@@ -0,0 +1,21 @@
+/**
+ * This class records the percentage chance of a given type of shot
+ * scoring specific points
+ * see Bullseye class points calculation method where its used
+ */
+public class Shot {
+
+    double[] chances;
+
+    // Array of doubles are passed for a specific type of shot
+    Shot(double[] shots) {
+        chances = new double[shots.length];
+        for(int i=0; i
Date: Thu, 18 Feb 2021 22:23:53 +1300
Subject: [PATCH 11/33] Port Buzzwords to Ruby

I've tried to follow Jeff Jetton's lead with the comments and
suggestions for improvement in the Python port.
---
 20 Buzzword/ruby/buzzword.rb | 101 +++++++++++++++++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 20 Buzzword/ruby/buzzword.rb

diff --git a/20 Buzzword/ruby/buzzword.rb b/20 Buzzword/ruby/buzzword.rb
new file mode 100644
index 00000000..3ddcf0fa
--- /dev/null
+++ b/20 Buzzword/ruby/buzzword.rb	
@@ -0,0 +1,101 @@
+######################################################################
+#
+# Buzzword Generator
+#
+# From: BASIC Computer Games (1978)
+#       Edited by David H. Ahl
+#
+# "This program is an invaluable aid for preparing speeches and
+#  briefings about education technology.  This buzzword generator
+#  provides sets of three highly-acceptable words to work into your
+#  material.  Your audience will never know that the phrases don't
+#  really mean much of anything because they sound so great!  Full
+#  instructions for running are given in the program.
+#
+# "This version of Buzzword was written by David Ahl."
+#
+#
+# Ruby port by Leslie Viljoen, 2021
+#
+######################################################################
+
+WORDS = [["Ability", "Basal", "Behavioral", "Child-centered",
+           "Differentiated", "Discovery", "Flexible", "Heterogeneous",
+           "Homogenous", "Manipulative", "Modular", "Tavistock",
+           "Individualized"],
+            
+          ["learning", "evaluative", "objective", "cognitive",
+           "enrichment", "scheduling", "humanistic", "integrated",
+           "non-graded", "training", "vertical age", "motivational",
+           "creative"] ,
+            
+          ["grouping", "modification", "accountability", "process",
+           "core curriculum", "algorithm", "performance",
+           "reinforcement", "open classroom", "resource", "structure",
+           "facility","environment"]]
+
+
+# Display intro text
+
+puts "\n           Buzzword Generator"
+puts "Creative Computing  Morristown, New Jersey"
+puts "\n\n"
+puts "This program prints highly acceptable phrases in"
+puts "'educator-speak' that you can work into reports"
+puts "and speeches.  Whenever a question mark is printed,"
+puts "type a 'Y' for another phrase or 'N' to quit."
+puts "\n\nHere's the first phrase:"
+
+loop do
+    phrase = []
+
+    prefix, body, postfix = WORDS
+
+    phrase << prefix[rand(prefix.length)]
+    phrase << body[rand(body.length)]
+    phrase << postfix[rand(postfix.length)]
+            
+    puts phrase.join(' ')
+    puts "\n"
+    
+    print "?"
+    response = gets
+    
+    break unless response.upcase.start_with?('Y')
+end
+
+puts "Come back when you need help with another report!\n"
+
+
+######################################################################
+#
+# Porting Notes
+#
+#   The original program stored all 39 words in one array, then
+#   built the buzzword phrases by randomly sampling from each of the
+#   three regions of the array (1-13, 14-26, and 27-39).
+#
+#   Instead, we're storing the words for each section in three 
+#   separate arrays. That makes it easy to loop through the sections
+#   to stitch the phrase together, and it easily accomodates adding
+#   (or removing) elements from any section.  They don't all need to
+#   be the same length.
+#
+#   The author of this program (and founder of Creative Computing
+#   magazine) first started working at DEC--Digital Equipment
+#   Corporation--as a consultant helping the company market its
+#   computers as educational products.  He later was editor of a DEC
+#   newsletter named "EDU" that focused on using computers in an
+#   educational setting.  No surprise, then, that the buzzwords in
+#   this program were targeted towards educators!
+#   
+#
+# Ideas for Modifications
+#
+#   Try adding more/different words. Better yet, add a third
+#   array to the WORDS array to add new sets of words that
+#   might pertain to different fields. What would business buzzwords
+#   be? Engineering buzzwords?  Art/music buzzwords?  Let the user
+#   choose a field and pick the buzzwords accordingly.
+#
+######################################################################

From 7482f6f2f2ea68488ceecfd7e360f98b1143f9fe Mon Sep 17 00:00:00 2001
From: Tim <70119791+journich@users.noreply.github.com>
Date: Thu, 18 Feb 2021 19:56:44 +1030
Subject: [PATCH 12/33] Java version of Hurkle

---
 51 Hurkle/java/Hurkle.iml          |  11 ++
 51 Hurkle/java/src/Hurkle.java     | 186 +++++++++++++++++++++++++++++
 51 Hurkle/java/src/HurkleGame.java |   7 ++
 3 files changed, 204 insertions(+)
 create mode 100644 51 Hurkle/java/Hurkle.iml
 create mode 100644 51 Hurkle/java/src/Hurkle.java
 create mode 100644 51 Hurkle/java/src/HurkleGame.java

diff --git a/51 Hurkle/java/Hurkle.iml b/51 Hurkle/java/Hurkle.iml
new file mode 100644
index 00000000..c90834f2
--- /dev/null
+++ b/51 Hurkle/java/Hurkle.iml	
@@ -0,0 +1,11 @@
+
+
+  
+    
+    
+      
+    
+    
+    
+  
+
\ No newline at end of file
diff --git a/51 Hurkle/java/src/Hurkle.java b/51 Hurkle/java/src/Hurkle.java
new file mode 100644
index 00000000..8af8732f
--- /dev/null
+++ b/51 Hurkle/java/src/Hurkle.java	
@@ -0,0 +1,186 @@
+import java.util.ArrayList;
+import java.util.Scanner;
+
+public class Hurkle {
+
+    public static final int GRID_SIZE = 10;
+    public static final int MAX_GUESSES = 5;
+
+    private enum GAME_STATE {
+        STARTING,
+        START_GAME,
+        GUESSING,
+        PLAY_AGAIN,
+        GAME_OVER
+    }
+
+    private GAME_STATE gameState;
+
+    // Used for keyboard input
+    private Scanner kbScanner;
+
+    private int guesses;
+
+    // hurkle position
+    private int hurkleXPos;
+    private int hurkleYPos;
+
+    // player guess
+    private int playerGuessXPos;
+    private int playerGuessYPos;
+
+    public Hurkle() {
+
+        gameState = GAME_STATE.STARTING;
+
+        // Initialise kb scanner
+        kbScanner = new Scanner(System.in);
+    }
+
+    /**
+     * Main game loop
+     */
+    public void play() {
+
+        do {
+            switch (gameState) {
+
+                // Show an introduction the first time the game is played.
+                case STARTING:
+                    intro();
+                    gameState = GAME_STATE.START_GAME;
+                    break;
+
+                // Start the game, set the number of players, names and round
+                case START_GAME:
+
+                    this.hurkleXPos = randomNumber();
+                    this.hurkleYPos = randomNumber();
+                    System.out.println("HURKLE AT : " + this.hurkleXPos + "," + this.hurkleYPos);
+
+                    this.guesses = 1;
+                    gameState = GAME_STATE.GUESSING;
+
+                    break;
+
+                // Guess an x,y position of the hurkle
+                case GUESSING:
+                    String guess = displayTextAndGetInput("GUESS #" + this.guesses + "? ");
+                    this.playerGuessXPos = getDelimitedValue(guess, 0);
+                    this.playerGuessYPos = getDelimitedValue(guess, 1);
+                    if (foundHurkle()) {
+                        this.gameState = GAME_STATE.PLAY_AGAIN;
+                    } else {
+                        showDirectionOfHurkle();
+                        this.guesses++;
+                        if(this.guesses > MAX_GUESSES) {
+                            System.out.println("SORRY, THAT'S "
+                                    + MAX_GUESSES + " GUESSES.");
+                            System.out.println("THE HURKLE IS AT "
+                                    + this.hurkleXPos + "," + this.hurkleYPos);
+                            System.out.println();
+                            this.gameState = GAME_STATE.PLAY_AGAIN;
+                        }
+                    }
+
+                    break;
+
+                case PLAY_AGAIN:
+                    System.out.println("LET'S PLAY AGAIN, HURKLE IS HIDING.");
+                    System.out.println();
+                    this.gameState = GAME_STATE.START_GAME;
+                    break;
+            }
+            // Effectively an endless loop because the game never quits as per
+            // the original basic code.
+        } while (gameState != GAME_STATE.GAME_OVER);
+    }
+
+    private void showDirectionOfHurkle() {
+        System.out.print("GO ");
+        if(this.playerGuessYPos == this.hurkleYPos) {
+            // don't print North or South because the player has chosen the
+            // same y grid pos as the hurkle
+        } else if (this.playerGuessYPos < this.hurkleYPos) {
+            System.out.print("NORTH");
+        } else if(this.playerGuessYPos > this.hurkleYPos) {
+            System.out.print("SOUTH");
+        }
+
+        if(this.playerGuessXPos == this.hurkleXPos) {
+            // don't print East or West because the player has chosen the
+            // same x grid pos as the hurkle
+        } else if(this.playerGuessXPos < this.hurkleXPos) {
+            System.out.print("EAST");
+        } else if(this.playerGuessXPos > this.hurkleXPos) {
+            System.out.print("WEST");
+        }
+        System.out.println();
+        return;
+    }
+
+    private boolean foundHurkle() {
+        if ((this.playerGuessXPos - this.hurkleXPos)
+                - (this.playerGuessYPos - this.hurkleYPos) == 0) {
+            System.out.println("YOU FOUND HIM IN " + this.guesses + " GUESSES.");
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Display info about the game
+     */
+    private void intro() {
+        System.out.println("HURKLE");
+        System.out.println("CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY");
+        System.out.println();
+        System.out.println("A HURKLE IS HIDING ON A " + GRID_SIZE + " BY "
+                + GRID_SIZE + " GRID. HOMEBASE");
+        System.out.println("ON THE GRID IS POINT 0,0 IN THE SOUTHWEST CORNER,");
+        System.out.println("AND ANY POINT ON THE GRID IS DESIGNATED BY A");
+        System.out.println("PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. THE FIRST");
+        System.out.println("NUMBER IS THE HORIZONTAL POSITION AND THE SECOND NUMBER");
+        System.out.println("IS THE VERTICAL POSITION. YOU MUST TRY TO");
+        System.out.println("GUESS THE HURKLE'S GRIDPOINT. YOU GET "
+                + MAX_GUESSES + " TRIES.");
+        System.out.println("AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE");
+        System.out.println("DIRECTION TO GO TO LOOK FOR THE HURKLE.");
+    }
+
+    /**
+     * Generate random number
+     * Used to create one part of an x,y grid position
+     *
+     * @return random number
+     */
+    private int randomNumber() {
+        return (int) (Math.random()
+                * (GRID_SIZE) + 1);
+    }
+
+    /*
+     * Print a message on the screen, then accept input from Keyboard.
+     *
+     * @param text message to be displayed on screen.
+     * @return what was typed by the player.
+     */
+    private String displayTextAndGetInput(String text) {
+        System.out.print(text);
+        return kbScanner.next();
+    }
+
+    /**
+     * Accepts a string delimited by comma's and returns the pos'th delimited
+     * value (starting at count 0).
+     *
+     * @param text - text with values separated by comma's
+     * @param pos  - which position to return a value for
+     * @return the int representation of the value
+     */
+    private int getDelimitedValue(String text, int pos) {
+        String[] tokens = text.split(",");
+        return Integer.parseInt(tokens[pos]);
+    }
+}
diff --git a/51 Hurkle/java/src/HurkleGame.java b/51 Hurkle/java/src/HurkleGame.java
new file mode 100644
index 00000000..c582885e
--- /dev/null
+++ b/51 Hurkle/java/src/HurkleGame.java	
@@ -0,0 +1,7 @@
+public class HurkleGame {
+
+    public static void main(String[] args) {
+	    Hurkle hurkle = new Hurkle();
+	    hurkle.play();
+    }
+}

From 7a31a1c29f84a326129b87be95ca62fabf5b59a3 Mon Sep 17 00:00:00 2001
From: Trevor 
Date: Thu, 18 Feb 2021 23:20:52 +1000
Subject: [PATCH 13/33] Port Hangman to Python

---
 44 Hangman/python/hangman.py | 143 +++++++++++++++++++++++++++++++++++
 1 file changed, 143 insertions(+)
 create mode 100644 44 Hangman/python/hangman.py

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
new file mode 100644
index 00000000..ace80ea1
--- /dev/null
+++ b/44 Hangman/python/hangman.py	
@@ -0,0 +1,143 @@
+#!/usr/bin/env python3
+
+# HANGMAN
+#
+# Converted from BASIC to Python by Trevor Hobson
+
+import random
+
+print(" " * 32 + "HANGMAN")
+print(" " * 15 + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n")
+
+words = ["GUM", "SIN", "FOR", "CRY", "LUG", "BYE", "FLY",
+         "UGLY", "EACH", "FROM", "WORK", "TALK", "WITH", "SELF",
+         "PIZZA", "THING", "FEIGN", "FIEND", "ELBOW", "FAULT", "DIRTY",
+         "BUDGET", "SPIRIT", "QUAINT", "MAIDEN", "ESCORT", "PICKAX",
+         "EXAMPLE", "TENSION", "QUININE", "KIDNEY", "REPLICA", "SLEEPER",
+         "TRIANGLE", "KANGAROO", "MAHOGANY", "SERGEANT", "SEQUENCE",
+         "MOUSTACHE", "DANGEROUS", "SCIENTIST", "DIFFERENT", "QUIESCENT",
+         "MAGISTRATE", "ERRONEOUSLY", "LOUDSPEAKER", "PHYTOTOXIC",
+         "MATRIMONIAL", "PARASYMPATHOMIMETIC", "THIGMOTROPISM"]
+
+
+def play_game(guessTarget):
+    """Play the game"""
+    guessWrong = 0
+    guessProgress = ["-"] * len(guessTarget)
+    guessList = []
+    gallows = [([" "] * 12) for i in range(12)]
+    for i in range(12):
+        gallows[i][0] = "X"
+    for i in range(7):
+        gallows[0][i] = "X"
+    gallows[1][6] = "X"
+    guessCount = 0
+    while True:
+        print("Here are the letters you used:")
+        print(",".join(guessList) + "\n")
+        print("".join(guessProgress) + "\n")
+        guessLetter = ""
+        guessWord = ""
+        while guessLetter == "":
+            guessLetter = input("What is your guess? ").upper()[0]
+            if not guessLetter.isalpha():
+                guessLetter = ""
+                print("Only letters are allowed!")
+            elif guessLetter in guessList:
+                guessLetter = ""
+                print("You guessed that letter before!")
+        guessList.append(guessLetter)
+        guessCount = guessCount + 1
+        if guessLetter in guessTarget:
+            indices = [i for i, letter in enumerate(guessTarget) if letter == guessLetter]
+            for i in indices:
+                guessProgress[i] = guessLetter
+            if guessProgress == guessTarget:
+                print("You found the word!")
+                break
+            else:
+                print("\n" + "".join(guessProgress) + "\n")
+                while guessWord == "":
+                    guessWord = input("What is your guess for the word? ").upper()
+                    if not guessWord.isalpha():
+                        guessWord = ""
+                        print("Only words are allowed!")
+                if guessWord == guessTarget:
+                    print("Right!! It took you", guessCount, "guesses!")
+                    break
+        else:
+            guessWrong = guessWrong + 1
+            print("Sorry, that letter isn't in the word.")
+            if guessWrong == 1:
+                print("First, we draw the head.")
+                for i in range(5, 8):
+                    gallows[2][i] = "-"
+                    gallows[4][i] = "-"
+                gallows[3][4] = "("
+                gallows[3][5] = "."
+                gallows[3][7] = "."
+                gallows[3][8] = ")"
+            elif guessWrong == 2:
+                print("Now we draw a body.")
+                for i in range(5, 9):
+                    gallows[i][6] = "X"
+            elif guessWrong == 3:
+                print("Next we draw an arm.")
+                for i in range(3, 7):
+                    gallows[i][i-1] = "\\"
+            elif guessWrong == 4:
+                print("This time it's the other arm.")
+                for i in range(3, 7):
+                    gallows[i][13-i] = "/"
+            elif guessWrong == 5:
+                print("Now, let's draw the right leg.")
+                gallows[9][5] = "/"
+                gallows[10][4] = "/"
+            elif guessWrong == 6:
+                print("This time we draw the left leg.")
+                gallows[9][7] = "\\"
+                gallows[10][8] = "\\"
+            elif guessWrong == 7:
+                print("Now we put up a hand.")
+                gallows[2][10] = "\\"
+            elif guessWrong == 8:
+                print("Next the other hand.")
+                gallows[2][2] = "/"
+            elif guessWrong == 9:
+                print("Now we draw one foot.")
+                gallows[11][9] = "\\"
+                gallows[11][10] = "-"
+            elif guessWrong == 10:
+                print("Here's the other foot -- You're hung!!.")
+                gallows[11][2] = "-"
+                gallows[11][3] = "/"
+            for i in range(12):
+                print("".join(gallows[i]))
+            print("\n")
+            if guessWrong == 10:
+                print("Sorry, you lose. The word was " + guessTarget)
+                break
+
+
+def main():
+    """Main"""
+
+    random.shuffle(words)
+    wordCurrent = 0
+    wordCount = 49
+
+    keep_playing = True
+    while keep_playing:
+        play_game(words[wordCurrent])
+        wordCurrent = wordCurrent + 1
+        if wordCurrent >= wordCount:
+            print("You did all the words!!")
+            keep_playing = False
+        else:
+            keep_playing = input("Want another word? (yes or no) ").lower().startswith("y")
+    print("It's been fun! Bye for now.")
+
+
+if __name__ == "__main__":
+    main()
+    
\ No newline at end of file

From d90bafd0651f286a5285f5a9a76cd17bf1cf18b5 Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Thu, 18 Feb 2021 00:15:56 -0500
Subject: [PATCH 14/33] Implement core game

---
 44 Hangman/python/hangman.py | 101 ++++++++++++++++++++++++++++++-----
 1 file changed, 89 insertions(+), 12 deletions(-)

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
index 479ec733..4b10da18 100755
--- a/44 Hangman/python/hangman.py	
+++ b/44 Hangman/python/hangman.py	
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-
+import random
 
 class Canvas:
     ''' For drawing text-based figures '''
@@ -30,6 +30,7 @@ class Canvas:
         # first character of the given string to the buffer.
         self._buffer[y][x] = s[0]
 
+
 def draw_head(canvas):
     canvas.put('-', 5, 2)
     canvas.put('-', 6, 2)
@@ -42,6 +43,7 @@ def draw_head(canvas):
     canvas.put('-', 6, 4)
     canvas.put('-', 7, 4)
 
+
 def draw_gallows(canvas):
     for i in range(12):
         canvas.put('X', 0, i)
@@ -49,56 +51,131 @@ def draw_gallows(canvas):
         canvas.put('X', i, 0)
     canvas.put('X', 6, 1)
 
+
 def draw_body(canvas):
     for i in range(5, 9, 1):
         canvas.put('X', 6, i)
 
+
 def draw_right_arm(canvas):
     for i in range(3, 7):
         canvas.put('\\', i - 1, i)
 
+
 def draw_left_arm(canvas):
     canvas.put('/', 10, 3)
     canvas.put('/', 9, 4)
     canvas.put('/', 8, 5)
     canvas.put('/', 7, 6)
 
+
 def draw_right_leg(canvas):
     canvas.put('/', 5, 9)
     canvas.put('/', 4, 10)
 
+
 def draw_left_leg(canvas):
     canvas.put('\\', 7, 9)
     canvas.put('\\', 8, 10)
 
+
 def draw_left_hand(canvas):
     canvas.put('\\', 10, 2)
 
+
 def draw_right_hand(canvas):
     canvas.put('/', 2, 2)
 
+
 def draw_left_foot(canvas):
     canvas.put('\\', 9, 11)
     canvas.put('-', 10, 11)
 
+
 def draw_right_foot(canvas):
     canvas.put('-', 2, 11)
     canvas.put('/', 3, 11)
 
+
+PHASES = (
+    ("FIRST, WE DRAW A HEAD", draw_head),
+    ("NOW WE DRAW A BODY.", draw_body),
+    ("NEXT WE DRAW AN ARM.", draw_right_arm),
+    ("THIS TIME IT'S THE OTHER ARM.", draw_left_arm),
+    ("NOW, LET'S DRAW THE RIGHT LEG.", draw_right_leg),
+    ("THIS TIME WE DRAW THE LEFT LEG.", draw_left_leg),
+    ("NOW WE PUT UP A HAND.", draw_left_hand),
+    ("NEXT THE OTHER HAND.", draw_right_hand),
+    ("NOW WE DRAW ONE FOOT", draw_left_foot),
+    ("HERE'S THE OTHER FOOT -- YOU'RE HUNG!!", draw_right_foot)
+)
+
+WORDS = ('GUM','SIN','FOR','CRY','LUG','BYE','FLY',
+         'UGLY','EACH','FROM','WORK','TALK','WITH','SELF',
+         'PIZZA','THING','FEIGN','FIEND','ELBOW','FAULT','DIRTY',
+         'BUDGET','SPIRIT','QUAINT','MAIDEN','ESCORT','PICKAX',
+         'EXAMPLE','TENSION','QUININE','KIDNEY','REPLICA','SLEEPER',
+         'TRIANGLE','KANGAROO','MAHOGANY','SERGEANT','SEQUENCE',
+         'MOUSTACHE','DANGEROUS','SCIENTIST','DIFFERENT','QUIESCENT',
+         'MAGISTRATE','ERRONEOUSLY','LOUDSPEAKER','PHYTOTOXIC',
+         'MATRIMONIAL','PARASYMPATHOMIMETIC','THIGMOTROPISM')
+
+QUESTION_PROMPT = '? '
+
+
+def revealed_word(word, letters_used):
+    return ''.join(letter if letter in letters_used else '-'
+                  for letter in word)
+
+
 def play():
+
+    print('HANGMAN')
+    print('CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n\n\n')
+
     canvas = Canvas()
     draw_gallows(canvas)
-    draw_head(canvas)
-    draw_body(canvas)
-    draw_right_arm(canvas)
-    draw_left_arm(canvas)
-    draw_right_leg(canvas)
-    draw_left_leg(canvas)
-    draw_left_hand(canvas)
-    draw_right_hand(canvas)
-    draw_left_foot(canvas)
-    draw_right_foot(canvas)
-    canvas.draw()
+
+    word = random.choice(WORDS)
+    letters_used = set()
+    guesses_count = 0
+
+    while True:
+        print('HERE ARE THE LETTERS YOU USED:')
+        print(', '.join(sorted(letters_used)))
+        print('\n')
+
+        print(revealed_word(word, letters_used))
+
+        print('WHAT IS YOUR GUESS', end=QUESTION_PROMPT)
+        guess = input().upper()
+
+        if guess in letters_used:
+            print('YOU GUESSED THAT LETTER BEFORE!')
+            continue
+
+        if guess not in word:
+            comment, draw_function = PHASES[guesses_count]
+            print('\n\nSORRY, THAT LETTER ISN\'T IN THE WORD.')
+            print(comment)
+            draw_function(canvas)
+            canvas.draw()
+
+            guesses_count += 1
+            if guesses_count == len(PHASES):
+               print('SORRY, YOU LOSE.  THE WORD WAS', word)
+               break
+
+        letters_used.add(guess)
+        print('\n' + revealed_word(word, letters_used))
+
+        print('\nWHAT IS YOUR GUESS FOR THE WORD', end=QUESTION_PROMPT)
+        guessed_word = input().upper()
+
+        if guessed_word != word:
+            print('WRONG.  TRY ANOTHER LETTER.')
+            continue
+
 
 if __name__ == '__main__':
     play()

From 4f328bc936301c24bf62007ef5bbb1b0b6248151 Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Thu, 18 Feb 2021 13:39:13 -0500
Subject: [PATCH 15/33] Multiple Rounds

---
 44 Hangman/python/hangman.py | 98 +++++++++++++++++++++++-------------
 1 file changed, 64 insertions(+), 34 deletions(-)

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
index 4b10da18..0387e267 100755
--- a/44 Hangman/python/hangman.py	
+++ b/44 Hangman/python/hangman.py	
@@ -19,11 +19,13 @@ class Canvas:
             for x in range(len(row)):
                 row[x] = fill
 
-    def draw(self):
+    def render(self):
+        lines = []
         for line  in self._buffer:
             # Joining by the empty string ('') smooshes all of the
             # individual characters together as one line.
-            print(''.join(line))
+            lines.append(''.join(line))
+        return '\n'.join(lines)
 
     def put(self, s, x, y):
         # In an effort to avoid distorting the drawn image, only write the
@@ -133,48 +135,76 @@ def play():
     print('HANGMAN')
     print('CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n\n\n')
 
-    canvas = Canvas()
-    draw_gallows(canvas)
-
-    word = random.choice(WORDS)
-    letters_used = set()
-    guesses_count = 0
-
+    words_available = set(WORDS)
     while True:
-        print('HERE ARE THE LETTERS YOU USED:')
-        print(', '.join(sorted(letters_used)))
-        print('\n')
 
-        print(revealed_word(word, letters_used))
+        if len(words_available) == 0:
+            print('YOU DID ALL THE WORDS!!')
+            break
 
-        print('WHAT IS YOUR GUESS', end=QUESTION_PROMPT)
-        guess = input().upper()
+        # Initize game state for this round
+        canvas = Canvas()
+        draw_gallows(canvas)
 
-        if guess in letters_used:
-            print('YOU GUESSED THAT LETTER BEFORE!')
-            continue
+        word = random.choice(list(words_available))
+        letters_used = set()
+        guesses_count = 0
+        fail_count = 0
 
-        if guess not in word:
-            comment, draw_function = PHASES[guesses_count]
-            print('\n\nSORRY, THAT LETTER ISN\'T IN THE WORD.')
-            print(comment)
-            draw_function(canvas)
-            canvas.draw()
+        while True:
+            print('HERE ARE THE LETTERS YOU USED:')
+            print(', '.join(sorted(letters_used)))
+            print('\n')
+
+            print(revealed_word(word, letters_used))
+            print('\n')
+
+            print('WHAT IS YOUR GUESS', end=QUESTION_PROMPT)
+            guess = input().upper()
+
+            if guess in letters_used:
+                print('YOU GUESSED THAT LETTER BEFORE!')
+                continue
 
             guesses_count += 1
-            if guesses_count == len(PHASES):
-               print('SORRY, YOU LOSE.  THE WORD WAS', word)
-               break
 
-        letters_used.add(guess)
-        print('\n' + revealed_word(word, letters_used))
+            if guess not in word:
+                comment, draw_function = PHASES[fail_count]
+                print('\n\nSORRY, THAT LETTER ISN\'T IN THE WORD.')
+                print(comment)
+                draw_function(canvas)
+                print(canvas.render())
 
-        print('\nWHAT IS YOUR GUESS FOR THE WORD', end=QUESTION_PROMPT)
-        guessed_word = input().upper()
+                fail_count += 1
+                if fail_count == len(PHASES):
+                   print('SORRY, YOU LOSE.  THE WORD WAS', word)
+                   print('YOU MISSED THAT ONE.  DO YOU', end=' ')
+                   break
 
-        if guessed_word != word:
-            print('WRONG.  TRY ANOTHER LETTER.')
-            continue
+            letters_used.add(guess)
+            if '-' not in revealed_word(word, letters_used):
+                print("YOU FOUND THE WORD!")
+                words_available.remove(word)
+                break
+            else:
+                print('\n' + revealed_word(word, letters_used))
+                print('\n\nWHAT IS YOUR GUESS FOR THE WORD', end=QUESTION_PROMPT)
+                guessed_word = input().upper()
+
+                if guessed_word != word:
+                    print('WRONG.  TRY ANOTHER LETTER.\n')
+                    continue
+
+                print('RIGHT!!  IT TOOK YOU {} GUESSES!'.format(guesses_count))
+                words_available.remove(word)
+                break
+
+        print('WANT ANOTHER WORD', end=QUESTION_PROMPT)
+        reply = input().upper()
+        if reply != 'YES':
+            break
+
+    print('\nIT\'S BEEN FUN!  BYE FOR NOW.')
 
 
 if __name__ == '__main__':

From 332616a098d4dd871726098d1609e97c837b8a28 Mon Sep 17 00:00:00 2001
From: Gustavo Carreno 
Date: Thu, 18 Feb 2021 22:27:25 +0000
Subject: [PATCH 16/33] Add link to Pascal/Object Pascal implementation

As discussed on Issue #15
---
 01 Acey Ducey/README.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/01 Acey Ducey/README.md b/01 Acey Ducey/README.md
index ad0bdbad..11c6b1a8 100644
--- a/01 Acey Ducey/README.md	
+++ b/01 Acey Ducey/README.md	
@@ -5,3 +5,7 @@ https://www.atariarchives.org/basicgames/showpage.php?page=2
 
 Downloaded from Vintage Basic at
 http://www.vintage-basic.net/games.html
+
+#### Other languages:
+
+- [Pascal/Object Pascal](https://github.com/gcarreno/basic-computer-games-in-pascal/tree/main/01%20Acey%20Ducey)
\ No newline at end of file

From 63089af5ab282b7de809ed6a12a04828bfcb31e6 Mon Sep 17 00:00:00 2001
From: Tim <70119791+journich@users.noreply.github.com>
Date: Fri, 19 Feb 2021 10:00:54 +1030
Subject: [PATCH 17/33] Java version of Chief

---
 25 Chief/java/Chief.iml          |  11 ++
 25 Chief/java/src/Chief.java     | 196 +++++++++++++++++++++++++++++++
 25 Chief/java/src/ChiefGame.java |   8 ++
 3 files changed, 215 insertions(+)
 create mode 100644 25 Chief/java/Chief.iml
 create mode 100644 25 Chief/java/src/Chief.java
 create mode 100644 25 Chief/java/src/ChiefGame.java

diff --git a/25 Chief/java/Chief.iml b/25 Chief/java/Chief.iml
new file mode 100644
index 00000000..c90834f2
--- /dev/null
+++ b/25 Chief/java/Chief.iml	
@@ -0,0 +1,11 @@
+
+
+  
+    
+    
+      
+    
+    
+    
+  
+
\ No newline at end of file
diff --git a/25 Chief/java/src/Chief.java b/25 Chief/java/src/Chief.java
new file mode 100644
index 00000000..d7fbbc08
--- /dev/null
+++ b/25 Chief/java/src/Chief.java	
@@ -0,0 +1,196 @@
+import java.util.Arrays;
+import java.util.Scanner;
+
+public class Chief {
+
+    private enum GAME_STATE {
+        STARTING,
+        READY_TO_START,
+        ENTER_NUMBER,
+        CALCULATE_AND_SHOW,
+        END_GAME,
+        GAME_OVER
+    }
+
+    private GAME_STATE gameState;
+
+    private double calculatedNumber;
+
+    // Used for keyboard input
+    private final Scanner kbScanner;
+
+    public Chief() {
+
+        gameState = GAME_STATE.STARTING;
+
+        // Initialise kb scanner
+        kbScanner = new Scanner(System.in);
+    }
+
+    /**
+     * Main game loop
+     */
+    public void play() {
+
+        do {
+            switch (gameState) {
+
+                // Show an introduction the first time the game is played.
+                case STARTING:
+                    intro();
+                    gameState = GAME_STATE.READY_TO_START;
+                    break;
+
+                // show an message to start
+                case READY_TO_START:
+                    if(!yesEntered(displayTextAndGetInput("ARE YOU READY TO TAKE THE TEST YOU CALLED ME OUT FOR? "))) {
+                        System.out.println("SHUT UP, PALE FACE WITH WISE TONGUE.");
+                    }
+
+                    instructions();
+                    gameState = GAME_STATE.ENTER_NUMBER;
+                    break;
+
+                // Enter the number to be used to calculate
+                case ENTER_NUMBER:
+                    double playerNumber = Double.parseDouble(
+                            displayTextAndGetInput(" WHAT DO YOU HAVE? "));
+
+                    // Exact same formula used in the original game to calculate the players original number
+                    this.calculatedNumber = (playerNumber +1-5)*5/8*5-3;
+
+                    this.gameState = GAME_STATE.CALCULATE_AND_SHOW;
+                    break;
+
+                // Enter the number to be used to calculate
+                case CALCULATE_AND_SHOW:
+                    if(yesEntered(
+                            displayTextAndGetInput("I BET YOUR NUMBER WAS " + this.calculatedNumber
+                            + ". AM I RIGHT? "))) {
+                        this.gameState = GAME_STATE.END_GAME;
+
+                    } else {
+                        // Player did not agree, so show the breakdown
+                        double number = Double.parseDouble(
+                                displayTextAndGetInput(" WHAT WAS YOUR ORIGINAL NUMBER? "));
+                        double f = number + 3;
+                        double g = f / 5;
+                        double h = g * 8;
+                        double i = h/5 + 5;
+                        double j = i -1;
+                        System.out.println("SO YOU THINK YOU'RE SO SMART, EH?");
+                        System.out.println("NOW WATCH.");
+                        System.out.println(number +" PLUS 3 EQUALS " + f +  ". THIS DIVIDED BY 5 EQUALS " + g);
+                        System.out.println("THIS TIMES 8 EQUALS " + h + ". IF WE DIVIDE BY 5 AND ADD 5,");
+                        System.out.println("WE GET " + i + ", WHICH, MINUS 1, EQUALS " + j + ".");
+                        if(yesEntered(displayTextAndGetInput("NOW DO YOU BELIEVE ME? "))) {
+                            this.gameState = GAME_STATE.END_GAME;
+                        } else {
+                            // Time for a lightning bolt.
+                            System.out.println("YOU HAVE MADE ME MAD!!!");
+                            System.out.println("THERE MUST BE A GREAT LIGHTNING BOLT!");
+                            System.out.println();
+                            for(int x=30; x>=22; x--) {
+                                System.out.println(tabbedSpaces(x) + "X X");
+                            }
+                            System.out.println(tabbedSpaces(21) + "X XXX");
+                            System.out.println(tabbedSpaces(20) + "X   X");
+                            System.out.println(tabbedSpaces(19) + "XX X");
+                            for(int y=20; y>=13; y--) {
+                                System.out.println(tabbedSpaces(y) + "X X");
+                            }
+                            System.out.println(tabbedSpaces(12) + "XX");
+                            System.out.println(tabbedSpaces(11) + "X");
+                            System.out.println(tabbedSpaces(10) + "*");
+                            System.out.println();
+                            System.out.println("#########################");
+                            System.out.println();
+                            System.out.println("I HOPE YOU BELIEVE ME NOW, FOR YOUR SAKE!!");
+                            this.gameState = GAME_STATE.GAME_OVER;
+                        }
+
+                    }
+                    break;
+
+                // Sign off message for cases where the Chief is not upset
+                case END_GAME:
+                    System.out.println("BYE!!!");
+                    this.gameState = GAME_STATE.GAME_OVER;
+                    break;
+
+                // GAME_OVER State does not specifically have a case
+            }
+        } while (gameState != GAME_STATE.GAME_OVER);
+    }
+
+    /**
+     * Simulate tabs by building up a string of spaces
+     *
+     * @param spaces how many spaces are there to be
+     * @return a string with the requested number of spaces
+     */
+    private String tabbedSpaces(int spaces) {
+        char[] repeat = new char[spaces];
+        Arrays.fill(repeat, ' ');
+        return new String(repeat);
+    }
+    private void instructions() {
+        System.out.println(" TAKE A NUMBER AND ADD 3. DIVIDE THIS NUMBER BY 5 AND");
+        System.out.println("MULTIPLY BY 8. DIVIDE BY 5 AND ADD THE SAME. SUBTRACT 1.");
+    }
+
+    /**
+     * Basic information about the game
+     *
+     */
+    private void intro() {
+        System.out.println("CHIEF");
+        System.out.println("CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY");
+        System.out.println();
+        System.out.println("I AM CHIEF NUMBERS FREEK, THE GREAT INDIAN MATH GOD.");
+    }
+
+    /**
+     * Returns true if a given string is equal to at least one of the values specified in the call
+     * to the stringIsAnyValue method
+     *
+     * @param text string to search
+     * @return true if string is equal to one of the varargs
+     */
+    private boolean yesEntered(String text) {
+        return stringIsAnyValue(text, "Y", "YES");
+    }
+
+    /**
+     * Returns true if a given string contains at least one of the varargs (2nd parameter).
+     * Note: Case insensitive comparison.
+     *
+     * @param text string to search
+     * @param values varargs of type string containing values to compare
+     * @return true if one of the varargs arguments was found in text
+     */
+    private boolean stringIsAnyValue(String text, String... values) {
+
+        // Cycle through the variable number of values and test each
+        for(String val:values) {
+            if(text.equalsIgnoreCase(val)) {
+                return true;
+            }
+        }
+
+        // no matches
+        return false;
+    }
+
+    /*
+     * Print a message on the screen, then accept input from Keyboard.
+     *
+     * @param text message to be displayed on screen.
+     * @return what was typed by the player.
+     */
+    private String displayTextAndGetInput(String text) {
+        System.out.print(text);
+        return kbScanner.next();
+    }
+
+}
\ No newline at end of file
diff --git a/25 Chief/java/src/ChiefGame.java b/25 Chief/java/src/ChiefGame.java
new file mode 100644
index 00000000..25ebc1bc
--- /dev/null
+++ b/25 Chief/java/src/ChiefGame.java	
@@ -0,0 +1,8 @@
+public class ChiefGame {
+
+    public static void main(String[] args) {
+
+        Chief chief = new Chief();
+        chief.play();
+    }
+}
\ No newline at end of file

From 7d572ef00ab0630c2dbbf22b0c0f11a80f9f5b97 Mon Sep 17 00:00:00 2001
From: Mark Dellacca 
Date: Thu, 18 Feb 2021 15:45:44 -0800
Subject: [PATCH 18/33] C# animal

---
 03 Animal/csharp/Animal.csproj |   8 ++
 03 Animal/csharp/Animal.sln    |  25 ++++++
 03 Animal/csharp/Branch.cs     |  18 ++++
 03 Animal/csharp/Program.cs    | 152 +++++++++++++++++++++++++++++++++
 4 files changed, 203 insertions(+)
 create mode 100644 03 Animal/csharp/Animal.csproj
 create mode 100644 03 Animal/csharp/Animal.sln
 create mode 100644 03 Animal/csharp/Branch.cs
 create mode 100644 03 Animal/csharp/Program.cs

diff --git a/03 Animal/csharp/Animal.csproj b/03 Animal/csharp/Animal.csproj
new file mode 100644
index 00000000..20827042
--- /dev/null
+++ b/03 Animal/csharp/Animal.csproj	
@@ -0,0 +1,8 @@
+
+
+  
+    Exe
+    net5.0
+  
+
+
diff --git a/03 Animal/csharp/Animal.sln b/03 Animal/csharp/Animal.sln
new file mode 100644
index 00000000..1d81e643
--- /dev/null
+++ b/03 Animal/csharp/Animal.sln	
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30907.101
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Animal", "Animal.csproj", "{D9A8DAB5-1B29-44A9-B13F-CED17B5A22B9}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{D9A8DAB5-1B29-44A9-B13F-CED17B5A22B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D9A8DAB5-1B29-44A9-B13F-CED17B5A22B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D9A8DAB5-1B29-44A9-B13F-CED17B5A22B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D9A8DAB5-1B29-44A9-B13F-CED17B5A22B9}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {064879D3-A288-4980-8DC4-59653D5EE2DD}
+	EndGlobalSection
+EndGlobal
diff --git a/03 Animal/csharp/Branch.cs b/03 Animal/csharp/Branch.cs
new file mode 100644
index 00000000..52c13037
--- /dev/null
+++ b/03 Animal/csharp/Branch.cs	
@@ -0,0 +1,18 @@
+namespace Animal
+{
+    public class Branch
+    {
+        public string Text { get; set; }
+
+        public bool IsEnd => Yes == null && No == null;
+
+        public Branch Yes { get; set; }
+
+        public Branch No { get; set; }
+
+        public override string ToString()
+        {
+            return $"{Text} : IsEnd {IsEnd}";
+        }
+    }
+}
\ No newline at end of file
diff --git a/03 Animal/csharp/Program.cs b/03 Animal/csharp/Program.cs
new file mode 100644
index 00000000..0d159724
--- /dev/null
+++ b/03 Animal/csharp/Program.cs	
@@ -0,0 +1,152 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using Animal;
+
+Console.WriteLine(new string(' ', 32) + "ANIMAL");
+Console.WriteLine(new string(' ', 15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY");
+Console.WriteLine();
+Console.WriteLine();
+Console.WriteLine();
+Console.WriteLine("PLAY 'GUESS THE ANIMAL'");
+Console.WriteLine();
+Console.WriteLine("THINK OF AN ANIMAL AND THE COMPUTER WILL TRY TO GUESS IT.");
+Console.WriteLine();
+
+// Root of the question and answer tree
+Branch rootBranch = new Branch
+{
+    Text = "DOES IT SWIM",
+    Yes = new Branch { Text = "FISH" },
+    No = new Branch { Text = "BIRD" }
+};
+
+string[] TRUE_INPUTS = { "Y", "YES", "T", "TRUE" };
+string[] FALSE_INPUTS = { "N", "NO", "F", "FALSE" };
+
+
+while (true)
+{
+    MainGameLoop();
+}
+
+void MainGameLoop()
+{
+    // Wait fora YES or LIST command
+    string input = null;
+    while (true)
+    {
+        input = GetInput("ARE YOU THINKING OF AN ANIMAL");
+        if (IsInputListCommand(input))
+        {
+            ListKnownAnimals(rootBranch);
+        }
+        else if (IsInputYes(input))
+        {
+            break;
+        }
+    }
+
+    // Walk through the tree following the YES and NO
+    // branches based on user input.
+    Branch currentBranch = rootBranch;
+    while (!currentBranch.IsEnd)
+    {
+        while (true)
+        {
+            input = GetInput(currentBranch.Text);
+            if (IsInputYes(input))
+            {
+                currentBranch = currentBranch.Yes;
+                break;
+            }
+            else if (IsInputNo(input))
+            {
+                currentBranch = currentBranch.No;
+                break;
+            }
+        }
+    }
+
+    // Was the answer correct?
+    input = GetInput($"IS IT A {currentBranch.Text}");
+    if (IsInputYes(input))
+    {
+        Console.WriteLine("WHY NOT TRY ANOTHER ANIMAL?");
+        return;
+    }
+
+    // Interview the user to add a new question and answer
+    // branch to the tree
+    string newAnimal = GetInput("THE ANIMAL YOU WERE THINKING OF WAS A");
+    string newQuestion = GetInput($"PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A {newAnimal} FROM A {currentBranch.Text}");
+    string newAnswer = null;
+    while (true)
+    {
+        newAnswer = GetInput($"FOR A {newAnimal} THE ANSWER WOULD BE");
+        if (IsInputNo(newAnswer))
+        {
+            currentBranch.No = new Branch { Text = newAnimal };
+            currentBranch.Yes = new Branch { Text = currentBranch.Text };
+            currentBranch.Text = newQuestion;
+            break;
+        }
+        else if (IsInputYes(newAnswer))
+        {
+            currentBranch.Yes = new Branch { Text = newAnimal };
+            currentBranch.No = new Branch { Text = currentBranch.Text };
+            currentBranch.Text = newQuestion;
+            break;
+        }
+    }
+}
+
+string GetInput(string prompt)
+{
+    Console.Write($"{prompt}? ");
+    string result = Console.ReadLine();
+    if (string.IsNullOrWhiteSpace(result))
+    {
+        return GetInput(prompt);
+    }
+
+    return result.Trim().ToUpper();
+}
+
+bool IsInputYes(string input) => TRUE_INPUTS.Contains(input.ToUpperInvariant().Trim());
+
+bool IsInputNo(string input) => FALSE_INPUTS.Contains(input.ToUpperInvariant().Trim());
+
+bool IsInputListCommand(string input) => input.ToUpperInvariant().Trim() == "LIST";
+
+string[] GetKnownAnimals(Branch branch)
+{
+    List result = new List();
+    if (branch.IsEnd)
+    {
+        return new[] { branch.Text };
+    }
+    else
+    {
+        result.AddRange(GetKnownAnimals(branch.Yes));
+        result.AddRange(GetKnownAnimals(branch.No));
+        return result.ToArray();
+    }
+}
+
+void ListKnownAnimals(Branch branch)
+{
+    string[] animals = GetKnownAnimals(branch);
+    for (int x = 0; x < animals.Length; x++)
+    {
+        int column = (x % 4);
+        if (column == 0)
+        {
+            Console.WriteLine();
+        }
+
+        Console.Write(new string(' ', column == 0 ? 0 : 15) + animals[x]);
+    }
+    Console.WriteLine();
+}

From 889b5e02c17b00438afde2a7da6dbafcbb87dac3 Mon Sep 17 00:00:00 2001
From: Tim <70119791+journich@users.noreply.github.com>
Date: Fri, 19 Feb 2021 14:56:57 +1030
Subject: [PATCH 19/33] Java version of Pizza

---
 69 Pizza/java/Pizza.iml          |  11 ++
 69 Pizza/java/src/Pizza.java     | 308 +++++++++++++++++++++++++++++++
 69 Pizza/java/src/PizzaGame.java |   8 +
 3 files changed, 327 insertions(+)
 create mode 100644 69 Pizza/java/Pizza.iml
 create mode 100644 69 Pizza/java/src/Pizza.java
 create mode 100644 69 Pizza/java/src/PizzaGame.java

diff --git a/69 Pizza/java/Pizza.iml b/69 Pizza/java/Pizza.iml
new file mode 100644
index 00000000..c90834f2
--- /dev/null
+++ b/69 Pizza/java/Pizza.iml	
@@ -0,0 +1,11 @@
+
+
+  
+    
+    
+      
+    
+    
+    
+  
+
\ No newline at end of file
diff --git a/69 Pizza/java/src/Pizza.java b/69 Pizza/java/src/Pizza.java
new file mode 100644
index 00000000..f7e68f0e
--- /dev/null
+++ b/69 Pizza/java/src/Pizza.java	
@@ -0,0 +1,308 @@
+import java.util.Scanner;
+
+public class Pizza {
+
+    private final int MAX_DELIVERIES = 5;
+
+    private enum GAME_STATE {
+        STARTING,
+        ENTER_NAME,
+        DRAW_MAP,
+        MORE_DIRECTIONS,
+        START_DELIVER,
+        DELIVER_PIZZA,
+        TOO_DIFFICULT,
+        END_GAME,
+        GAME_OVER
+    }
+
+    // houses that can order pizza
+    private final char[] houses = new char[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
+            'J', 'K', 'L', 'M', 'N', 'O', 'P'};
+
+    // size of grid
+    private final int[] gridPos = new int[] { 1, 2, 3, 4};
+
+    private GAME_STATE gameState;
+
+    private String playerName;
+
+    // How many pizzas have been successfully delivered
+    private int pizzaDeliveryCount;
+
+    // current house that ordered a pizza
+    private int currentHouseDelivery;
+
+    // Used for keyboard input
+    private final Scanner kbScanner;
+
+    public Pizza() {
+
+        this.gameState = GAME_STATE.STARTING;
+
+        // Initialise kb scanner
+        kbScanner = new Scanner(System.in);
+    }
+
+    /**
+     * Main game loop
+     */
+    public void play() {
+
+        do {
+            switch (this.gameState) {
+
+                // Show an introduction the first time the game is played.
+                case STARTING:
+                    init();
+                    intro();
+                    this.gameState = GAME_STATE.ENTER_NAME;
+                    break;
+
+                // Enter the players name
+                case ENTER_NAME:
+                    this.playerName = displayTextAndGetInput("WHAT IS YOUR FIRST NAME? ");
+                    System.out.println("HI " + this.playerName + ". IN THIS GAME YOU ARE TO TAKE ORDERS");
+                    System.out.println("FOR PIZZAS.  THEN YOU ARE TO TELL A DELIVERY BOY");
+                    System.out.println("WHERE TO DELIVER THE ORDERED PIZZAS.");
+                    System.out.println();
+                    this.gameState = GAME_STATE.DRAW_MAP;
+                    break;
+
+                // Draw the map
+                case DRAW_MAP:
+                    drawMap();
+                    this.gameState = GAME_STATE.MORE_DIRECTIONS;
+                    break;
+
+                // need more directions (how to play) ?
+                case MORE_DIRECTIONS:
+                    extendedIntro();
+                    String moreInfo = displayTextAndGetInput("DO YOU NEED MORE DIRECTIONS? ");
+                    if(!yesOrNoEntered(moreInfo)) {
+                        System.out.println("'YES' OR 'NO' PLEASE, NOW THEN,");
+                    } else {
+                        // More instructions selected
+                        if(yesEntered(moreInfo)) {
+                            displayMoreDirections();
+                            // Player understand now?
+                            if (yesEntered(displayTextAndGetInput("UNDERSTAND? "))) {
+                                System.out.println("GOOD.  YOU ARE NOW READY TO START TAKING ORDERS.");
+                                System.out.println();
+                                System.out.println("GOOD LUCK!!");
+                                System.out.println();
+                                this.gameState = GAME_STATE.START_DELIVER;
+                            } else {
+                                // Not understood, essentially game over
+                                this.gameState = GAME_STATE.TOO_DIFFICULT;
+                            }
+                        } else {
+                            // no more directions were needed, start delivering pizza
+                            this.gameState = GAME_STATE.START_DELIVER;
+                        }
+                    }
+
+                   break;
+
+                // Too difficult to understand, game over!
+                case TOO_DIFFICULT:
+                    System.out.println("THIS JOB IS DEFINITELY TOO DIFFICULT FOR YOU. THANKS ANYWAY");
+                    this.gameState = GAME_STATE.GAME_OVER;
+                    break;
+
+                // Delivering pizza
+                case START_DELIVER:
+                    // select a random house and "order" a pizza for them.
+                    this.currentHouseDelivery = (int) (Math.random()
+                            * (this.houses.length) + 1) -1; // Deduct 1 for 0-based array
+
+                    System.out.println("HELLO " + this.playerName + "'S PIZZA.  THIS IS "
+                            + this.houses[this.currentHouseDelivery] + ".");
+                    System.out.println("  PLEASE SEND A PIZZA.");
+                    this.gameState = GAME_STATE.DELIVER_PIZZA;
+                    break;
+
+                // Try and deliver the pizza
+                case DELIVER_PIZZA:
+
+                    String question = "  DRIVER TO " + this.playerName + ":  WHERE DOES "
+                            + this.houses[this.currentHouseDelivery] + " LIVE ? ";
+                    String answer = displayTextAndGetInput(question);
+
+                    // Convert x,y entered by player to grid position of a house
+                    int x = getDelimitedValue(answer, 0);
+                    int y = getDelimitedValue(answer, 1);
+                    int calculatedPos = (x + (y -1) * 4) -1;
+
+                    // Did the player select the right house to deliver?
+                    if(calculatedPos == this.currentHouseDelivery) {
+                        System.out.println("HELLO " + this.playerName + ".  THIS IS " + this.houses[this.currentHouseDelivery]
+                                + ", THANKS FOR THE PIZZA.");
+                        this.pizzaDeliveryCount++;
+
+                        // Delivered enough pizza?
+
+                        if(this.pizzaDeliveryCount > MAX_DELIVERIES) {
+                            this.gameState = GAME_STATE.END_GAME;
+                        } else {
+                            this.gameState = GAME_STATE.START_DELIVER;
+                        }
+                    } else {
+                        System.out.println("THIS IS " + houses[calculatedPos] + ".  I DID NOT ORDER A PIZZA.");
+                        System.out.println("I LIVE AT " + x + "," + y);
+                        // Don't change gameState so this state is executed again
+                    }
+
+                    break;
+
+                // Sign off message for cases where the Chief is not upset
+                case END_GAME:
+                    if(yesEntered(displayTextAndGetInput("DO YOU WANT TO DELIVER MORE PIZZAS? "))) {
+                        init();
+                        this.gameState = GAME_STATE.START_DELIVER;
+                    } else {
+                        System.out.println();
+                        System.out.println("O.K. " + this.playerName + ", SEE YOU LATER!");
+                        System.out.println();
+                        this.gameState = GAME_STATE.GAME_OVER;
+                    }
+                    break;
+
+                // GAME_OVER State does not specifically have a case
+            }
+        } while (this.gameState != GAME_STATE.GAME_OVER);
+    }
+
+    private void drawMap() {
+
+        System.out.println("MAP OF THE CITY OF HYATTSVILLE");
+        System.out.println();
+        System.out.println(" -----1-----2-----3-----4-----");
+        int k = 3;
+        for(int i=1; i<5; i++) {
+            System.out.println("-");
+            System.out.println("-");
+            System.out.println("-");
+            System.out.println("-");
+
+            System.out.print(this.gridPos[k]);
+            int pos = 16 - 4 * i;
+            System.out.print("     " + this.houses[pos]);
+            System.out.print("     " + this.houses[pos + 1]);
+            System.out.print("     " + this.houses[pos + 2]);
+            System.out.print("     " + this.houses[pos + 3]);
+            System.out.println("     " + this.gridPos[k]);
+            k = k - 1;
+        }
+        System.out.println("-");
+        System.out.println("-");
+        System.out.println("-");
+        System.out.println("-");
+        System.out.println(" -----1-----2-----3-----4-----");
+}
+    /**
+     * Basic information about the game
+     *
+     */
+    private void intro() {
+        System.out.println("PIZZA");
+        System.out.println("CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY");
+        System.out.println();
+        System.out.println();
+        System.out.println("PIZZA DELIVERY GAME");
+        System.out.println();
+    }
+
+    private void extendedIntro() {
+        System.out.println("THE OUTPUT IS A MAP OF THE HOMES WHERE");
+        System.out.println("YOU ARE TO SEND PIZZAS.");
+        System.out.println();
+        System.out.println("YOUR JOB IS TO GIVE A TRUCK DRIVER");
+        System.out.println("THE LOCATION OR COORDINATES OF THE");
+        System.out.println("HOME ORDERING THE PIZZA.");
+        System.out.println();
+    }
+
+    private void displayMoreDirections() {
+        System.out.println();
+        System.out.println("SOMEBODY WILL ASK FOR A PIZZA TO BE");
+        System.out.println("DELIVERED.  THEN A DELIVERY BOY WILL");
+        System.out.println("ASK YOU FOR THE LOCATION.");
+        System.out.println("     EXAMPLE:");
+        System.out.println("THIS IS J.  PLEASE SEND A PIZZA.");
+        System.out.println("DRIVER TO " + this.playerName + ".  WHERE DOES J LIVE?");
+        System.out.println("YOUR ANSWER WOULD BE 2,3");
+        System.out.println();
+    }
+
+    private void init() {
+        this.pizzaDeliveryCount = 1;
+    }
+
+    /**
+     * Accepts a string delimited by comma's and returns the nth delimited
+     * value (starting at count 0).
+     *
+     * @param text - text with values separated by comma's
+     * @param pos  - which position to return a value for
+     * @return the int representation of the value
+     */
+    private int getDelimitedValue(String text, int pos) {
+        String[] tokens = text.split(",");
+        return Integer.parseInt(tokens[pos]);
+    }
+
+    /**
+     * Returns true if a given string is equal to at least one of the values specified in the call
+     * to the stringIsAnyValue method
+     *
+     * @param text string to search
+     * @return true if string is equal to one of the varargs
+     */
+    private boolean yesEntered(String text) {
+        return stringIsAnyValue(text, "Y", "YES");
+    }
+
+    /**
+     * returns true if Y, YES, N, or NO was the compared value in text
+     * case-insensitive
+     *
+     * @param text search string
+     * @return true if one of the varargs was found in text
+     */
+    private boolean yesOrNoEntered(String text) {
+        return stringIsAnyValue(text, "Y", "YES", "N", "NO");
+    }
+    /**
+     * Returns true if a given string contains at least one of the varargs (2nd parameter).
+     * Note: Case insensitive comparison.
+     *
+     * @param text string to search
+     * @param values varargs of type string containing values to compare
+     * @return true if one of the varargs arguments was found in text
+     */
+    private boolean stringIsAnyValue(String text, String... values) {
+
+        // Cycle through the variable number of values and test each
+        for(String val:values) {
+            if(text.equalsIgnoreCase(val)) {
+                return true;
+            }
+        }
+
+        // no matches
+        return false;
+    }
+
+    /*
+     * Print a message on the screen, then accept input from Keyboard.
+     *
+     * @param text message to be displayed on screen.
+     * @return what was typed by the player.
+     */
+    private String displayTextAndGetInput(String text) {
+        System.out.print(text);
+        return kbScanner.next();
+    }
+
+}
\ No newline at end of file
diff --git a/69 Pizza/java/src/PizzaGame.java b/69 Pizza/java/src/PizzaGame.java
new file mode 100644
index 00000000..2a94afc9
--- /dev/null
+++ b/69 Pizza/java/src/PizzaGame.java	
@@ -0,0 +1,8 @@
+public class PizzaGame {
+
+    public static void main(String[] args) {
+
+            Pizza pizza = new Pizza();
+            pizza.play();
+    }
+}

From dc7ee5ad54a30c920b3ae046505e85c45ff1f104 Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Thu, 18 Feb 2021 23:34:27 -0500
Subject: [PATCH 20/33] Make all variable names snake_case for consistency

---
 44 Hangman/python/hangman.py | 76 ++++++++++++++++++------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
index 2b42a121..f1edcd85 100755
--- a/44 Hangman/python/hangman.py	
+++ b/44 Hangman/python/hangman.py	
@@ -132,61 +132,61 @@ words = ["GUM", "SIN", "FOR", "CRY", "LUG", "BYE", "FLY",
          "MATRIMONIAL", "PARASYMPATHOMIMETIC", "THIGMOTROPISM"]
 
 
-def play_game(guessTarget):
+def play_game(guess_target):
     """Play the game"""
-    guessWrong = 0
-    guessProgress = ["-"] * len(guessTarget)
-    guessList = []
+    guess_wrong = 0
+    guess_progress = ["-"] * len(guess_target)
+    guess_list = []
 
     gallows = Canvas()
     draw_gallows(gallows)
 
-    guessCount = 0
+    guess_count = 0
     while True:
         print("Here are the letters you used:")
-        print(",".join(guessList) + "\n")
-        print("".join(guessProgress) + "\n")
-        guessLetter = ""
-        guessWord = ""
-        while guessLetter == "":
-            guessLetter = input("What is your guess? ").upper()[0]
-            if not guessLetter.isalpha():
-                guessLetter = ""
+        print(",".join(guess_list) + "\n")
+        print("".join(guess_progress) + "\n")
+        guess_letter = ""
+        guess_word = ""
+        while guess_letter == "":
+            guess_letter = input("What is your guess? ").upper()[0]
+            if not guess_letter.isalpha():
+                guess_letter = ""
                 print("Only letters are allowed!")
-            elif guessLetter in guessList:
-                guessLetter = ""
+            elif guess_letter in guess_list:
+                guess_letter = ""
                 print("You guessed that letter before!")
-        guessList.append(guessLetter)
-        guessCount = guessCount + 1
-        if guessLetter in guessTarget:
-            indices = [i for i, letter in enumerate(guessTarget) if letter == guessLetter]
+        guess_list.append(guess_letter)
+        guess_count = guess_count + 1
+        if guess_letter in guess_target:
+            indices = [i for i, letter in enumerate(guess_target) if letter == guess_letter]
             for i in indices:
-                guessProgress[i] = guessLetter
-            if guessProgress == guessTarget:
+                guess_progress[i] = guess_letter
+            if guess_progress == guess_target:
                 print("You found the word!")
                 break
             else:
-                print("\n" + "".join(guessProgress) + "\n")
-                while guessWord == "":
-                    guessWord = input("What is your guess for the word? ").upper()
-                    if not guessWord.isalpha():
-                        guessWord = ""
+                print("\n" + "".join(guess_progress) + "\n")
+                while guess_word == "":
+                    guess_word = input("What is your guess for the word? ").upper()
+                    if not guess_word.isalpha():
+                        guess_word = ""
                         print("Only words are allowed!")
-                if guessWord == guessTarget:
-                    print("Right!! It took you", guessCount, "guesses!")
+                if guess_word == guess_target:
+                    print("Right!! It took you", guess_count, "guesses!")
                     break
         else:
-            comment, drawingBodyPart = PHASES[guessWrong]
+            comment, draw_bodypart = PHASES[guess_wrong]
 
             print(comment)
-            drawingBodyPart(gallows)
+            draw_bodypart(gallows)
             print(gallows.render())
 
-            guessWrong = guessWrong + 1
+            guess_wrong = guess_wrong + 1
             print("Sorry, that letter isn't in the word.")
 
-            if guessWrong == 10:
-                print("Sorry, you lose. The word was " + guessTarget)
+            if guess_wrong == 10:
+                print("Sorry, you lose. The word was " + guess_target)
                 break
 
 
@@ -194,14 +194,14 @@ def main():
     """Main"""
 
     random.shuffle(words)
-    wordCurrent = 0
-    wordCount = 49
+    word_current = 0
+    word_count = 49
 
     keep_playing = True
     while keep_playing:
-        play_game(words[wordCurrent])
-        wordCurrent = wordCurrent + 1
-        if wordCurrent >= wordCount:
+        play_game(words[word_current])
+        word_current = word_current + 1
+        if word_current >= word_count:
             print("You did all the words!!")
             keep_playing = False
         else:

From a4c4bd0ea1def9b839df447f65ae361e414da0c8 Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Thu, 18 Feb 2021 23:45:19 -0500
Subject: [PATCH 21/33] Clarify variable names and simplify some expressions

---
 44 Hangman/python/hangman.py | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
index f1edcd85..abf0b3ba 100755
--- a/44 Hangman/python/hangman.py	
+++ b/44 Hangman/python/hangman.py	
@@ -134,7 +134,7 @@ words = ["GUM", "SIN", "FOR", "CRY", "LUG", "BYE", "FLY",
 
 def play_game(guess_target):
     """Play the game"""
-    guess_wrong = 0
+    wrong_guesses = 0
     guess_progress = ["-"] * len(guess_target)
     guess_list = []
 
@@ -149,6 +149,7 @@ def play_game(guess_target):
         guess_letter = ""
         guess_word = ""
         while guess_letter == "":
+
             guess_letter = input("What is your guess? ").upper()[0]
             if not guess_letter.isalpha():
                 guess_letter = ""
@@ -156,8 +157,9 @@ def play_game(guess_target):
             elif guess_letter in guess_list:
                 guess_letter = ""
                 print("You guessed that letter before!")
+
         guess_list.append(guess_letter)
-        guess_count = guess_count + 1
+        guess_count += 1
         if guess_letter in guess_target:
             indices = [i for i, letter in enumerate(guess_target) if letter == guess_letter]
             for i in indices:
@@ -176,36 +178,38 @@ def play_game(guess_target):
                     print("Right!! It took you", guess_count, "guesses!")
                     break
         else:
-            comment, draw_bodypart = PHASES[guess_wrong]
+            comment, draw_bodypart = PHASES[wrong_guesses]
 
             print(comment)
             draw_bodypart(gallows)
             print(gallows.render())
 
-            guess_wrong = guess_wrong + 1
+            wrong_guesses += 1
             print("Sorry, that letter isn't in the word.")
 
-            if guess_wrong == 10:
+            if wrong_guesses == 10:
                 print("Sorry, you lose. The word was " + guess_target)
                 break
 
 
 def main():
-    """Main"""
 
     random.shuffle(words)
-    word_current = 0
-    word_count = 49
+    current_word = 0
+    word_count = len(words)
 
     keep_playing = True
     while keep_playing:
-        play_game(words[word_current])
-        word_current = word_current + 1
-        if word_current >= word_count:
+
+        play_game(words[current_word])
+        current_word += 1
+
+        if current_word == word_count:
             print("You did all the words!!")
             keep_playing = False
         else:
             keep_playing = input("Want another word? (yes or no) ").lower().startswith("y")
+
     print("It's been fun! Bye for now.")
 
 

From bbf9a1a61239e9594208c73acf3431e354fbef97 Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Thu, 18 Feb 2021 23:50:48 -0500
Subject: [PATCH 22/33] USe doublequotes througout for consistency with merge
 target

---
 44 Hangman/python/hangman.py | 72 ++++++++++++++++++------------------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
index abf0b3ba..4a2417df 100755
--- a/44 Hangman/python/hangman.py	
+++ b/44 Hangman/python/hangman.py	
@@ -7,19 +7,19 @@ import random
 
 
 class Canvas:
-    ''' For drawing text-based figures '''
+    """ For drawing text-based figures """
 
-    def __init__(self, width=12, height=12, fill=' '):
+    def __init__(self, width=12, height=12, fill=" "):
         self._buffer = []
         for _ in range(height):
             line = []
             for _ in range(width):
-                line.append('')
+                line.append("")
             self._buffer.append(line)
 
         self.clear()
 
-    def clear(self, fill=' '):
+    def clear(self, fill=" "):
         for row in self._buffer:
             for x in range(len(row)):
                 row[x] = fill
@@ -27,10 +27,10 @@ class Canvas:
     def render(self):
         lines = []
         for line  in self._buffer:
-            # Joining by the empty string ('') smooshes all of the
+            # Joining by the empty string ("") smooshes all of the
             # individual characters together as one line.
-            lines.append(''.join(line))
-        return '\n'.join(lines)
+            lines.append("".join(line))
+        return "\n".join(lines)
 
     def put(self, s, x, y):
         # In an effort to avoid distorting the drawn image, only write the
@@ -40,68 +40,68 @@ class Canvas:
 
 def draw_gallows(canvas):
     for i in range(12):
-        canvas.put('X', 0, i)
+        canvas.put("X", 0, i)
     for i in range(7):
-        canvas.put('X', i, 0)
-    canvas.put('X', 6, 1)
+        canvas.put("X", i, 0)
+    canvas.put("X", 6, 1)
 
 
 def draw_head(canvas):
-    canvas.put('-', 5, 2)
-    canvas.put('-', 6, 2)
-    canvas.put('-', 7, 2)
-    canvas.put('(', 4, 3)
-    canvas.put('.', 5, 3)
-    canvas.put('.', 7, 3)
-    canvas.put(')', 8, 3)
-    canvas.put('-', 5, 4)
-    canvas.put('-', 6, 4)
-    canvas.put('-', 7, 4)
+    canvas.put("-", 5, 2)
+    canvas.put("-", 6, 2)
+    canvas.put("-", 7, 2)
+    canvas.put("(", 4, 3)
+    canvas.put(".", 5, 3)
+    canvas.put(".", 7, 3)
+    canvas.put(")", 8, 3)
+    canvas.put("-", 5, 4)
+    canvas.put("-", 6, 4)
+    canvas.put("-", 7, 4)
 
 
 def draw_body(canvas):
     for i in range(5, 9, 1):
-        canvas.put('X', 6, i)
+        canvas.put("X", 6, i)
 
 
 def draw_right_arm(canvas):
     for i in range(3, 7):
-        canvas.put('\\', i - 1, i)
+        canvas.put("\\", i - 1, i)
 
 
 def draw_left_arm(canvas):
-    canvas.put('/', 10, 3)
-    canvas.put('/', 9, 4)
-    canvas.put('/', 8, 5)
-    canvas.put('/', 7, 6)
+    canvas.put("/", 10, 3)
+    canvas.put("/", 9, 4)
+    canvas.put("/", 8, 5)
+    canvas.put("/", 7, 6)
 
 
 def draw_right_leg(canvas):
-    canvas.put('/', 5, 9)
-    canvas.put('/', 4, 10)
+    canvas.put("/", 5, 9)
+    canvas.put("/", 4, 10)
 
 
 def draw_left_leg(canvas):
-    canvas.put('\\', 7, 9)
-    canvas.put('\\', 8, 10)
+    canvas.put("\\", 7, 9)
+    canvas.put("\\", 8, 10)
 
 
 def draw_left_hand(canvas):
-    canvas.put('\\', 10, 2)
+    canvas.put("\\", 10, 2)
 
 
 def draw_right_hand(canvas):
-    canvas.put('/', 2, 2)
+    canvas.put("/", 2, 2)
 
 
 def draw_left_foot(canvas):
-    canvas.put('\\', 9, 11)
-    canvas.put('-', 10, 11)
+    canvas.put("\\", 9, 11)
+    canvas.put("-", 10, 11)
 
 
 def draw_right_foot(canvas):
-    canvas.put('-', 2, 11)
-    canvas.put('/', 3, 11)
+    canvas.put("-", 2, 11)
+    canvas.put("/", 3, 11)
 
 
 PHASES = (

From 4b58da2dd7de2ccf1b0e00c3404cd20bebcd59fe Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Thu, 18 Feb 2021 23:52:58 -0500
Subject: [PATCH 23/33] Move display of title into main function

---
 44 Hangman/python/hangman.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
index 4a2417df..76e36a32 100755
--- a/44 Hangman/python/hangman.py	
+++ b/44 Hangman/python/hangman.py	
@@ -118,9 +118,6 @@ PHASES = (
 )
 
 
-print(" " * 32 + "HANGMAN")
-print(" " * 15 + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n")
-
 words = ["GUM", "SIN", "FOR", "CRY", "LUG", "BYE", "FLY",
          "UGLY", "EACH", "FROM", "WORK", "TALK", "WITH", "SELF",
          "PIZZA", "THING", "FEIGN", "FIEND", "ELBOW", "FAULT", "DIRTY",
@@ -133,7 +130,7 @@ words = ["GUM", "SIN", "FOR", "CRY", "LUG", "BYE", "FLY",
 
 
 def play_game(guess_target):
-    """Play the game"""
+    """Play one round of the game"""
     wrong_guesses = 0
     guess_progress = ["-"] * len(guess_target)
     guess_list = []
@@ -193,6 +190,8 @@ def play_game(guess_target):
 
 
 def main():
+    print(" " * 32 + "HANGMAN")
+    print(" " * 15 + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n")
 
     random.shuffle(words)
     current_word = 0

From 73c3e328264de63239f7e6651e90df2603461ba3 Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Thu, 18 Feb 2021 23:54:53 -0500
Subject: [PATCH 24/33] Slightly better name for draw_gallows

---
 44 Hangman/python/hangman.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
index 76e36a32..a639ba78 100755
--- a/44 Hangman/python/hangman.py	
+++ b/44 Hangman/python/hangman.py	
@@ -38,7 +38,7 @@ class Canvas:
         self._buffer[y][x] = s[0]
 
 
-def draw_gallows(canvas):
+def init_gallows(canvas):
     for i in range(12):
         canvas.put("X", 0, i)
     for i in range(7):
@@ -136,7 +136,7 @@ def play_game(guess_target):
     guess_list = []
 
     gallows = Canvas()
-    draw_gallows(gallows)
+    init_gallows(gallows)
 
     guess_count = 0
     while True:

From 19674b89c782ed3bcf6de503aca620af1290ff62 Mon Sep 17 00:00:00 2001
From: Daniel Piron 
Date: Thu, 18 Feb 2021 23:55:53 -0500
Subject: [PATCH 25/33] Add newline to end of file

---
 44 Hangman/python/hangman.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/44 Hangman/python/hangman.py b/44 Hangman/python/hangman.py
index a639ba78..e883bf01 100755
--- a/44 Hangman/python/hangman.py	
+++ b/44 Hangman/python/hangman.py	
@@ -214,3 +214,4 @@ def main():
 
 if __name__ == "__main__":
     main()
+

From 0a412ff585e7e374b02db3f89467c1aecde9d894 Mon Sep 17 00:00:00 2001
From: Tim <70119791+journich@users.noreply.github.com>
Date: Fri, 19 Feb 2021 20:08:51 +1030
Subject: [PATCH 26/33] Java version of Stars

---
 82 Stars/java/Stars.iml          |  11 ++
 82 Stars/java/src/Stars.java     | 242 +++++++++++++++++++++++++++++++
 82 Stars/java/src/StarsGame.java |   9 ++
 3 files changed, 262 insertions(+)
 create mode 100644 82 Stars/java/Stars.iml
 create mode 100644 82 Stars/java/src/Stars.java
 create mode 100644 82 Stars/java/src/StarsGame.java

diff --git a/82 Stars/java/Stars.iml b/82 Stars/java/Stars.iml
new file mode 100644
index 00000000..c90834f2
--- /dev/null
+++ b/82 Stars/java/Stars.iml	
@@ -0,0 +1,11 @@
+
+
+  
+    
+    
+      
+    
+    
+    
+  
+
\ No newline at end of file
diff --git a/82 Stars/java/src/Stars.java b/82 Stars/java/src/Stars.java
new file mode 100644
index 00000000..f28a0510
--- /dev/null
+++ b/82 Stars/java/src/Stars.java	
@@ -0,0 +1,242 @@
+import java.util.Arrays;
+import java.util.Scanner;
+
+/**
+ * Game of Stars
+ *
+ * Based on the Basic game of Stars here
+ * https://github.com/coding-horror/basic-computer-games/blob/main/82%20Stars/stars.bas
+ *
+ * Note:  The idea was to create a version of this 1970's Basic game in Java, without introducing
+ *        new features - no additional text, error checking, etc has been added.
+ */
+public class Stars {
+
+    public static final int HIGH_NUMBER_RANGE = 100;
+    public static final int MAX_GUESSES = 7;
+
+    private enum GAME_STATE {
+        STARTING,
+        INSTRUCTIONS,
+        START_GAME,
+        GUESSING,
+        WON,
+        LOST,
+        GAME_OVER
+    }
+
+    // Used for keyboard input
+    private final Scanner kbScanner;
+
+    // Current game state
+    private GAME_STATE gameState;
+
+    // Players guess count;
+    private int playerTotalGuesses;
+
+    // Players current guess
+    private int playerCurrentGuess;
+
+    // Computers random number
+    private int computersNumber;
+
+    public Stars() {
+
+        this.gameState = GAME_STATE.STARTING;
+
+        // Initialise kb scanner
+        kbScanner = new Scanner(System.in);
+    }
+
+    /**
+     * Main game loop
+     *
+     */
+    public void play() {
+
+        do {
+            switch (gameState) {
+
+                // Show an introduction the first time the game is played.
+                case STARTING:
+                    intro();
+                    gameState = GAME_STATE.INSTRUCTIONS;
+                    break;
+
+                // Ask if instructions are needed and display if yes
+                case INSTRUCTIONS:
+                    if(yesEntered(displayTextAndGetInput("DO YOU WANT INSTRUCTIONS? "))) {
+                        instructions();
+                    }
+                    this.gameState = GAME_STATE.START_GAME;
+                    break;
+
+                // Generate computers number for player to guess, etc.
+                case START_GAME:
+                    init();
+                    System.out.println("OK, I AM THINKING OF A NUMBER, START GUESSING.");
+                    this.gameState = GAME_STATE.GUESSING;
+                    break;
+
+                // Player guesses the number until they get it or run out of guesses
+                case GUESSING:
+                    this.playerCurrentGuess = playerGuess();
+
+                    // Check if the player guessed the number
+                    if(this.playerCurrentGuess == this.computersNumber) {
+                        this.gameState = GAME_STATE.WON;
+                    } else {
+                        // incorrect guess
+                        showStars();
+                        this.playerTotalGuesses++;
+                        // Ran out of guesses?
+                        if (this.playerTotalGuesses > MAX_GUESSES) {
+                            this.gameState = GAME_STATE.LOST;
+                        }
+                    }
+                    break;
+
+                // Won game.
+                case WON:
+
+                    System.out.println(stars(79));
+                    System.out.println("YOU GOT IT IN " + this.playerTotalGuesses
+                            + " GUESSES!!!  LET'S PLAY AGAIN...");
+                    this.gameState = GAME_STATE.START_GAME;
+                    break;
+
+                // Lost game by running out of guesses
+                case LOST:
+                    System.out.println("SORRY, THAT'S " + MAX_GUESSES
+                            + " GUESSES. THE NUMBER WAS " + this.computersNumber);
+                    this.gameState = GAME_STATE.START_GAME;
+                    break;
+            }
+            // Endless loop since the original code did not allow the player to exit
+        } while (gameState != GAME_STATE.GAME_OVER);
+    }
+
+    /**
+     * Shows how close a players guess is to the computers number by
+     * showing a series of stars - the more stars the closer to the
+     * number.
+     *
+     */
+    private void showStars() {
+        int d = Math.abs(this.playerCurrentGuess - this.computersNumber);
+        int starsToShow;
+        if(d >=64) {
+            starsToShow = 1;
+        } else if(d >=32) {
+            starsToShow = 2;
+        } else if (d >= 16) {
+            starsToShow = 3;
+        } else if (d >=8) {
+            starsToShow = 4;
+        } else if( d>= 4) {
+            starsToShow = 5;
+        } else if(d>= 2) {
+            starsToShow = 6;
+        } else {
+            starsToShow = 7;
+        }
+        System.out.println(stars(starsToShow));
+    }
+
+    /**
+     * Show a number of stars (asterisks)
+     * @param number the number of stars needed
+     * @return the string encoded with the number of required stars
+     */
+    private String stars(int number) {
+        char[] stars = new char[number];
+        Arrays.fill(stars, '*');
+        return new String(stars);
+    }
+
+    /**
+     * Initialise variables before each new game
+     *
+     */
+    private void init() {
+        this.playerTotalGuesses = 1;
+        this.computersNumber = randomNumber();
+    }
+
+    public void instructions() {
+        System.out.println("I AM THINKING OF A WHOLE NUMBER FROM 1 TO " + HIGH_NUMBER_RANGE);
+        System.out.println("TRY TO GUESS MY NUMBER.  AFTER YOU GUESS, I");
+        System.out.println("WILL TYPE ONE OR MORE STARS (*).  THE MORE");
+        System.out.println("STARS I TYPE, THE CLOSER YOU ARE TO MY NUMBER.");
+        System.out.println("ONE STAR (*) MEANS FAR AWAY, SEVEN STARS (*******)");
+        System.out.println("MEANS REALLY CLOSE!  YOU GET " + MAX_GUESSES + " GUESSES.");
+    }
+
+    public void intro() {
+        System.out.println("STARS");
+        System.out.println("CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY");
+        System.out.println();
+    }
+
+    /**
+     * Get players guess from kb
+     *
+     * @return players guess as an int
+     */
+    private int playerGuess() {
+        return Integer.parseInt((displayTextAndGetInput("YOUR GUESS? ")));
+    }
+
+    /**
+     * Checks whether player entered Y or YES to a question.
+     *
+     * @param text  player string from kb
+     * @return true of Y or YES was entered, otherwise false
+     */
+    private boolean yesEntered(String text) {
+        return stringIsAnyValue(text, "Y", "YES");
+    }
+
+    /**
+     * Check whether a string equals one of a variable number of values
+     * Useful to check for Y or YES for example
+     * Comparison is case insensitive.
+     *
+     * @param text source string
+     * @param values a range of values to compare against the source string
+     * @return true if a comparison was found in one of the variable number of strings passed
+     */
+    private boolean stringIsAnyValue(String text, String... values) {
+
+        // Cycle through the variable number of values and test each
+        for(String val:values) {
+            if(text.equalsIgnoreCase(val)) {
+                return true;
+            }
+        }
+
+        // no matches
+        return false;
+    }
+
+    /*
+     * Print a message on the screen, then accept input from Keyboard.
+     *
+     * @param text message to be displayed on screen.
+     * @return what was typed by the player.
+     */
+    private String displayTextAndGetInput(String text) {
+        System.out.print(text);
+        return kbScanner.next();
+    }
+
+    /**
+     * Generate random number
+     *
+     * @return random number
+     */
+    private int randomNumber() {
+        return (int) (Math.random()
+                * (HIGH_NUMBER_RANGE) + 1);
+    }
+}
\ No newline at end of file
diff --git a/82 Stars/java/src/StarsGame.java b/82 Stars/java/src/StarsGame.java
new file mode 100644
index 00000000..4e1a9058
--- /dev/null
+++ b/82 Stars/java/src/StarsGame.java	
@@ -0,0 +1,9 @@
+import java.lang.reflect.AnnotatedType;
+
+public class StarsGame {
+
+    public static void main(String[] args) {
+        Stars stars = new Stars();
+        stars.play();
+    }
+}

From 6675a1d1c9fb96ed8250bc34f7085db3d34cf397 Mon Sep 17 00:00:00 2001
From: Trevor 
Date: Fri, 19 Feb 2021 21:46:28 +1000
Subject: [PATCH 27/33] Port Banner to Python

---
 06 Banner/python/banner.py | 123 +++++++++++++++++++++++++++++++++++++
 1 file changed, 123 insertions(+)
 create mode 100644 06 Banner/python/banner.py

diff --git a/06 Banner/python/banner.py b/06 Banner/python/banner.py
new file mode 100644
index 00000000..11f10766
--- /dev/null
+++ b/06 Banner/python/banner.py	
@@ -0,0 +1,123 @@
+#!/usr/bin/env python3
+
+# BANNER
+#
+# Converted from BASIC to Python by Trevor Hobson
+
+letters = {
+    " ": [0, 0, 0, 0, 0, 0, 0],
+    "A": [505, 37, 35, 34, 35, 37, 505],
+    "G": [125, 131, 258, 258, 290, 163, 101],
+    "E": [512, 274, 274, 274, 274, 258, 258],
+    "T": [2, 2, 2, 512, 2, 2, 2],
+    "W": [256, 257, 129, 65, 129, 257, 256],
+    "L": [512, 257, 257, 257, 257, 257, 257],
+    "S": [69, 139, 274, 274, 274, 163, 69],
+    "O": [125, 131, 258, 258, 258, 131, 125],
+    "N": [512, 7, 9, 17, 33, 193, 512],
+    "F": [512, 18, 18, 18, 18, 2, 2],
+    "K": [512, 17, 17, 41, 69, 131, 258],
+    "B": [512, 274, 274, 274, 274, 274, 239],
+    "D": [512, 258, 258, 258, 258, 131, 125],
+    "H": [512, 17, 17, 17, 17, 17, 512],
+    "M": [512, 7, 13, 25, 13, 7, 512],
+    "?": [5, 3, 2, 354, 18, 11, 5],
+    "U": [128, 129, 257, 257, 257, 129, 128],
+    "R": [512, 18, 18, 50, 82, 146, 271],
+    "P": [512, 18, 18, 18, 18, 18, 15],
+    "Q": [125, 131, 258, 258, 322, 131, 381],
+    "Y": [8, 9, 17, 481, 17, 9, 8],
+    "V": [64, 65, 129, 257, 129, 65, 64],
+    "X": [388, 69, 41, 17, 41, 69, 388],
+    "Z": [386, 322, 290, 274, 266, 262, 260],
+    "I": [258, 258, 258, 512, 258, 258, 258],
+    "C": [125, 131, 258, 258, 258, 131, 69],
+    "J": [65, 129, 257, 257, 257, 129, 128],
+    "1": [0, 0, 261, 259, 512, 257, 257],
+    "2": [261, 387, 322, 290, 274, 267, 261],
+    "*": [69, 41, 17, 512, 17, 41, 69],
+    "3": [66, 130, 258, 274, 266, 150, 100],
+    "4": [33, 49, 41, 37, 35, 512, 33],
+    "5": [160, 274, 274, 274, 274, 274, 226],
+    "6": [194, 291, 293, 297, 305, 289, 193],
+    "7": [258, 130, 66, 34, 18, 10, 8],
+    "8": [69, 171, 274, 274, 274, 171, 69],
+    "9": [263, 138, 74, 42, 26, 10, 7],
+    "=": [41, 41, 41, 41, 41, 41, 41],
+    "!": [1, 1, 1, 384, 1, 1, 1],
+    "0": [57, 69, 131, 258, 131, 69, 57],
+    ".": [1, 1, 129, 449, 129, 1, 1],
+}
+
+
+def print_banner():
+    """Print the banner"""
+
+    f = [0] * 7
+    j = [0] * 9
+
+    while True:
+        try:
+            x = int(input("Horizontal "))
+            if x < 1:
+                raise ValueError("Horizontal must be greater than zero")
+            break
+
+        except ValueError:
+            print("Please enter a number greater than zero")
+    while True:
+        try:
+            y = int(input("Vertical "))
+            if y < 1:
+                raise ValueError("Vertical must be greater than zero")
+            break
+
+        except ValueError:
+            print("Please enter a number greater than zero")
+    g1 = 0
+    if input("Centered ").lower().startswith("y"):
+        g1 = 1
+    mStr = input(
+        "Character (type 'ALL' if you want character being printed) ").upper()
+    aStr = input("Statement ")
+    # This means to prepare printer, just press Enter
+    oStr = input("Set page ")
+    for lStr in aStr:
+        s = letters[lStr].copy()
+        xStr = mStr
+        if mStr == "ALL":
+            xStr = lStr
+        if xStr == " ":
+            print("\n" * (7 * x))
+        else:
+            for u in range(0, 7):
+                for k in range(8, -1, -1):
+                    if 2 ** k >= s[u]:
+                        j[8 - k] = 0
+                    else:
+                        j[8 - k] = 1
+                        s[u] = s[u] - 2 ** k
+                        if s[u] == 1:
+                            f[u] = 8 - k
+                            break
+                for t1 in range(1, x + 1):
+                    lineStr = " " * int((63 - 4.5 * y) * g1 / len(xStr) + 1)
+                    for b in range(0, f[u] + 1):
+                        if j[b] == 0:
+                            for i in range(1, y + 1):
+                                lineStr = lineStr + " " * len(xStr)
+                        else:
+                            lineStr = lineStr + xStr * y
+                    print(lineStr)
+            print("\n" * (2 * x - 1))
+    # print("\n" * 75)  # Feed some more paper from the printer
+
+
+def main():
+    """Main"""
+
+    print_banner()
+
+
+if __name__ == "__main__":
+    main()

From 5fd2b64f9cb0965de5ee81deff89a0954c1685a7 Mon Sep 17 00:00:00 2001
From: nanochess 
Date: Fri, 19 Feb 2021 11:47:32 -0600
Subject: [PATCH 28/33] Ported BULLSEYE to Javascript

---
 18 Bullseye/bullseye.bas             |   2 +-
 18 Bullseye/javascript/bullseye.html |   9 ++
 18 Bullseye/javascript/bullseye.js   | 142 +++++++++++++++++++++++++++
 3 files changed, 152 insertions(+), 1 deletion(-)
 create mode 100644 18 Bullseye/javascript/bullseye.html
 create mode 100644 18 Bullseye/javascript/bullseye.js

diff --git a/18 Bullseye/bullseye.bas b/18 Bullseye/bullseye.bas
index 7a5e432f..eec7cf06 100644
--- a/18 Bullseye/bullseye.bas	
+++ b/18 Bullseye/bullseye.bas	
@@ -16,7 +16,7 @@
 150 R=R+1: PRINT: PRINT "ROUND";R:PRINT "---------"
 160 FOR I=1 TO N
 170 PRINT: PRINT A$(I)"'S THROW";: INPUT T
-180 IF T<0 OR T>3 THEN PRINT "INPUT 1, 2, OR 3!": GOTO 170
+180 IF T<1 OR T>3 THEN PRINT "INPUT 1, 2, OR 3!": GOTO 170
 190 ON T GOTO 200, 210, 200
 200 P1=.65: P2=.55: P3=.5: P4=.5: GOTO 230
 210 P1=.99: P2=.77: P3=.43: P4=.01: GOTO 230
diff --git a/18 Bullseye/javascript/bullseye.html b/18 Bullseye/javascript/bullseye.html
new file mode 100644
index 00000000..82f13306
--- /dev/null
+++ b/18 Bullseye/javascript/bullseye.html	
@@ -0,0 +1,9 @@
+
+
+BULLSEYE
+
+
+

+
+
+
diff --git a/18 Bullseye/javascript/bullseye.js b/18 Bullseye/javascript/bullseye.js
new file mode 100644
index 00000000..ca0e0d2d
--- /dev/null
+++ b/18 Bullseye/javascript/bullseye.js	
@@ -0,0 +1,142 @@
+// BULLSEYE
+//
+// Converted from BASIC to Javascript by Oscar Toledo G. (nanochess)
+//
+
+function print(str)
+{
+    document.getElementById("output").appendChild(document.createTextNode(str));
+}
+
+function input()
+{
+    var input_element;
+    var input_str;
+    
+    return new Promise(function (resolve) {
+                       input_element = document.createElement("INPUT");
+                       
+                       print("? ");
+                       input_element.setAttribute("type", "text");
+                       input_element.setAttribute("length", "50");
+                       document.getElementById("output").appendChild(input_element);
+                       input_element.focus();
+                       input_str = undefined;
+                       input_element.addEventListener("keydown", function (event) {
+                                                      if (event.keyCode == 13) {
+                                                      input_str = input_element.value;
+                                                      document.getElementById("output").removeChild(input_element);
+                                                      print(input_str);
+                                                      print("\n");
+                                                      resolve(input_str);
+                                                      }
+                                                      });
+                       });
+}
+
+function tab(space)
+{
+    var str = "";
+    while (space-- > 0)
+        str += " ";
+    return str;
+}
+
+var as = [];
+var s = [];
+var w = [];
+
+// Main program
+async function main()
+{
+	print(tab(32) + "BULLSEYE\n");
+	print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
+	print("\n");
+	print("\n");
+	print("\n");
+	print("IN THIS GAME, UP TO 20 PLAYERS THROW DARTS AT A TARGET\n");
+	print("WITH 10, 20, 30, AND 40 POINT ZONES.  THE OBJECTIVE IS\n");
+	print("TO GET 200 POINTS.\n");
+	print("\n");
+	print("THROW\t\tDESCRIPTION\t\tPROBABLE SCORE\n");
+	print("1\t\tFAST OVERARM\t\tBULLSEYE OR COMPLETE MISS\n");
+	print("2\t\tCONTROLLED OVERARM\t10, 20 OR 30 POINTS\n");
+	print("3\t\tUNDERARM\t\tANYTHING\n");
+	print("\n");
+	m = 0;
+	r = 0;
+	for (i = 1; i <= 20; i++)
+		s[i] = 0;
+	print("HOW MANY PLAYERS");
+	n = parseInt(await input());
+	print("\n");
+	for (i = 1; i <= n; i++) {
+		print("NAME OF PLAYER #" + i);
+		as[i] = await input();
+	}
+	do {
+	r++;
+	print("\n");
+	print("ROUND " + r + "\n");
+	print("---------\n");
+	for (i = 1; i <= n; i++) {
+		do {
+		print("\n");
+		print(as[i] + "'S THROW");
+		t = parseInt(await input());
+		if (t < 1 || t > 3)
+			print("INPUT 1, 2, OR 3!\n");
+		} while (t < 1 || t > 3) ;
+		if (t == 1) {
+			p1 = 0.65;
+			p2 = 0.55;
+			p3 = 0.5;
+			p4 = 0.5;
+		} else if (t == 2) {
+			p1 = 0.99;
+			p2 = 0.77;
+			p3 = 0.43;
+			p4 = 0.01;
+		} else {
+			p1 = 0.95;
+			p2 = 0.75;
+			p3 = 0.45;
+			p4 = 0.05;
+		}
+		u = Math.random();
+		if (u >= p1) {
+			print("BULLSEYE!!  40 POINTS!\n");
+			b = 40;
+		} else if (u >= p2) {
+			print("30-POINT ZONE!\n");
+			b = 30;
+		} else if (u >= p3) {
+			print("20-POINT ZONE\n");
+			b = 20;
+		} else if (u >= p4) {
+			print("WHEW!  10 POINT.\n");
+			b = 10;
+		} else {
+			print("MISSED THE TARGET!  TOO BAD.\n");
+			b = 0;
+		}
+		s[i] += b;
+		print("TOTAL SCORE = " + s[i] + "\n");
+	}
+	for (i = 1; i <= n; i++) {
+		if (s[i] >= 200) {
+			m++;
+			w[m] = i;
+		}
+	}
+	} while (m == 0) ;
+	print("\n");
+	print("WE HAVE A WINNER!!\n");
+	print("\n");
+	for (i = 1; i <= m; i++)
+		print(as[w[i]] + " SCORED " + s[w[i]] + " POINTS.\n");
+	print("\n");
+	print("THANKS FOR THE GAME.\n");
+}
+
+main();

From 50542df97e6678babf4dcac91953d4b088c947b3 Mon Sep 17 00:00:00 2001
From: nanochess 
Date: Fri, 19 Feb 2021 11:57:21 -0600
Subject: [PATCH 29/33] Ported BUZZWORD to Javascript

---
 18 Bullseye/javascript/bullseye.js   | 176 +++++++++++++--------------
 20 Buzzword/.DS_Store                | Bin 0 -> 6148 bytes
 20 Buzzword/buzzword.bas             |   2 +-
 20 Buzzword/javascript/buzzword.html |   9 ++
 20 Buzzword/javascript/buzzword.js   |  83 +++++++++++++
 5 files changed, 181 insertions(+), 89 deletions(-)
 create mode 100644 20 Buzzword/.DS_Store
 create mode 100644 20 Buzzword/javascript/buzzword.html
 create mode 100644 20 Buzzword/javascript/buzzword.js

diff --git a/18 Bullseye/javascript/bullseye.js b/18 Bullseye/javascript/bullseye.js
index ca0e0d2d..0b8d061c 100644
--- a/18 Bullseye/javascript/bullseye.js	
+++ b/18 Bullseye/javascript/bullseye.js	
@@ -49,94 +49,94 @@ var w = [];
 // Main program
 async function main()
 {
-	print(tab(32) + "BULLSEYE\n");
-	print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
-	print("\n");
-	print("\n");
-	print("\n");
-	print("IN THIS GAME, UP TO 20 PLAYERS THROW DARTS AT A TARGET\n");
-	print("WITH 10, 20, 30, AND 40 POINT ZONES.  THE OBJECTIVE IS\n");
-	print("TO GET 200 POINTS.\n");
-	print("\n");
-	print("THROW\t\tDESCRIPTION\t\tPROBABLE SCORE\n");
-	print("1\t\tFAST OVERARM\t\tBULLSEYE OR COMPLETE MISS\n");
-	print("2\t\tCONTROLLED OVERARM\t10, 20 OR 30 POINTS\n");
-	print("3\t\tUNDERARM\t\tANYTHING\n");
-	print("\n");
-	m = 0;
-	r = 0;
-	for (i = 1; i <= 20; i++)
-		s[i] = 0;
-	print("HOW MANY PLAYERS");
-	n = parseInt(await input());
-	print("\n");
-	for (i = 1; i <= n; i++) {
-		print("NAME OF PLAYER #" + i);
-		as[i] = await input();
-	}
-	do {
-	r++;
-	print("\n");
-	print("ROUND " + r + "\n");
-	print("---------\n");
-	for (i = 1; i <= n; i++) {
-		do {
-		print("\n");
-		print(as[i] + "'S THROW");
-		t = parseInt(await input());
-		if (t < 1 || t > 3)
-			print("INPUT 1, 2, OR 3!\n");
-		} while (t < 1 || t > 3) ;
-		if (t == 1) {
-			p1 = 0.65;
-			p2 = 0.55;
-			p3 = 0.5;
-			p4 = 0.5;
-		} else if (t == 2) {
-			p1 = 0.99;
-			p2 = 0.77;
-			p3 = 0.43;
-			p4 = 0.01;
-		} else {
-			p1 = 0.95;
-			p2 = 0.75;
-			p3 = 0.45;
-			p4 = 0.05;
-		}
-		u = Math.random();
-		if (u >= p1) {
-			print("BULLSEYE!!  40 POINTS!\n");
-			b = 40;
-		} else if (u >= p2) {
-			print("30-POINT ZONE!\n");
-			b = 30;
-		} else if (u >= p3) {
-			print("20-POINT ZONE\n");
-			b = 20;
-		} else if (u >= p4) {
-			print("WHEW!  10 POINT.\n");
-			b = 10;
-		} else {
-			print("MISSED THE TARGET!  TOO BAD.\n");
-			b = 0;
-		}
-		s[i] += b;
-		print("TOTAL SCORE = " + s[i] + "\n");
-	}
-	for (i = 1; i <= n; i++) {
-		if (s[i] >= 200) {
-			m++;
-			w[m] = i;
-		}
-	}
-	} while (m == 0) ;
-	print("\n");
-	print("WE HAVE A WINNER!!\n");
-	print("\n");
-	for (i = 1; i <= m; i++)
-		print(as[w[i]] + " SCORED " + s[w[i]] + " POINTS.\n");
-	print("\n");
-	print("THANKS FOR THE GAME.\n");
+    print(tab(32) + "BULLSEYE\n");
+    print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
+    print("\n");
+    print("\n");
+    print("\n");
+    print("IN THIS GAME, UP TO 20 PLAYERS THROW DARTS AT A TARGET\n");
+    print("WITH 10, 20, 30, AND 40 POINT ZONES.  THE OBJECTIVE IS\n");
+    print("TO GET 200 POINTS.\n");
+    print("\n");
+    print("THROW\t\tDESCRIPTION\t\tPROBABLE SCORE\n");
+    print("1\t\tFAST OVERARM\t\tBULLSEYE OR COMPLETE MISS\n");
+    print("2\t\tCONTROLLED OVERARM\t10, 20 OR 30 POINTS\n");
+    print("3\t\tUNDERARM\t\tANYTHING\n");
+    print("\n");
+    m = 0;
+    r = 0;
+    for (i = 1; i <= 20; i++)
+        s[i] = 0;
+    print("HOW MANY PLAYERS");
+    n = parseInt(await input());
+    print("\n");
+    for (i = 1; i <= n; i++) {
+        print("NAME OF PLAYER #" + i);
+        as[i] = await input();
+    }
+    do {
+        r++;
+        print("\n");
+        print("ROUND " + r + "\n");
+        print("---------\n");
+        for (i = 1; i <= n; i++) {
+            do {
+                print("\n");
+                print(as[i] + "'S THROW");
+                t = parseInt(await input());
+                if (t < 1 || t > 3)
+                    print("INPUT 1, 2, OR 3!\n");
+            } while (t < 1 || t > 3) ;
+            if (t == 1) {
+                p1 = 0.65;
+                p2 = 0.55;
+                p3 = 0.5;
+                p4 = 0.5;
+            } else if (t == 2) {
+                p1 = 0.99;
+                p2 = 0.77;
+                p3 = 0.43;
+                p4 = 0.01;
+            } else {
+                p1 = 0.95;
+                p2 = 0.75;
+                p3 = 0.45;
+                p4 = 0.05;
+            }
+            u = Math.random();
+            if (u >= p1) {
+                print("BULLSEYE!!  40 POINTS!\n");
+                b = 40;
+            } else if (u >= p2) {
+                print("30-POINT ZONE!\n");
+                b = 30;
+            } else if (u >= p3) {
+                print("20-POINT ZONE\n");
+                b = 20;
+            } else if (u >= p4) {
+                print("WHEW!  10 POINT.\n");
+                b = 10;
+            } else {
+                print("MISSED THE TARGET!  TOO BAD.\n");
+                b = 0;
+            }
+            s[i] += b;
+            print("TOTAL SCORE = " + s[i] + "\n");
+        }
+        for (i = 1; i <= n; i++) {
+            if (s[i] >= 200) {
+                m++;
+                w[m] = i;
+            }
+        }
+    } while (m == 0) ;
+    print("\n");
+    print("WE HAVE A WINNER!!\n");
+    print("\n");
+    for (i = 1; i <= m; i++)
+        print(as[w[i]] + " SCORED " + s[w[i]] + " POINTS.\n");
+    print("\n");
+    print("THANKS FOR THE GAME.\n");
 }
 
 main();
diff --git a/20 Buzzword/.DS_Store b/20 Buzzword/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6
GIT binary patch
literal 6148
zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3
zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ
zLs35+`xjp>T0
+
+BUZZWORD
+
+
+

+
+
+
diff --git a/20 Buzzword/javascript/buzzword.js b/20 Buzzword/javascript/buzzword.js
new file mode 100644
index 00000000..80c4e51e
--- /dev/null
+++ b/20 Buzzword/javascript/buzzword.js	
@@ -0,0 +1,83 @@
+// BUZZWORD
+//
+// Converted from BASIC to Javascript by Oscar Toledo G. (nanochess)
+//
+
+function print(str)
+{
+    document.getElementById("output").appendChild(document.createTextNode(str));
+}
+
+function input()
+{
+    var input_element;
+    var input_str;
+    
+    return new Promise(function (resolve) {
+                       input_element = document.createElement("INPUT");
+                       
+                       print("? ");
+                       input_element.setAttribute("type", "text");
+                       input_element.setAttribute("length", "50");
+                       document.getElementById("output").appendChild(input_element);
+                       input_element.focus();
+                       input_str = undefined;
+                       input_element.addEventListener("keydown", function (event) {
+                                                      if (event.keyCode == 13) {
+                                                      input_str = input_element.value;
+                                                      document.getElementById("output").removeChild(input_element);
+                                                      print(input_str);
+                                                      print("\n");
+                                                      resolve(input_str);
+                                                      }
+                                                      });
+                       });
+}
+
+function tab(space)
+{
+    var str = "";
+    while (space-- > 0)
+        str += " ";
+    return str;
+}
+
+var a = ["",
+         "ABILITY","BASAL","BEHAVIORAL","CHILD-CENTERED",
+         "DIFFERENTIATED","DISCOVERY","FLEXIBLE","HETEROGENEOUS",
+         "HOMOGENEOUS","MANIPULATIVE","MODULAR","TAVISTOCK",
+         "INDIVIDUALIZED","LEARNING","EVALUATIVE","OBJECTIVE",
+         "COGNITIVE","ENRICHMENT","SCHEDULING","HUMANISTIC",
+         "INTEGRATED","NON-GRADED","TRAINING","VERTICAL AGE",
+         "MOTIVATIONAL","CREATIVE","GROUPING","MODIFICATION",
+         "ACCOUNTABILITY","PROCESS","CORE CURRICULUM","ALGORITHM",
+         "PERFORMANCE","REINFORCEMENT","OPEN CLASSROOM","RESOURCE",
+         "STRUCTURE","FACILITY","ENVIRONMENT",
+         ];
+
+// Main program
+async function main()
+{
+    print(tab(26) + "BUZZWORD GENERATOR\n");
+    print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
+    print("\n");
+    print("\n");
+    print("\n");
+    print("THIS PROGRAM PRINTS HIGHLY ACCEPTABLE PHRASES IN\n");
+    print("'EDUCATOR-SPEAK' THAT YOU CAN WORK INTO REPORTS\n");
+    print("AND SPEECHES.  WHENEVER A QUESTION MARK IS PRINTED,\n");
+    print("TYPE A 'Y' FOR ANOTHER PHRASE OR 'N' TO QUIT.\n");
+    print("\n");
+    print("\n");
+    print("HERE'S THE FIRST PHRASE:\n");
+    do {
+        print(a[Math.floor(Math.random() * 13 + 1)] + " ");
+        print(a[Math.floor(Math.random() * 13 + 14)] + " ");
+        print(a[Math.floor(Math.random() * 13 + 27)] + "\n");
+        print("\n");
+        y = await input();
+    } while (y == "Y") ;
+    print("COME BACK WHEN YOU NEED HELP WITH ANOTHER REPORT!\n");
+}
+
+main();

From ad04aab3c2629d9c7374f1cdd909246e56a86591 Mon Sep 17 00:00:00 2001
From: nanochess 
Date: Fri, 19 Feb 2021 12:21:49 -0600
Subject: [PATCH 30/33] Ported CHANGE to Javascript

---
 22 Change/javascript/change.html |   9 +++
 22 Change/javascript/change.js   | 107 +++++++++++++++++++++++++++++++
 2 files changed, 116 insertions(+)
 create mode 100644 22 Change/javascript/change.html
 create mode 100644 22 Change/javascript/change.js

diff --git a/22 Change/javascript/change.html b/22 Change/javascript/change.html
new file mode 100644
index 00000000..0f1449b6
--- /dev/null
+++ b/22 Change/javascript/change.html	
@@ -0,0 +1,9 @@
+
+
+CHANGE
+
+
+

+
+
+
diff --git a/22 Change/javascript/change.js b/22 Change/javascript/change.js
new file mode 100644
index 00000000..7c25bcbd
--- /dev/null
+++ b/22 Change/javascript/change.js	
@@ -0,0 +1,107 @@
+// CHANGE
+//
+// Converted from BASIC to Javascript by Oscar Toledo G. (nanochess)
+//
+
+function print(str)
+{
+    document.getElementById("output").appendChild(document.createTextNode(str));
+}
+
+function input()
+{
+    var input_element;
+    var input_str;
+    
+    return new Promise(function (resolve) {
+                       input_element = document.createElement("INPUT");
+                       
+                       print("? ");
+                       input_element.setAttribute("type", "text");
+                       input_element.setAttribute("length", "50");
+                       document.getElementById("output").appendChild(input_element);
+                       input_element.focus();
+                       input_str = undefined;
+                       input_element.addEventListener("keydown", function (event) {
+                                                      if (event.keyCode == 13) {
+                                                      input_str = input_element.value;
+                                                      document.getElementById("output").removeChild(input_element);
+                                                      print(input_str);
+                                                      print("\n");
+                                                      resolve(input_str);
+                                                      }
+                                                      });
+                       });
+}
+
+function tab(space)
+{
+    var str = "";
+    while (space-- > 0)
+        str += " ";
+    return str;
+}
+
+// Main program
+async function main()
+{
+    print(tab(33) + "CHANGE\n");
+    print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
+    print("\n");
+    print("\n");
+    print("\n");
+    print("I, YOUR FRIENDLY MICROCOMPUTER, WILL DETERMINE\n");
+    print("THE CORRECT CHANGE FOR ITEMS COSTING UP TO $100.\n");
+    print("\n");
+    print("\n");
+    while (1) {
+        print("COST OF ITEM");
+        a = parseFloat(await input());
+        print("AMOUNT OF PAYMENT");
+        p = parseFloat(await input());
+        c = p - a;
+        m = c;
+        if (c == 0) {
+            print("CORRECT AMOUNT, THANK YOU.\n");
+        } else {
+            print("YOUR CHANGE, $" + c + "\n");
+            d = Math.floor(c / 10);
+            if (d)
+                print(d + " TEN DOLLAR BILL(S)\n");
+            c -= d * 10;
+            e = Math.floor(c / 5);
+            if (e)
+                print(e + " FIVE DOLLAR BILL(S)\n");
+            c -= e * 5;
+            f = Math.floor(c);
+            if (f)
+                print(f + " ONE DOLLAR BILL(S)\n");
+            c -= f;
+            c *= 100;
+            g = Math.floor(c / 50);
+            if (g)
+                print(g + " ONE HALF DOLLAR(S)\n");
+            c -= g * 50;
+            h = Math.floor(c / 25);
+            if (h)
+                print(h + " QUARTER(S)\n");
+            c -= h * 25;
+            i = Math.floor(c / 10);
+            if (i)
+                print(i + " DIME(S)\n");
+            c -= i * 10;
+            j = Math.floor(c / 5);
+            if (j)
+                print(j + " NICKEL(S)\n");
+            c -= j * 5;
+            k = Math.floor(c + 0.5);
+            if (k)
+                print(k + " PENNY(S)\n");
+            print("THANK YOU, COME AGAIN.\n");
+            print("\n");
+            print("\n");
+        }
+    }
+}
+
+main();

From 8bfd19e1079576a51d70f3dea30ebf96ece8152d Mon Sep 17 00:00:00 2001
From: nanochess 
Date: Fri, 19 Feb 2021 15:04:20 -0600
Subject: [PATCH 31/33] Ported CHECKERS, CHEMIST, and CHIEF to Javascript

---
 23 Checkers/.DS_Store                | Bin 0 -> 6148 bytes
 23 Checkers/javascript/checkers.html |   9 +
 23 Checkers/javascript/checkers.js   | 300 +++++++++++++++++++++++++++
 24 Chemist/javascript/chemist.html   |   9 +
 24 Chemist/javascript/chemist.js     |  82 ++++++++
 25 Chief/chief.bas                   |   2 +-
 25 Chief/javascript/chief.html       |   9 +
 25 Chief/javascript/chief.js         | 105 ++++++++++
 8 files changed, 515 insertions(+), 1 deletion(-)
 create mode 100644 23 Checkers/.DS_Store
 create mode 100644 23 Checkers/javascript/checkers.html
 create mode 100644 23 Checkers/javascript/checkers.js
 create mode 100644 24 Chemist/javascript/chemist.html
 create mode 100644 24 Chemist/javascript/chemist.js
 create mode 100644 25 Chief/javascript/chief.html
 create mode 100644 25 Chief/javascript/chief.js

diff --git a/23 Checkers/.DS_Store b/23 Checkers/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6
GIT binary patch
literal 6148
zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3
zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ
zLs35+`xjp>T0
+
+CHECKERS
+
+
+

+
+
+
diff --git a/23 Checkers/javascript/checkers.js b/23 Checkers/javascript/checkers.js
new file mode 100644
index 00000000..4d406e0e
--- /dev/null
+++ b/23 Checkers/javascript/checkers.js	
@@ -0,0 +1,300 @@
+// CHECKERS
+//
+// Converted from BASIC to Javascript by Oscar Toledo G. (nanochess)
+//
+
+function print(str)
+{
+    document.getElementById("output").appendChild(document.createTextNode(str));
+}
+
+function input()
+{
+    var input_element;
+    var input_str;
+    
+    return new Promise(function (resolve) {
+                       input_element = document.createElement("INPUT");
+                       
+                       print("? ");
+                       input_element.setAttribute("type", "text");
+                       input_element.setAttribute("length", "50");
+                       document.getElementById("output").appendChild(input_element);
+                       input_element.focus();
+                       input_str = undefined;
+                       input_element.addEventListener("keydown", function (event) {
+                                                      if (event.keyCode == 13) {
+                                                      input_str = input_element.value;
+                                                      document.getElementById("output").removeChild(input_element);
+                                                      print(input_str);
+                                                      print("\n");
+                                                      resolve(input_str);
+                                                      }
+                                                      });
+                       });
+}
+
+function tab(space)
+{
+    var str = "";
+    while (space-- > 0)
+        str += " ";
+    return str;
+}
+
+// x,y = origin square
+// a,b = movement direction
+function try_computer()
+{
+    u = x + a;
+    v = y + b;
+    if (u < 0 || u > 7 || v < 0 || v > 7)
+        return;
+    if (s[u][v] == 0) {
+        eval_move();
+        return;
+    }
+    if (s[u][v] < 0)	// Cannot jump over own pieces
+        return;
+    u += a;
+    u += b;
+    if (u < 0 || u > 7 || v < 0 || v > 7)
+        return;
+    if (s[u][v] == 0)
+        eval_move();
+}
+
+// x,y = origin square
+// u,v = target square
+function eval_move()
+{
+    if (v == 0 && s[x][y] == -1)
+        q += 2;
+    if (Math.abs(y - v) == 2)
+        q += 5;
+    if (y == 7)
+        q -= 2;
+    if (u == 0 || u == 7)
+        q++;
+    for (c = -1; c <= 1; c += 2) {
+        if (u + c < 0 || u + c > 7 || v + g < 0)
+            continue;
+        if (s[u + c][v + g] < 0) {	// Computer piece
+            q++;
+            continue;
+        }
+        if (u - c < 0 || u - c > 7 || v - g > 7)
+            continue;
+        if (s[u + c][v + g] > 0 && (s[u - c][v - g] == 0 || (u - c == x && v - g == y)))
+            q -= 2;
+    }
+    if (q > r[0]) {	// Best movement so far?
+        r[0] = q;	// Take note of score
+        r[1] = x;	// Origin square
+        r[2] = y;
+        r[3] = u;	// Target square
+        r[4] = v;
+    }
+    q = 0;
+}
+
+function more_captures() {
+    u = x + a;
+    v = y + b;
+    if (u < 0 || u > 7 || v < 0 || v > 7)
+        return;
+    if (s[u][v] == 0 && s[x + a / 2][y + b / 2] > 0)
+        eval_move();
+}
+
+var r = [-99, 0, 0, 0, 0];
+var s = [];
+
+for (x = 0; x <= 7; x++)
+    s[x] = [];
+    
+var g = -1;
+var data = [1, 0, 1, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, -1, 0, -1, 15];
+var p = 0;
+var q = 0;
+
+// Main program
+async function main()
+{
+    print(tab(32) + "CHECKERS\n");
+    print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
+    print("\n");
+    print("\n");
+    print("\n");
+    print("THIS IS THE GAME OF CHECKERS.  THE COMPUTER IS X,\n");
+    print("AND YOU ARE O.  THE COMPUTER WILL MOVE FIRST.\n");
+    print("SQUARES ARE REFERRED TO BY A COORDINATE SYSTEM.\n");
+    print("(0,0) IS THE LOWER LEFT CORNER\n");
+    print("(0,7) IS THE UPPER LEFT CORNER\n");
+    print("(7,0) IS THE LOWER RIGHT CORNER\n");
+    print("(7,7) IS THE UPPER RIGHT CORNER\n");
+    print("THE COMPUTER WILL TYPE '+TO' WHEN YOU HAVE ANOTHER\n");
+    print("JUMP.  TYPE TWO NEGATIVE NUMBERS IF YOU CANNOT JUMP.\n");
+    print("\n");
+    print("\n");
+    print("\n");
+    for (x = 0; x <= 7; x++) {
+        for (y = 0; y <= 7; y++) {
+            if (data[p] == 15)
+                p = 0;
+            s[x][y] = data[p];
+            p++;
+        }
+    }
+    while (1) {
+
+        // Search the board for the best movement
+        for (x = 0; x <= 7; x++) {
+            for (y = 0; y <= 7; y++) {
+                if (s[x][y] > -1)
+                    continue;
+                if (s[x][y] == -1) {	// Piece
+                    for (a = -1; a <= 1; a += 2) {
+                        b = g;	// Only advances
+                        try_computer();
+                    }
+                } else if (s[x][y] == -2) {	// King
+                    for (a = -1; a <= 1; a += 2) {
+                        for (b = -1; b <= 1; b += 2) {
+                            try_computer();
+                        }
+                    }
+                }
+            }
+        }
+        if (r[0] == -99) {
+            print("\n");
+            print("YOU WIN.\n");
+            break;
+        }
+        print("FROM " + r[1] + "," + r[2] + " TO " + r[3] + "," + r[4]);
+        r[0] = -99;
+        while (1) {
+            if (r[4] == 0) {	// Computer reaches the bottom
+                s[r[3]][r[4]] = -2;	// King
+                break;
+            }
+            s[r[3]][r[4]] = s[r[1]][r[2]];	// Move
+            s[r[1]][r[2]] = 0;
+            if (Math.abs(r[1] - r[3]) == 2) {
+                s[(r[1] + r[3]) / 2][(r[2] + r[4]) / 2] = 0;	// Capture
+                x = r[3];
+                y = r[4];
+                if (s[x][y] == -1) {
+                    b = -2;
+                    for (a = -2; a <= 2; a += 4) {
+                        more_captures();
+                    }
+                } else if (s[x][y] == -2) {
+                    for (a = -2; a <= 2; a += 4) {
+                        for (b = -2; b <= 2; b += 4) {
+                            more_captures();
+                        }
+                    }
+                }
+                if (r[0] != -99) {
+                    print(" TO " + r[3] + "," + r[4]);
+                    r[0] = -99;
+                    continue;
+                }
+            }
+            break;
+        }
+        print("\n");
+        print("\n");
+        print("\n");
+        for (y = 7; y >= 0; y--) {
+            str = "";
+            for (x = 0; x <= 7; x++) {
+                if (s[x][y] == 0)
+                    str += ".";
+                if (s[x][y] == 1)
+                    str += "O";
+                if (s[x][y] == -1)
+                    str += "X";
+                if (s[x][y] == -2)
+                    str += "X*";
+                if (s[x][y] == 2)
+                    str += "O*";
+                while (str.length % 5)
+                    str += " ";
+            }
+            print(str + "\n");
+            print("\n");
+        }
+        print("\n");
+        z = 0;
+        t = 0;
+        for (l = 0; l <= 7; l++) {
+            for (m = 0; m <= 7; m++) {
+                if (s[l][m] == 1 || s[l][m] == 2)
+                    z = 1;
+                if (s[l][m] == -1 || s[l][m] == -2)
+                    t = 1;
+            }
+        }
+        if (z != 1) {
+            print("\n");
+            print("I WIN.\n");
+            break;
+        }
+        if (t != 1) {
+            print("\n");
+            print("YOU WIN.\n");
+            break;
+        }
+        do {
+            print("FROM");
+            e = await input();
+            h = parseInt(e.substr(e.indexOf(",") + 1));
+            e = parseInt(e);
+            x = e;
+            y = h;
+        } while (s[x][y] <= 0) ;
+        do {
+            print("TO");
+            a = await input();
+            b = parseInt(a.substr(a.indexOf(",") + 1));
+            a = parseInt(a);
+            x = a;
+            y = b;
+            if (s[x][y] == 0 && Math.abs(a - e) <= 2 && Math.abs(a - e) == Math.abs(b - h))
+                break;
+            print("WHAT?\n");
+        } while (1) ;
+        i = 46;
+        do {
+            s[a][b] = s[e][h]
+            s[e][h] = 0;
+            if (Math.abs(e - a) != 2)
+                break;
+            s[(e + a) / 2][(h + b) / 2] = 0;
+            while (1) {
+                print("+TO");
+                a1 = await input();
+                b1 = parseInt(a1.substr(a1.indexOf(",") + 1));
+                a1 = parseInt(a1);
+                if (a1 < 0)
+                    break;
+                if (s[a1][b1] == 0 && Math.abs(a1 - a) == 2 && Math.abs(b1 - b) == 2)
+                    break;
+            }
+            if (a1 < 0)
+                break;
+            e = a;
+            h = b;
+            a = a1;
+            b = b1;
+            i += 15;
+        } while (1);
+        if (b == 7)	// Player reaches top
+            s[a][b] = 2;	// Convert to king
+    }
+}
+
+main();
diff --git a/24 Chemist/javascript/chemist.html b/24 Chemist/javascript/chemist.html
new file mode 100644
index 00000000..c65d7821
--- /dev/null
+++ b/24 Chemist/javascript/chemist.html	
@@ -0,0 +1,9 @@
+
+
+CHEMIST
+
+
+

+
+
+
diff --git a/24 Chemist/javascript/chemist.js b/24 Chemist/javascript/chemist.js
new file mode 100644
index 00000000..8d6aabf5
--- /dev/null
+++ b/24 Chemist/javascript/chemist.js	
@@ -0,0 +1,82 @@
+// CHEMIST
+//
+// Converted from BASIC to Javascript by Oscar Toledo G. (nanochess)
+//
+
+function print(str)
+{
+    document.getElementById("output").appendChild(document.createTextNode(str));
+}
+
+function input()
+{
+    var input_element;
+    var input_str;
+    
+    return new Promise(function (resolve) {
+                       input_element = document.createElement("INPUT");
+                       
+                       print("? ");
+                       input_element.setAttribute("type", "text");
+                       input_element.setAttribute("length", "50");
+                       document.getElementById("output").appendChild(input_element);
+                       input_element.focus();
+                       input_str = undefined;
+                       input_element.addEventListener("keydown", function (event) {
+                                                      if (event.keyCode == 13) {
+                                                      input_str = input_element.value;
+                                                      document.getElementById("output").removeChild(input_element);
+                                                      print(input_str);
+                                                      print("\n");
+                                                      resolve(input_str);
+                                                      }
+                                                      });
+                       });
+}
+
+function tab(space)
+{
+    var str = "";
+    while (space-- > 0)
+        str += " ";
+    return str;
+}
+
+// Main program
+async function main()
+{
+    print(tab(33) + "CHEMIST\n");
+    print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
+    print("\n");
+    print("\n");
+    print("\n");
+    print("THE FICTITIOUS CHECMICAL KRYPTOCYANIC ACID CAN ONLY BE\n");
+    print("DILUTED BY THE RATIO OF 7 PARTS WATER TO 3 PARTS ACID.\n");
+    print("IF ANY OTHER RATIO IS ATTEMPTED, THE ACID BECOMES UNSTABLE\n");
+    print("AND SOON EXPLODES.  GIVEN THE AMOUNT OF ACID, YOU MUST\n");
+    print("DECIDE WHO MUCH WATER TO ADD FOR DILUTION.  IF YOU MISS\n");
+    print("YOU FACE THE CONSEQUENCES.\n");
+    t = 0;
+    while (1) {
+        a = Math.floor(Math.random() * 50);
+        w = 7 * a / 3;
+        print(a + " LITERS OF KRYPTOCYANIC ACID.  HOW MUCH WATER");
+        r = parseFloat(await input());
+        d = Math.abs(w - r);
+        if (d > w / 20) {
+            print(" SIZZLE!  YOU HAVE JUST BEEN DESALINATED INTO A BLOB\n");
+            print(" OF QUIVERING PROTOPLASM!\n");
+            t++;
+            if (t == 9)
+                break;
+            print(" HOWEVER, YOU MAY TRY AGAIN WITH ANOTHER LIFE.\n");
+        } else {
+            print(" GOOD JOB! YOU MAY BREATHE NOW, BUT DON'T INHALE THE FUMES!\n");
+            print("\n");
+        }
+    }
+    print(" YOUR 9 LIVES ARE USED, BUT YOU WILL BE LONG REMEMBERED FOR\n");
+    print(" YOUR CONTRIBUTIONS TO THE FIELD OF COMIC BOOK CHEMISTRY.\n");
+}
+
+main();
diff --git a/25 Chief/chief.bas b/25 Chief/chief.bas
index bcf8dd88..d3157e73 100644
--- a/25 Chief/chief.bas	
+++ b/25 Chief/chief.bas	
@@ -47,5 +47,5 @@
 450 PRINT:PRINT"#########################":PRINT
 470 PRINT "I HOPE YOU BELIEVE ME NOW, FOR YOUR SAKE!!"
 480 GOTO 520
-510 PRINT "BYE!!!"
+500 PRINT "BYE!!!"
 520 END
diff --git a/25 Chief/javascript/chief.html b/25 Chief/javascript/chief.html
new file mode 100644
index 00000000..cf272f9b
--- /dev/null
+++ b/25 Chief/javascript/chief.html	
@@ -0,0 +1,9 @@
+
+
+CHIEF
+
+
+

+
+
+
diff --git a/25 Chief/javascript/chief.js b/25 Chief/javascript/chief.js
new file mode 100644
index 00000000..98fde419
--- /dev/null
+++ b/25 Chief/javascript/chief.js	
@@ -0,0 +1,105 @@
+// CHIEF
+//
+// Converted from BASIC to Javascript by Oscar Toledo G. (nanochess)
+//
+
+function print(str)
+{
+    document.getElementById("output").appendChild(document.createTextNode(str));
+}
+
+function input()
+{
+    var input_element;
+    var input_str;
+    
+    return new Promise(function (resolve) {
+                       input_element = document.createElement("INPUT");
+                       
+                       print("? ");
+                       input_element.setAttribute("type", "text");
+                       input_element.setAttribute("length", "50");
+                       document.getElementById("output").appendChild(input_element);
+                       input_element.focus();
+                       input_str = undefined;
+                       input_element.addEventListener("keydown", function (event) {
+                                                      if (event.keyCode == 13) {
+                                                      input_str = input_element.value;
+                                                      document.getElementById("output").removeChild(input_element);
+                                                      print(input_str);
+                                                      print("\n");
+                                                      resolve(input_str);
+                                                      }
+                                                      });
+                       });
+}
+
+function tab(space)
+{
+    var str = "";
+    while (space-- > 0)
+        str += " ";
+    return str;
+}
+
+// Main program
+async function main()
+{
+    print(tab(30) + "CHIEF\n");
+    print(tab(15) + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n");
+    print("\n");
+    print("\n");
+    print("\n");
+    print("I AM CHIEF NUMBERS FREEK, THE GREAT INDIAN MATH GOD.\n");
+    print("ARE YOU READY TO TAKE THE TEST YOU CALLED ME OUT FOR");
+    a = await input();
+    if (a.substr(0, 1) != "Y")
+        print("SHUT UP, PALE FACE WITH WIE TONGUE.\n");
+    print(" TAKE A NUMBER AND ADD 3. DIVIDE THIS NUMBER BY 5 AND\n");
+    print("MULTIPLY BY 8. DIVIDE BY 5 AND ADD THE SAME. SUBTRACT 1.\n");
+    print("  WHAT DO YOU HAVE");
+    b = parseFloat(await input());
+    c = (b + 1 - 5) * 5 / 8 * 5 - 3;
+    print("I BET YOUR NUMBER WAS " + Math.floor(c + 0.5) + ". AM I RIGHT");
+    d = await input();
+    if (d.substr(0, 1) != "Y") {
+        print("WHAT WAS YOUR ORIGINAL NUMBER");
+        k = parseFloat(await input());
+        f = k + 3;
+        g = f / 5;
+        h = g * 8;
+        i = h / 5 + 5;
+        j = i - 1;
+        print("SO YOU THINK YOU'RE SO SMART, EH?\n");
+        print("NOW WATCH.\n");
+        print(k + " PLUS 3 EQUALS " + f + ". THIS DIVIDED BY 5 EQUALS " + g + ";\n");
+        print("THIS TIMES 8 EQUALS " + h + ". IF WE DIVIDE BY 5 AND ADD 5,\n");
+        print("WE GET " + i + ", WHICH, MINUS 1, EQUALS " + j + ".\n");
+        print("NOW DO YOU BELIEVE ME");
+        z = await input();
+        if (z.substr(0, 1) != "Y") {
+            print("YOU HAVE MADE ME MAD!!!\n");
+            print("THERE MUST BE A GREAT LIGHTNING BOLT!\n");
+            print("\n");
+            print("\n");
+            for (x = 30; x >= 22; x--)
+                print(tab(x) + "X X\n");
+            print(tab(21) + "X XXX\n");
+            print(tab(20) + "X   X\n");
+            print(tab(19) + "XX X\n");
+            for (y = 20; y >= 13; y--)
+                print(tab(y) + "X X\n");
+            print(tab(12) + "XX\n");
+            print(tab(11) + "X\n");
+            print(tab(10) + "*\n");
+            print("\n");
+            print("#########################\n");
+            print("\n");
+            print("I HOPE YOU BELIEVE ME NOW, FOR YOUR SAKE!!\n");
+            return;
+        }
+    }
+    print("BYE!!!\n");
+}
+
+main();

From 6043dbfe84e47d644186e2a989d6926e5234a9b1 Mon Sep 17 00:00:00 2001
From: Trevor 
Date: Sat, 20 Feb 2021 06:37:04 +1000
Subject: [PATCH 32/33] Port Rock Scissors Paper to Python

---
 74 Rock Scissors Paper/python/rockscissors.py | 84 +++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 74 Rock Scissors Paper/python/rockscissors.py

diff --git a/74 Rock Scissors Paper/python/rockscissors.py b/74 Rock Scissors Paper/python/rockscissors.py
new file mode 100644
index 00000000..688a894b
--- /dev/null
+++ b/74 Rock Scissors Paper/python/rockscissors.py	
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+# ROCKSCISSORS
+#
+# Converted from BASIC to Python by Trevor Hobson
+
+import random
+
+
+def play_game():
+    """Play one round of the game"""
+
+    while True:
+        try:
+            games = int(input("How many games? "))
+            if games >= 11:
+                print("Sorry, but we aren't allowed to play that many.")
+            else:
+                break
+
+        except ValueError:
+            print("Please enter a number.")
+
+    won_computer = 0
+    won_human = 0
+
+    for game in range(games):
+        print("\nGame number", game + 1)
+        guess_computer = random.randint(1, 3)
+        print("3=Rock...2=Scissors...1=Paper")
+        guess_human = 0
+        while guess_human == 0:
+            try:
+                guess_human = int(input("1...2...3...What's your choice "))
+                if guess_human not in [1, 2, 3]:
+                    guess_human = 0
+                    print("Invalid")
+
+            except ValueError:
+                print("Please enter a number.")
+        print("This is my choice...")
+        if guess_computer == 1:
+            print("...Paper")
+        elif guess_computer == 2:
+            print("...Scissors")
+        elif guess_computer == 3:
+            print("...Rock")
+        if guess_computer == guess_human:
+            print("Tie Game. No winner")
+        elif guess_computer > guess_human:
+            if guess_human != 1 or guess_computer != 3:
+                print("Wow! I win!!!")
+                won_computer = won_computer + 1
+            else:
+                print("You win!!!")
+                won_human = won_human + 1
+        elif guess_computer == 1:
+            if guess_human != 3:
+                print("You win!!!")
+                won_human = won_human + 1
+            else:
+                print("Wow! I win!!!")
+                won_computer = won_computer + 1
+    print("\nHere is the final game score:")
+    print("I have won", won_computer, "game(s).")
+    print("You have won", won_human, "game(s).")
+    print("and", games - (won_computer + won_human), "game(s) ended in a tie.")
+    print("\nThanks for playing!!\n")
+
+
+def main():
+    print(" " * 21 + "GAME OF ROCK, SCISSORS, PAPER")
+    print(" " * 15 + "CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY\n")
+
+    keep_playing = True
+    while keep_playing:
+
+        play_game()
+
+        keep_playing = input(
+            "Play again? (yes or no) ").lower().startswith("y")
+
+
+if __name__ == "__main__":
+    main()

From 5f4683c45d8d91f98a4c96df55e4561663061be6 Mon Sep 17 00:00:00 2001
From: Tim <70119791+journich@users.noreply.github.com>
Date: Sat, 20 Feb 2021 13:29:14 +1030
Subject: [PATCH 33/33] Java version of Bombardment

---
 11 Bombardment/java/Bombardment.iml          |  11 +
 11 Bombardment/java/src/Bombardment.java     | 372 +++++++++++++++++++
 11 Bombardment/java/src/BombardmentGame.java |   8 +
 3 files changed, 391 insertions(+)
 create mode 100644 11 Bombardment/java/Bombardment.iml
 create mode 100644 11 Bombardment/java/src/Bombardment.java
 create mode 100644 11 Bombardment/java/src/BombardmentGame.java

diff --git a/11 Bombardment/java/Bombardment.iml b/11 Bombardment/java/Bombardment.iml
new file mode 100644
index 00000000..c90834f2
--- /dev/null
+++ b/11 Bombardment/java/Bombardment.iml	
@@ -0,0 +1,11 @@
+
+
+  
+    
+    
+      
+    
+    
+    
+  
+
\ No newline at end of file
diff --git a/11 Bombardment/java/src/Bombardment.java b/11 Bombardment/java/src/Bombardment.java
new file mode 100644
index 00000000..06a3043c
--- /dev/null
+++ b/11 Bombardment/java/src/Bombardment.java	
@@ -0,0 +1,372 @@
+import java.util.HashSet;
+import java.util.Scanner;
+
+/**
+ * Game of Bombardment
+ *
+ * Based on the Basic game of Bombardment here
+ * https://github.com/coding-horror/basic-computer-games/blob/main/11%20Bombardment/bombardment.bas
+ *
+ * Note:  The idea was to create a version of this 1970's Basic game in Java, without introducing
+ *        new features - no additional text, error checking, etc has been added.
+ */
+public class Bombardment {
+
+    public static final int MAX_GRID_SIZE = 25;
+    public static final int PLATOONS = 4;
+
+    private enum GAME_STATE {
+        STARTING,
+        DRAW_BATTLEFIELD,
+        GET_PLAYER_CHOICES,
+        PLAYERS_TURN,
+        COMPUTER_TURN,
+        PLAYER_WON,
+        PLAYER_LOST,
+        GAME_OVER
+    }
+
+    private GAME_STATE gameState;
+
+    public static final String[] PLAYER_HIT_MESSAGES = { "ONE DOWN, THREE TO GO.",
+            "TWO DOWN, TWO TO GO.", "THREE DOWN, ONE TO GO." };
+
+    public static final String[] COMPUTER_HIT_MESSAGES = {"YOU HAVE ONLY THREE OUTPOSTS LEFT.",
+            "YOU HAVE ONLY TWO OUTPOSTS LEFT.", "YOU HAVE ONLY ONE OUTPOST LEFT." };
+
+    private HashSet computersPlatoons;
+    private HashSet playersPlatoons;
+
+    private HashSet computersGuesses;
+
+    // Used for keyboard input
+    private final Scanner kbScanner;
+
+    public Bombardment() {
+
+        this.gameState = GAME_STATE.STARTING;
+
+        // Initialise kb scanner
+        kbScanner = new Scanner(System.in);
+    }
+
+    /**
+     * Main game loop
+     */
+    public void play() {
+
+        do {
+            switch (this.gameState) {
+
+                // Show an introduction the first time the game is played.
+                case STARTING:
+                    init();
+                    intro();
+                    this.gameState = GAME_STATE.DRAW_BATTLEFIELD;
+                    break;
+
+                // Enter the players name
+                case DRAW_BATTLEFIELD:
+                    drawBattlefield();
+                    this.gameState = GAME_STATE.GET_PLAYER_CHOICES;
+                    break;
+
+                // Get the players 4 locations for their platoons
+                case GET_PLAYER_CHOICES:
+                    String playerChoices = displayTextAndGetInput("WHAT ARE YOUR FOUR POSITIONS? ");
+
+                    // Store the 4 player choices that were entered separated with commas
+                    for(int i=0; i computersChosenPlatoons() {
+
+        // Initialise contents
+        HashSet tempPlatoons = new HashSet<>();
+
+        boolean allPlatoonsAdded = false;
+
+        do {
+            tempPlatoons.add(randomNumber());
+
+            // All four created?
+            if(tempPlatoons.size() == PLATOONS) {
+                // Exit when we have created four
+                allPlatoonsAdded = true;
+            }
+
+        } while(!allPlatoonsAdded);
+
+        return tempPlatoons;
+    }
+    /**
+     * Shows a different message for each number of hits
+     *
+     * @param hits  total number of hits by player on computer
+     */
+    private void showPlayerProgress(int hits) {
+
+        System.out.println("YOU GOT ONE OF MY OUTPOSTS!");
+        showProgress(hits, PLAYER_HIT_MESSAGES);
+    }
+
+    /**
+     * Shows a different message for each number of hits
+     *
+     * @param hits  total number of hits by computer on player
+     */
+    private void showComputerProgress(int hits, int lastGuess) {
+
+        System.out.println("I GOT YOU. IT WON'T BE LONG NOW. POST " + lastGuess + " WAS HIT.");
+        showProgress(hits, COMPUTER_HIT_MESSAGES);
+    }
+
+    /**
+     * Prints a message from the passed array based on the value of hits
+
+     * @param hits - number of hits the player or computer has made
+     * @param messages - an array of string with messages
+     */
+    private void showProgress(int hits, String[] messages) {
+        System.out.println(messages[hits-1]);
+    }
+
+    /**
+     *
+     * Update a player hit - adds a hit the player made on the computers platoon.
+     * @param fireLocation - computer location that got hit
+     * @return number of hits the player has inflicted on the computer in total
+     */
+    private int updatePlayerHits(int fireLocation) {
+
+        // N.B. only removes if present, so its redundant to check if it exists first
+        this.computersPlatoons.remove(fireLocation);
+
+        // return number of hits in total
+        return PLATOONS - this.computersPlatoons.size();
+    }
+
+    /**
+     *
+     * Update a computer hit - adds a hit the computer made on the players platoon.
+     * @param fireLocation - player location that got hit
+     * @return number of hits the player has inflicted on the computer in total
+     */
+    private int updateComputerHits(int fireLocation) {
+
+        // N.B. only removes if present, so its redundant to check if it exists first
+        this.playersPlatoons.remove(fireLocation);
+
+        // return number of hits in total
+        return PLATOONS - this.playersPlatoons.size();
+    }
+
+    /**
+     * Determine if the player hit one of the computers platoons
+     *
+     * @param fireLocation the players choice of location to fire on
+     * @return true if a computer platoon was at that position
+     */
+    private boolean didPlayerHitComputerPlatoon(int fireLocation) {
+        return this.computersPlatoons.contains(fireLocation);
+    }
+
+    /**
+     * Determine if the computer hit one of the players platoons
+     *
+     * @param fireLocation the computers choice of location to fire on
+     * @return true if a players platoon was at that position
+     */
+    private boolean didComputerHitPlayerPlatoon(int fireLocation) {
+        return this.playersPlatoons.contains(fireLocation);
+    }
+
+    /**
+     * Draw the battlefield grid
+     *
+     */
+    private void drawBattlefield() {
+        for(int i=1; i();
+
+        this.computersGuesses = new HashSet<>();
+    }
+
+    /**
+     * Accepts a string delimited by comma's and returns the nth delimited
+     * value (starting at count 0).
+     *
+     * @param text - text with values separated by comma's
+     * @param pos  - which position to return a value for
+     * @return the int representation of the value
+     */
+    private int getDelimitedValue(String text, int pos) {
+        String[] tokens = text.split(",");
+        return Integer.parseInt(tokens[pos]);
+    }
+
+
+    /*
+     * Print a message on the screen, then accept input from Keyboard.
+     *
+     * @param text message to be displayed on screen.
+     * @return what was typed by the player.
+     */
+    private String displayTextAndGetInput(String text) {
+        System.out.print(text);
+        return kbScanner.next();
+    }
+
+    /**
+     * Generate random number
+     *
+     * @return random number
+     */
+    private int randomNumber() {
+        return (int) (Math.random()
+                * (MAX_GRID_SIZE) + 1);
+    }
+}
\ No newline at end of file
diff --git a/11 Bombardment/java/src/BombardmentGame.java b/11 Bombardment/java/src/BombardmentGame.java
new file mode 100644
index 00000000..31f0edfe
--- /dev/null
+++ b/11 Bombardment/java/src/BombardmentGame.java	
@@ -0,0 +1,8 @@
+public class BombardmentGame {
+
+    public static void main(String[] args) {
+
+        Bombardment bombardment = new Bombardment();
+        bombardment.play();
+    }
+}