From 7580b7fd8cd1171bf5c7625418b58642317f6b34 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sun, 2 Jan 2022 22:31:41 +0000 Subject: [PATCH 01/82] Typo vs. original listing screenshot --- 27_Civil_War/civilwar.bas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/27_Civil_War/civilwar.bas b/27_Civil_War/civilwar.bas index 63597944..f8fe9701 100644 --- a/27_Civil_War/civilwar.bas +++ b/27_Civil_War/civilwar.bas @@ -216,7 +216,7 @@ 2280 PRINT "CASUALTIES",C5,C6 2290 PRINT "DESERTIONS",INT(E),INT(E2) 2300 PRINT -2310 IF B$ <> "YES" THEN 2350 +2310 IF B$ <> "YES" THEN 2530 2320 PRINT "COMPARED TO THE ACTUAL CASUALTIES AT "C$ 2330 PRINT "CONFEDERATE:"INT(100*(C5/C1)+.5)"% OF THE ORIGINAL" 2340 PRINT "UNION: "INT(100*(C6/C2)+.5)"% OF THE ORIGINAL" From dfbaac4c1173babfab68d4a902c51eec7292d39e Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sun, 2 Jan 2022 22:37:49 +0000 Subject: [PATCH 02/82] Create .gitignore --- 27_Civil_War/java/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 27_Civil_War/java/.gitignore diff --git a/27_Civil_War/java/.gitignore b/27_Civil_War/java/.gitignore new file mode 100644 index 00000000..a87dc8b2 --- /dev/null +++ b/27_Civil_War/java/.gitignore @@ -0,0 +1,3 @@ +*.class +*.iml +.idea/ \ No newline at end of file From 3be8d3e158242b8ca5662dc018a4f8971b34f409 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Wed, 5 Jan 2022 00:00:36 +0000 Subject: [PATCH 03/82] Initial --- 27_Civil_War/java/src/CivilWar.java | 610 ++++++++++++++++++++++++++++ 1 file changed, 610 insertions(+) create mode 100644 27_Civil_War/java/src/CivilWar.java diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java new file mode 100644 index 00000000..fa6cd27a --- /dev/null +++ b/27_Civil_War/java/src/CivilWar.java @@ -0,0 +1,610 @@ +import java.io.PrintStream; +import java.util.List; +import java.util.Scanner; + +import static java.util.stream.Collectors.joining; +import static java.util.stream.IntStream.range; + +@SuppressWarnings("SpellCheckingInspection") +public class CivilWar { + + private final PrintStream out; + private final List data; + + private BattleState currentBattle; + private int R1; + private int R2; + private final int[] strategies; + private int numGenerals; + private final int[] B; + private final int[] F; + private final int[] H; + private final int[] D; + private final double[] O; + private int battleNumber; + private int Y; + private int Y2; + private final ArmyPair totalExpectedCasualties; + private final ArmyPair totalCasualties; + private int excessiveConfederateLosses; + private int excessiveUnionLosses; + private int L; + private int W; + private int M3; + private int M4; + private int Q1; + private int Q2; + private double C6; + private double E2; + private int W0; + private int confedTroops; // M5 + private int unionTroops; // M6 + private boolean confedSurrender; + private boolean unionSurrender; + private int I1; + private int I2; + private double R; + private boolean wantBattleDescriptions; + + /** + * ORIGINAL GAME DESIGN: CRAM, GOODIE, HIBBARD LEXINGTON H.S. + * MODIFICATIONS: G. PAUL, R. HESS (TIES), 1973 + */ + public static void main(String[] args) { + var x = new CivilWar(System.out); + x.showCredits(); + + // LET D=RND(-1) ??? + + System.out.print("DO YOU WANT INSTRUCTIONS? "); + + var terminalInput = new Scanner(System.in); + String s = terminalInput.nextLine(); + switch (s) { + case "Y" -> { + x.showHelp(); + x.gameLoop(); + } + case "N" -> x.gameLoop(); + default -> System.out.println("YES OR NO -- "); + } + } + + private void gameLoop() { + out.println(); + out.println(); + out.println(); + out.print("ARE THERE TWO GENERALS PRESENT (ANSWER YES OR NO)? "); + + var terminalInput = new Scanner(System.in); + String twoGeneralsAnswer = terminalInput.nextLine(); + switch (twoGeneralsAnswer) { + case "YES" -> this.numGenerals = 2; + case "NO" -> { + this.numGenerals = 1; + out.println(); + out.println("YOU ARE THE CONFEDERACY. GOOD LUCK!"); + out.println(); + } + default -> { + // FIXME Retry! + } + } + + out.println("SELECT A BATTLE BY TYPING A NUMBER FROM 1 TO 14 ON"); + out.println("REQUEST. TYPE ANY OTHER NUMBER TO END THE SIMULATION."); + out.println("BUT '0' BRINGS BACK EXACT PREVIOUS BATTLE SITUATION"); + out.println("ALLOWING YOU TO REPLAY IT"); + out.println(); + out.println("NOTE: A NEGATIVE FOOD$ ENTRY CAUSES THE PROGRAM TO "); + out.println("USE THE ENTRIES FROM THE PREVIOUS BATTLE"); + out.println(); + + out.print("AFTER REQUESTING A BATTLE, DO YOU WISH BATTLE DESCRIPTIONS (ANSWER YES OR NO)? "); + String descriptionsAnswer = terminalInput.nextLine(); + this.wantBattleDescriptions = descriptionsAnswer.equals("YES"); + // FIXME Retry if not "YES" or "NO" + + while (true) { + var battle = startBattle(); + if (battle == null) { + break; + } + + this.currentBattle = battle; + + offensiveLogic(battle.data); + + unionStrategy(); + + simulatedLosses(battle.data); + calcLosses(battle); + + reset(); + + if (this.confedSurrender) { + out.println("THE CONFEDERACY HAS SURRENDERED"); + } else if (unionSurrender) { // FIXME Is this actually possible? 2850 + out.println("THE UNION HAS SURRENDERED."); + } + } + + complete(); + } + + private BattleState startBattle() { + out.println(); + out.println(); + out.println(); + out.print("WHICH BATTLE DO YOU WISH TO SIMULATE ? "); + + var terminalInput = new Scanner(System.in); + var battleNumber = terminalInput.nextInt(); + + if (battleNumber == 0 && this.currentBattle != null) { + out.println(this.currentBattle.data.name + " INSTANT REPLAY"); + return this.currentBattle; + } + + if (battleNumber <= 0 || battleNumber > this.data.size()) { + return null; + } + + this.battleNumber = battleNumber; + + var battle = this.data.get(this.battleNumber - 1); + var battleState = new BattleState(battle); + + + excessiveConfederateLosses = 0; + + // INFLATION CALC + // REM - ONLY IN PRINTOUT IS CONFED INFLATION = I1+15% + I1 = 10 + (L - W) * 2; + I2 = 10 + (W - L) * 2; + + // MONEY AVAILABLE + this.D[0] = 100 * (int) Math.floor((battle.troops.confederate * (100.0 - I1) / 2000) * (1 + (R1 - Q1) / (R1 + 1.0)) + .5); + + // MEN AVAILABLE + this.confedTroops = (int) Math.floor(battle.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (M3 + 1.0))); + this.unionTroops = (int) Math.floor(battle.troops.union * (1 + (totalExpectedCasualties.union - totalCasualties.union) / (M4 + 1.0))); + battleState.F1 = 5 * battle.troops.confederate / 6.0; + + if (this.numGenerals == 2) { + this.D[1] = 100 * (int) Math.floor((battle.troops.union * (100.0 - I2) / 2000) * (1 + (R2 - Q2) / (R2 + 1.0)) + .5); + } else { + this.D[1] = 100 * (int) Math.floor(battle.troops.union * (100.0 - I2) / 2000 + .5); + } + + out.println(); + out.println(); + out.println(); + out.println(); + out.println(); + out.println("THIS IS THE BATTLE OF " + battle.name); + + if (this.wantBattleDescriptions) { + for (var eachLine : battle.blurb) { + out.println(eachLine); + } + } + + out.println(); + out.println(" CONFEDERACY UNION"); + out.println("MEN " + confedTroops + " " + unionTroops); + out.println("MONEY $ " + this.D[0] + " $ " + this.D[1]); + out.println("INFLATION " + (I1 + 15) + "% " + I2 + "%"); + + // ONLY IN PRINTOUT IS CONFED INFLATION = I1+15% + // IF TWO GENERALS, INPUT CONFED. FIRST + + for (int i = 0; i < numGenerals; i++) { + out.println(); + + if (this.numGenerals == 1 || i == 0) { + out.print("CONFEDERATE GENERAL --- "); + } else { + out.print("UNION GENERAL --- "); + } + + out.println("HOW MUCH DO YOU WISH TO SPEND FOR"); + out.print("- FOOD...... ? "); + var F = terminalInput.nextInt(); + if (F == 0) { + if (this.R1 != 0) { + out.println("ASSUME YOU WANT TO KEEP SAME ALLOCATIONS"); + out.println(); + } + } + + this.F[i] = F; + + out.print("- SALARIES.. ? "); + this.H[i] = terminalInput.nextInt(); + + out.print("- AMMUNITION ? "); + this.B[i] = terminalInput.nextInt(); // FIXME Retry if -ve + + if (this.F[i] + this.H[i] + this.B[i] > this.D[i]) { + out.println("THINK AGAIN! YOU HAVE ONLY $" + this.D[i]); + // FIXME Redo inputs from Food + } + } + + out.println(); + + // Record Morale + out.println(range(0, numGenerals).mapToObj(i -> moraleForArmy(battleState, i)).collect(joining(", "))); + + out.println(); + + return battleState; + } + + private String moraleForArmy(BattleState battleState, int armyIdx) { + var builder = new StringBuilder(); + + if (this.numGenerals == 1 || armyIdx == 0) { + builder.append("CONFEDERATE "); + } else { + builder.append("UNION "); + } + + // FIND MORALE + this.O[armyIdx] = (2 * Math.pow(F[armyIdx], 2) + Math.pow(H[armyIdx], 2)) / Math.pow(battleState.F1, 2) + 1; + if (this.O[armyIdx] >= 10) { + builder.append("MORALE IS HIGH"); + } else if (this.O[armyIdx] >= 5) { + builder.append("MORALE IS FAIR"); + } else { + builder.append("MORALE IS POOR"); + } + + return builder.toString(); + } + + private enum OffensiveStatus { + DEFENSIVE("YOU ARE ON THE DEFENSIVE"), OFFENSIVE("YOU ARE ON THE OFFENSIVE"), BOTH_OFFENSIVE("BOTH SIDES ARE ON THE OFFENSIVE"); + + private final String label; + + OffensiveStatus(String label) { + this.label = label; + } + } + + private void offensiveLogic(HistoricalDatum battle) { + out.print("CONFEDERATE GENERAL---"); + // ACTUAL OFF/DEF BATTLE SITUATION + out.println(battle.offensiveStatus.label); + + // CHOOSE STRATEGIES + + if (numGenerals == 2) { + out.print("CONFEDERATE STRATEGY ? "); + } else { + out.print("YOUR STRATEGY ? "); + } + + var terminalInput = new Scanner(System.in); + Y = terminalInput.nextInt(); + if (Math.abs(Y - 3) >= 3) { + out.println("STRATEGY " + Y + " NOT ALLOWED."); + // FIXME Proper numeric check!! Not abs + // FIXME Retry Y input + } + + if (Y == 5) { // 1970 + confedSurrender = true; + } + } + + // 2070 REM : SIMULATED LOSSES-NORTH + private void simulatedLosses(HistoricalDatum battle) { + C6 = (2.0 * battle.expectedCasualties.union / 5) * (1 + 1.0 / (2 * (Math.abs(Y2 - Y) + 1))); + C6 = C6 * (1.28 + (5.0 * battle.troops.union / 6) / (B[1] + 1)); + C6 = Math.floor(C6 * (1 + 1 / O[1]) + 0.5); + // IF LOSS > MEN PRESENT, RESCALE LOSSES + E2 = 100 / O[1]; + if (Math.floor(C6 + E2) >= unionTroops) { + C6 = Math.floor(13.0 * unionTroops / 20); + E2 = 7 * C6 / 13; + excessiveUnionLosses = 1; + } + } + + // 2170: CALCULATE SIMULATED LOSSES + private void calcLosses(BattleState battle) { + // 2190 + out.println(); + out.println(" CONFEDERACY UNION"); + + var C5 = (2 * battle.data.expectedCasualties.confederate / 5) * (1 + 1.0 / (2 * (Math.abs(Y2 - Y) + 1))); + C5 = (int) Math.floor(C5 * (1 + 1.0 / this.O[0]) * (1.28 + battle.F1 / (this.B[0] + 1.0)) + .5); + var E = 100 / O[0]; + + if (C5 + 100 / O[0] >= battle.data.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (M3 + 1.0))) { + C5 = (int) Math.floor(13.0 * battle.data.troops.confederate / 20 * (1 + (totalExpectedCasualties.union - totalCasualties.confederate) / (M3 + 1.0))); + E = 7 * C5 / 13.0; + excessiveConfederateLosses = 1; + } + + ///// 2270 + + if (this.numGenerals == 1) { + C6 = (int) Math.floor(17.0 * battle.data.expectedCasualties.union * battle.data.expectedCasualties.confederate / (C5 * 20)); + E2 = 5 * O[0]; + } + + out.println("CASUALTIES: " + rightAlignInt(C5) + " " + rightAlignInt(C6)); + out.println("DESERTIONS: " + rightAlignInt(E) + " " + rightAlignInt(E2)); + out.println(); + + if (numGenerals == 2) { + out.println("COMPARED TO THE ACTUAL CASUALTIES AT " + battle.data.name); + out.println("CONFEDERATE: " + (int) Math.floor(100 * (C5 / (double) battle.data.expectedCasualties.confederate) + 0.5) + " % OF THE ORIGINAL"); + out.println("UNION: " + (int) Math.floor(100 * (C6 / (double) battle.data.expectedCasualties.union) + 0.5) + " % OF THE ORIGINAL"); + + out.println(); + + // REM - 1 WHO WON + var winner = findWinner(C5 + E, C6 + E2); + switch (winner) { + case UNION -> { + out.println("THE UNION WINS " + battle.data.name); + L++; + } + case CONFED -> { + out.println("THE CONFEDERACY WINS " + battle.data.name); + W++; + } + case INDECISIVE -> { + out.println("BATTLE OUTCOME UNRESOLVED"); + this.W0++; + } + } + } else { + out.println("YOUR CASUALTIES WERE " + Math.floor(100 * (C5 / (double) battle.data.expectedCasualties.confederate) + 0.5) + "% OF THE ACTUAL CASUALTIES AT " + battle.data.name); + + // FIND WHO WON + + if (excessiveConfederateLosses == 1) { + out.println("YOU LOSE " + battle.data.name); + + if (this.battleNumber != 0) { + L++; + } + } else { + out.println("YOU WIN " + battle.data.name); + // CUMULATIVE BATTLE FACTORS WHICH ALTER HISTORICAL RESOURCES AVAILABLE.IF A REPLAY DON'T UPDATE. + W++; + } + } + + if (this.battleNumber != 0) { + totalCasualties.confederate += (int) (C5 + E); + totalCasualties.union += (int) (C6 + E2); + totalExpectedCasualties.confederate += battle.data.expectedCasualties.confederate; + totalExpectedCasualties.union += battle.data.expectedCasualties.union; + Q1 += F[0] + H[0] + B[0]; + Q2 += F[1] + H[1] + B[1]; + R1 += battle.data.troops.confederate * (100 - I1) / 20; + R2 += battle.data.troops.union * (100 - I2) / 20; + M3 += battle.data.troops.confederate; + M4 += battle.data.troops.union; + + updateStrategies(this.Y); + } + } + + // 2790 + private void reset() { + excessiveConfederateLosses = excessiveUnionLosses = 0; + + out.println("---------------"); + } + + // 2820 REM------FINISH OFF + private void complete() { + out.println(); + out.println(); + out.println(); + out.println(); + out.println(); + out.println(); + out.println("THE CONFEDERACY HAS WON " + this.W + " BATTLES AND LOST " + this.L); + + if (this.Y2 == 5) { + out.println("THE CONFEDERACY HAS WON THE WAR"); + } + + if (this.Y == 5 || this.W <= this.L) { + out.println("THE UNION HAS WON THE WAR"); + } + + out.println(); + + // FIXME 2960 IF R1=0 THEN 3100 + + out.println("FOR THE " + (W + L + W0) + " BATTLES FOUGHT (EXCLUDING RERUNS)"); +// out.println(" ", " ", " "); + out.println(" CONFEDERACY UNION"); + out.println("HISTORICAL LOSSES " + (int) Math.floor(totalExpectedCasualties.confederate + .5) + " " + (int) Math.floor(totalExpectedCasualties.union + .5)); + out.println("SIMULATED LOSSES " + (int) Math.floor(totalCasualties.confederate + .5) + " " + (int) Math.floor(totalCasualties.union + .5)); + out.println(); + out.println(" % OF ORIGINAL " + (int) Math.floor(100 * ((double) totalCasualties.confederate / totalExpectedCasualties.confederate) + .5) + " " + (int) Math.floor(100 * ((double) totalCasualties.union / totalExpectedCasualties.union) + .5)); + + if (this.numGenerals == 1) { + out.println(); + out.println("UNION INTELLIGENCE SUGGESTS THAT THE SOUTH USED "); + out.println("STRATEGIES 1, 2, 3, 4 IN THE FOLLOWING PERCENTAGES"); + out.println(this.strategies[0] + "," + this.strategies[1] + "," + this.strategies[2] + "," + this.strategies[3]); + } + } + + private Winner findWinner(double confLosses, double unionLosses) { + if (this.excessiveConfederateLosses == 1 && this.excessiveUnionLosses == 1) { + return Winner.INDECISIVE; + } + + if (this.excessiveConfederateLosses == 1) { + return Winner.UNION; + } + + if (this.excessiveUnionLosses == 1 || confLosses < unionLosses) { + return Winner.CONFED; + } + + if (confLosses == unionLosses) { + return Winner.INDECISIVE; + } + + return Winner.UNION; // FIXME Really? 2400-2420 ? + } + + private enum Winner { + CONFED, UNION, INDECISIVE + } + + private void unionStrategy() { + if (this.battleNumber != 0) { + out.print("UNION STRATEGY ? "); + var terminalInput = new Scanner(System.in); + Y2 = terminalInput.nextInt(); + if (Y2 < 0) { + out.println("ENTER 1, 2, 3, OR 4 (USUALLY PREVIOUS UNION STRATEGY)"); + // FIXME Retry Y2 input !!! + } + + if (Y2 < 5) { // 3155 + return; + } + } + + var S0 = 0; + + this.R = 100 * Math.random(); + + for (Y2 = 0; Y2 < 4; Y2++) { + S0 += this.strategies[Y2]; + // IF ACTUAL STRATEGY INFO IS IN PROGRAM DATA STATEMENTS THEN R-100 IS EXTRA WEIGHT GIVEN TO THAT STATEGY. + if (R < S0) { + break; + } + } + // IF ACTUAL STRAT. IN,THEN HERE IS Y2= HIST. STRAT. + out.println("UNION STRATEGY IS " + Y2); + } + + public CivilWar(PrintStream out) { + this.out = out; + + this.totalCasualties = new ArmyPair<>(0, 0); + this.totalExpectedCasualties = new ArmyPair<>(0, 0); + + // UNION INFO ON LIKELY CONFEDERATE STRATEGY + this.strategies = new int[]{25, 25, 25, 25}; + + this.F = new int[]{0, 0}; + this.H = new int[]{0, 0}; + this.B = new int[]{0, 0}; + this.D = new int[]{0, 0}; + this.O = new double[]{0, 0}; + + // READ HISTORICAL DATA. + // HISTORICAL DATA...CAN ADD MORE (STRAT.,ETC) BY INSERTING DATA STATEMENTS AFTER APPRO. INFO, AND ADJUSTING READ + this.data = List.of(new HistoricalDatum("BULL RUN", new ArmyPair<>(18000, 18500), new ArmyPair<>(1967, 2708), OffensiveStatus.DEFENSIVE, new String[]{"JULY 21, 1861. GEN. BEAUREGARD, COMMANDING THE SOUTH, MET", "UNION FORCES WITH GEN. MCDOWELL IN A PREMATURE BATTLE AT", "BULL RUN. GEN. JACKSON HELPED PUSH BACK THE UNION ATTACK."}), new HistoricalDatum("SHILOH", new ArmyPair<>(40000, 44894), new ArmyPair<>(10699, 13047), OffensiveStatus.OFFENSIVE, new String[]{"APRIL 6-7, 1862. THE CONFEDERATE SURPRISE ATTACK AT", "SHILOH FAILED DUE TO POOR ORGANIZATION."}), new HistoricalDatum("SEVEN DAYS", new ArmyPair<>(95000, 115000), new ArmyPair<>(20614, 15849), OffensiveStatus.OFFENSIVE, new String[]{"JUNE 25-JULY 1, 1862. GENERAL LEE (CSA) UPHELD THE", "OFFENSIVE THROUGHOUT THE BATTLE AND FORCED GEN. MCCLELLAN", "AND THE UNION FORCES AWAY FROM RICHMOND."}), new HistoricalDatum("SECOND BULL RUN", new ArmyPair<>(54000, 63000), new ArmyPair<>(10000, 14000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"AUG 29-30, 1862. THE COMBINED CONFEDERATE FORCES UNDER", " LEE", "AND JACKSON DROVE THE UNION FORCES BACK INTO WASHINGTON."}), new HistoricalDatum("ANTIETAM", new ArmyPair<>(40000, 50000), new ArmyPair<>(10000, 12000), OffensiveStatus.OFFENSIVE, new String[]{"SEPT 17, 1862. THE SOUTH FAILED TO INCORPORATE MARYLAND", "INTO THE CONFEDERACY."}), new HistoricalDatum("FREDERICKSBURG", new ArmyPair<>(75000, 120000), new ArmyPair<>(5377, 12653), OffensiveStatus.DEFENSIVE, new String[]{"DEC 13, 1862. THE CONFEDERACY UNDER LEE SUCCESSFULLY", "REPULSED AN ATTACK BY THE UNION UNDER GEN. BURNSIDE."}), new HistoricalDatum("MURFREESBORO", new ArmyPair<>(38000, 45000), new ArmyPair<>(11000, 12000), OffensiveStatus.DEFENSIVE, new String[]{"DEC 31, 1862. THE SOUTH UNDER GEN. BRAGG WON A CLOSE BATTLE."}), new HistoricalDatum("CHANCELLORSVILLE", new ArmyPair<>(32000, 90000), new ArmyPair<>(13000, 17197), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"MAY 1-6, 1863. THE SOUTH HAD A COSTLY VICTORY AND LOST", "ONE OF THEIR OUTSTANDING GENERALS, 'STONEWALL' JACKSON."}), new HistoricalDatum("VICKSBURG", new ArmyPair<>(50000, 70000), new ArmyPair<>(12000, 19000), OffensiveStatus.DEFENSIVE, new String[]{"JULY 4, 1863. VICKSBURG WAS A COSTLY DEFEAT FOR THE SOUTH", "BECAUSE IT GAVE THE UNION ACCESS TO THE MISSISSIPPI."}), new HistoricalDatum("GETTYSBURG", new ArmyPair<>(72500, 85000), new ArmyPair<>(20000, 23000), OffensiveStatus.OFFENSIVE, new String[]{"JULY 1-3, 1863. A SOUTHERN MISTAKE BY GEN. LEE AT GETTYSBURG", "COST THEM ONE OF THE MOST CRUCIAL BATTLES OF THE WAR."}), new HistoricalDatum("CHICKAMAUGA", new ArmyPair<>(66000, 60000), new ArmyPair<>(18000, 16000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"SEPT. 15, 1863. CONFUSION IN A FOREST NEAR CHICKAMAUGA LED", "TO A COSTLY SOUTHERN VICTORY."}), new HistoricalDatum("CHATTANOOGA", new ArmyPair<>(37000, 60000), new ArmyPair<>(36700, 5800), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"NOV. 25, 1863. AFTER THE SOUTH HAD SIEGED GEN. ROSENCRANS'", "ARMY FOR THREE MONTHS, GEN. GRANT BROKE THE SIEGE."}), new HistoricalDatum("SPOTSYLVANIA", new ArmyPair<>(62000, 110000), new ArmyPair<>(17723, 18000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"MAY 5, 1864. GRANT'S PLAN TO KEEP LEE ISOLATED BEGAN TO", "FAIL HERE, AND CONTINUED AT COLD HARBOR AND PETERSBURG."}), new HistoricalDatum("ATLANTA", new ArmyPair<>(65000, 100000), new ArmyPair<>(8500, 3700), OffensiveStatus.DEFENSIVE, new String[]{"AUGUST, 1864. SHERMAN AND THREE VETERAN ARMIES CONVERGED", "ON ATLANTA AND DEALT THE DEATH BLOW TO THE CONFEDERACY."})); + } + + private void showCredits() { + out.println(" ".repeat(26) + "CIVIL WAR"); + out.println(" ".repeat(15) + "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"); + out.println(); + out.println(); + out.println(); + } + + private void updateStrategies(int strategy) { + // REM LEARN PRESENT STRATEGY, START FORGETTING OLD ONES + // REM - PRESENT STRATEGY OF SOUTH GAINS 3*S, OTHERS LOSE S + // REM PROBABILITY POINTS, UNLESS A STRATEGY FALLS BELOW 5%. + + var S = 3; + var S0 = 0; + for (int i = 0; i < 4; i++) { + if (this.strategies[i] <= 5) { + continue; + } + + this.strategies[i] -= S; + S0 += S; + + } + this.strategies[strategy - 1] += S0; + + } + + private void showHelp() { + out.println(); + out.println(); + out.println(); + out.println(); + out.println("THIS IS A CIVIL WAR SIMULATION."); + out.println("TO PLAY TYPE A RESPONSE WHEN THE COMPUTER ASKS."); + out.println("REMEMBER THAT ALL FACTORS ARE INTERRELATED AND THAT YOUR"); + out.println("RESPONSES COULD CHANGE HISTORY. FACTS AND FIGURES USED ARE"); + out.println("BASED ON THE ACTUAL OCCURRENCE. MOST BATTLES TEND TO RESULT"); + out.println("AS THEY DID IN THE CIVIL WAR, BUT IT ALL DEPENDS ON YOU!!"); + out.println(); + out.println("THE OBJECT OF THE GAME IS TO WIN AS MANY BATTLES AS "); + out.println("POSSIBLE."); + out.println(); + out.println("YOUR CHOICES FOR DEFENSIVE STRATEGY ARE:"); + out.println(" (1) ARTILLERY ATTACK"); + out.println(" (2) FORTIFICATION AGAINST FRONTAL ATTACK"); + out.println(" (3) FORTIFICATION AGAINST FLANKING MANEUVERS"); + out.println(" (4) FALLING BACK"); + out.println(" YOUR CHOICES FOR OFFENSIVE STRATEGY ARE:"); + out.println(" (1) ARTILLERY ATTACK"); + out.println(" (2) FRONTAL ATTACK"); + out.println(" (3) FLANKING MANEUVERS"); + out.println(" (4) ENCIRCLEMENT"); + out.println("YOU MAY SURRENDER BY TYPING A '5' FOR YOUR STRATEGY."); + } + + private static final int MAX_NUM_LENGTH = 6; + + private String rightAlignInt(int number) { + var s = String.valueOf(number); + return " ".repeat(MAX_NUM_LENGTH - s.length()) + s; + } + + private String rightAlignInt(double number) { + return rightAlignInt((int) Math.floor(number)); + } + + private static class BattleState { + private final HistoricalDatum data; + private double F1; + + public BattleState(HistoricalDatum data) { + this.data = data; + } + } + + private static class ArmyPair { + private T confederate; + private T union; + + public ArmyPair(T confederate, T union) { + this.confederate = confederate; + this.union = union; + } + } + + private record HistoricalDatum(String name, ArmyPair troops, + ArmyPair expectedCasualties, + OffensiveStatus offensiveStatus, String[] blurb) { + } +} \ No newline at end of file From 3dcb5f7ac0dcccef33f16b1bf3f73e30f102b3d2 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sat, 15 Jan 2022 16:32:12 +0000 Subject: [PATCH 04/82] Clean up YES/NO input and validation --- 27_Civil_War/java/src/CivilWar.java | 70 ++++++++++++++++++----------- 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index fa6cd27a..bdf1bff6 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -1,6 +1,7 @@ import java.io.PrintStream; import java.util.List; import java.util.Scanner; +import java.util.function.Predicate; import static java.util.stream.Collectors.joining; import static java.util.stream.IntStream.range; @@ -46,6 +47,9 @@ public class CivilWar { private double R; private boolean wantBattleDescriptions; + private final static String YES_NO_REMINDER = "(ANSWER YES OR NO)"; + private final static Predicate YES_NO_CHECKER = i -> isYes(i) || isNo(i); + /** * ORIGINAL GAME DESIGN: CRAM, GOODIE, HIBBARD LEXINGTON H.S. * MODIFICATIONS: G. PAUL, R. HESS (TIES), 1973 @@ -58,16 +62,11 @@ public class CivilWar { System.out.print("DO YOU WANT INSTRUCTIONS? "); - var terminalInput = new Scanner(System.in); - String s = terminalInput.nextLine(); - switch (s) { - case "Y" -> { - x.showHelp(); - x.gameLoop(); - } - case "N" -> x.gameLoop(); - default -> System.out.println("YES OR NO -- "); + if (isYes(inputString(YES_NO_CHECKER, YES_NO_REMINDER))) { + x.showHelp(); } + + x.gameLoop(); } private void gameLoop() { @@ -76,19 +75,13 @@ public class CivilWar { out.println(); out.print("ARE THERE TWO GENERALS PRESENT (ANSWER YES OR NO)? "); - var terminalInput = new Scanner(System.in); - String twoGeneralsAnswer = terminalInput.nextLine(); - switch (twoGeneralsAnswer) { - case "YES" -> this.numGenerals = 2; - case "NO" -> { - this.numGenerals = 1; - out.println(); - out.println("YOU ARE THE CONFEDERACY. GOOD LUCK!"); - out.println(); - } - default -> { - // FIXME Retry! - } + if (isYes(inputString(YES_NO_CHECKER, YES_NO_REMINDER))) { + this.numGenerals = 2; + } else { + this.numGenerals = 1; + out.println(); + out.println("YOU ARE THE CONFEDERACY. GOOD LUCK!"); + out.println(); } out.println("SELECT A BATTLE BY TYPING A NUMBER FROM 1 TO 14 ON"); @@ -101,9 +94,8 @@ public class CivilWar { out.println(); out.print("AFTER REQUESTING A BATTLE, DO YOU WISH BATTLE DESCRIPTIONS (ANSWER YES OR NO)? "); - String descriptionsAnswer = terminalInput.nextLine(); - this.wantBattleDescriptions = descriptionsAnswer.equals("YES"); - // FIXME Retry if not "YES" or "NO" + + this.wantBattleDescriptions = isYes(inputString(YES_NO_CHECKER, YES_NO_REMINDER)); while (true) { var battle = startBattle(); @@ -584,6 +576,34 @@ public class CivilWar { return rightAlignInt((int) Math.floor(number)); } + private static String inputString(Predicate validator, String reminder) { + var terminalInput = new Scanner(System.in); + + while (true) { + var input = terminalInput.nextLine(); + if (validator.test(input)) { + return input; + } + System.out.println(reminder); + } + } + + private static boolean isYes(String s) { + if (s == null) { + return false; + } + var uppercase = s.toUpperCase(); + return uppercase.equals("Y") || uppercase.equals("YES"); + } + + private static boolean isNo(String s) { + if (s == null) { + return false; + } + var uppercase = s.toUpperCase(); + return uppercase.equals("N") || uppercase.equals("NO"); + } + private static class BattleState { private final HistoricalDatum data; private double F1; From 5fd48d9f0ed8bb448f636ce9b2b723ea0e59fc44 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Sat, 15 Jan 2022 22:17:29 +0200 Subject: [PATCH 05/82] Add all .vs folders in hierarchy to gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3412076c..078ff6f9 100644 --- a/.gitignore +++ b/.gitignore @@ -31,5 +31,4 @@ out/ Pipfile .DS_Store -/.vs/basic-computer-games/v16 -/.vs +.vs/ From f5dca91fa33d54a10222e1a8cc14adf7339d2b0f Mon Sep 17 00:00:00 2001 From: Mark Wieder Date: Sat, 15 Jan 2022 13:16:28 -0800 Subject: [PATCH 06/82] Cube in ruby --- 30_Cube/ruby/cube.rb | 261 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 30_Cube/ruby/cube.rb diff --git a/30_Cube/ruby/cube.rb b/30_Cube/ruby/cube.rb new file mode 100644 index 00000000..a881986e --- /dev/null +++ b/30_Cube/ruby/cube.rb @@ -0,0 +1,261 @@ +$landmines = Array.new + +$currentLocation = "111" + +$standings = 500 # starting amount + +def getYesOrNoResponseTo prompt + print prompt + # strip leading and trailing whitespace from entry + yesno = gets.strip.upcase[0] + yesno == "Y" +end + +def greeting + puts "CUBE".center(80) + puts "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY".center(80) + puts "\n\n\n" + response = getYesOrNoResponseTo "Do you want to see the INSTRUCTIONS?" + if response + puts "This is a game in which you will be playing against the" + puts "random decision of the computer. The field of play is a" + puts "cube of size 3. Any of your 27 locations can be designated" + puts "by inputting three numbers such as 231." + puts "At the start you are automatically at location 1,1,1.\n" + puts "The object of the game is to get to location 3,3,3.\n" + + puts "\nONE MINOR DETAIL:" + puts "The computer will pick five random locations at which it will" + puts "plant land mines. if you hit one of these locations you lose.\n" + + puts "\nONE OTHER DETAIL:" + puts "You may move only one space in one direction each move." + puts "For example: from 1,1,2 you may move to 2,1,2 or 1,1,3." + puts "You may not change more than one number on the same move." + puts "If you make an illegal move, you lose and the computer takes" + puts "the money you may have bet on that round." + puts "" + puts "When stating the amount of a wager, enter only the number" + puts "of dollars (example: 250) You are automatically started with" + puts "500 dollars in your account." + puts + puts "Good luck!" + end +end + +def landMindStringFrom x, y, z + landMine = x.to_s + y.to_s + z.to_s + return landMine +end + +def assignLandMines + $landmines.clear + + # put five unique entries into the landmines array + while $landmines.size < 5 do + a = rand(3)+1 + b = rand(3)+1 + c = rand(3)+1 + landmine = landMindStringFrom(a, b, c) + if !$landmines.include?(landmine) && landmine != "333" +# puts landmine # debugging + $landmines.push landmine + end + end + $currentLocation = "111" +end + +def initializePot + $standings = 500 # starting amount +end + +def startGame + assignLandMines + displayStandings + response = getYesOrNoResponseTo "WANT TO MAKE A WAGER? " + if response + print "HOW MUCH? " + while true do + wager = gets.strip.tr('^0-9', '').to_i + if $standings < wager + puts "TRIED TO FOOL ME; BET AGAIN "; + else + break + end + end + else + wager = 0 + end + + # start at location 1,1,1 + $currentLocation = "111" + return wager +end + +def goodbye + puts "TOUGH LUCK!" + puts "" + puts "GOODBYE." + exit +end + +def bust + puts "YOU BUST." + goodbye +end + +def tryAgain + again = getYesOrNoResponseTo "WANT TO TRY AGAIN? " + if not again + exit + end +end + +def isLegalMove? newLocation + # test for illegal moves + # can only change one variable per move + # newLocation is the proposed new position + # can only move one space from the current position + + moveX = newLocation[0].to_i + moveY = newLocation[1].to_i + moveZ = newLocation[2].to_i + + # currentX, currentY, currentZ contains the current position + currentX = $currentLocation[0].to_i + currentY = $currentLocation[1].to_i + currentZ = $currentLocation[2].to_i + + isLegalMove = true + errorString = "" + # ensure we're not moving off the cube + if not (moveX.between?(1,3) && moveY.between?(1,3) && moveZ.between?(1,3)) + errorString = "You moved off the cube!" + return errorString + end + + # test for only one move from current position + if not moveX.between?(currentX-1,currentX+1) + isLegalMove = false + end + if not moveY.between?(currentY-1,currentY+1) + isLegalMove = false + end + if not moveZ.between?(currentZ-1,currentZ+1) + isLegalMove = false + end + if not isLegalMove + errorString = "You've gone too far" + end + + # only allow change to one variable at a time + if isLegalMove + if moveX != currentX + if moveY != currentY or moveZ != currentZ + isLegalMove = false + end + end + if moveY != currentY + if moveX != currentX or moveZ != currentZ + isLegalMove = false + end + end + if moveZ != currentZ + if moveY != currentY or moveX != currentX + isLegalMove = false + end + end + if not isLegalMove + errorString = "You made too many changes" + end + end + + return errorString +end + +def displayStandings + print "You now have " + $standings.to_s + if $standings > 1 + puts " dollars" + else + puts " dollar" + end +end + +def didWin? location + location == "333" +end + +def youWin amount + $standings += amount + puts "*** You win " + amount.to_s + " dollars! ***\n\n" + displayStandings + tryAgain + assignLandMines + puts "*** new cube ***" + puts "different landmine locations" + puts "starting over at location 111" +end + +def youLose amount + # subtract the bet amount from the standings + if amount > 0 + puts "You lose " + amount.to_s + " dollars!\n\n" + $standings -= amount + end + if $standings <= 0 + # no money left, so end the game + bust + else + displayStandings + end + tryAgain + $currentLocation = "111" + puts "starting over at location 111" +end + +def landMine betAmount + puts "******BANG******" + puts "You hit a land mine at " + $currentLocation + "!" + youLose betAmount +end + +def gameLoop betAmount + while true do + puts "" + print "IT'S YOUR MOVE: " + # allow only integers: strip anything else from input + moveToLocation = gets.strip.tr('^0-9', '') + + # test for illegal moves + # can only change one variable per move + # moveToLocation is the proposed new position + + error = isLegalMove?(moveToLocation) + if error == "" + # assign the new position + $currentLocation = moveToLocation + + # test for win + if didWin?(moveToLocation) + youWin betAmount + end + + # haven't won yet, test the land mines + if $landmines.include? moveToLocation + landMine betAmount + end + + else + puts "Illegal move: " + error + youLose betAmount + end + + end +end + + +greeting +initializePot +gameLoop startGame + From 944a63215e9557c4dde5e88ff0c28bd840c0cb72 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sat, 15 Jan 2022 22:11:45 +0000 Subject: [PATCH 07/82] Improve encapsulation --- 27_Civil_War/java/src/CivilWar.java | 117 +++++++++++++++------------- 1 file changed, 65 insertions(+), 52 deletions(-) diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index bdf1bff6..ea667890 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -13,15 +13,9 @@ public class CivilWar { private final List data; private BattleState currentBattle; - private int R1; - private int R2; private final int[] strategies; private int numGenerals; - private final int[] B; - private final int[] F; - private final int[] H; - private final int[] D; - private final double[] O; + private final ArmyPair resources; private int battleNumber; private int Y; private int Y2; @@ -31,10 +25,9 @@ public class CivilWar { private int excessiveUnionLosses; private int L; private int W; - private int M3; - private int M4; - private int Q1; - private int Q2; + private final ArmyPair revenue; + private final ArmyPair totalExpenditure; + private final ArmyPair totalTroops; private double C6; private double E2; private int W0; @@ -42,8 +35,7 @@ public class CivilWar { private int unionTroops; // M6 private boolean confedSurrender; private boolean unionSurrender; - private int I1; - private int I2; + private final ArmyPair inflation; private double R; private boolean wantBattleDescriptions; @@ -152,21 +144,21 @@ public class CivilWar { // INFLATION CALC // REM - ONLY IN PRINTOUT IS CONFED INFLATION = I1+15% - I1 = 10 + (L - W) * 2; - I2 = 10 + (W - L) * 2; + inflation.confederate = 10 + (L - W) * 2; + inflation.union = 10 + (W - L) * 2; // MONEY AVAILABLE - this.D[0] = 100 * (int) Math.floor((battle.troops.confederate * (100.0 - I1) / 2000) * (1 + (R1 - Q1) / (R1 + 1.0)) + .5); + resources.confederate.budget = 100 * (int) Math.floor((battle.troops.confederate * (100.0 - inflation.confederate) / 2000) * (1 + (revenue.confederate - totalExpenditure.confederate) / (revenue.confederate + 1.0)) + .5); // MEN AVAILABLE - this.confedTroops = (int) Math.floor(battle.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (M3 + 1.0))); - this.unionTroops = (int) Math.floor(battle.troops.union * (1 + (totalExpectedCasualties.union - totalCasualties.union) / (M4 + 1.0))); + this.confedTroops = (int) Math.floor(battle.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (totalTroops.confederate + 1.0))); + this.unionTroops = (int) Math.floor(battle.troops.union * (1 + (totalExpectedCasualties.union - totalCasualties.union) / (totalTroops.union + 1.0))); battleState.F1 = 5 * battle.troops.confederate / 6.0; if (this.numGenerals == 2) { - this.D[1] = 100 * (int) Math.floor((battle.troops.union * (100.0 - I2) / 2000) * (1 + (R2 - Q2) / (R2 + 1.0)) + .5); + resources.union.budget = 100 * (int) Math.floor((battle.troops.union * (100.0 - inflation.union) / 2000) * (1 + (revenue.union - totalExpenditure.union) / (revenue.union + 1.0)) + .5); } else { - this.D[1] = 100 * (int) Math.floor(battle.troops.union * (100.0 - I2) / 2000 + .5); + resources.union.budget = 100 * (int) Math.floor(battle.troops.union * (100.0 - inflation.union) / 2000 + .5); } out.println(); @@ -185,8 +177,8 @@ public class CivilWar { out.println(); out.println(" CONFEDERACY UNION"); out.println("MEN " + confedTroops + " " + unionTroops); - out.println("MONEY $ " + this.D[0] + " $ " + this.D[1]); - out.println("INFLATION " + (I1 + 15) + "% " + I2 + "%"); + out.println("MONEY $ " + resources.confederate.budget + " $ " + resources.union.budget); + out.println("INFLATION " + (inflation.confederate + 15) + "% " + inflation.union + "%"); // ONLY IN PRINTOUT IS CONFED INFLATION = I1+15% // IF TWO GENERALS, INPUT CONFED. FIRST @@ -194,32 +186,36 @@ public class CivilWar { for (int i = 0; i < numGenerals; i++) { out.println(); + ArmyResources currentResources; + if (this.numGenerals == 1 || i == 0) { out.print("CONFEDERATE GENERAL --- "); + currentResources = resources.confederate; } else { out.print("UNION GENERAL --- "); + currentResources = resources.union; } out.println("HOW MUCH DO YOU WISH TO SPEND FOR"); out.print("- FOOD...... ? "); var F = terminalInput.nextInt(); if (F == 0) { - if (this.R1 != 0) { + if (this.revenue.confederate != 0) { out.println("ASSUME YOU WANT TO KEEP SAME ALLOCATIONS"); out.println(); } } - this.F[i] = F; + currentResources.food = F; out.print("- SALARIES.. ? "); - this.H[i] = terminalInput.nextInt(); + currentResources.salaries = terminalInput.nextInt(); out.print("- AMMUNITION ? "); - this.B[i] = terminalInput.nextInt(); // FIXME Retry if -ve + currentResources.ammunition = terminalInput.nextInt(); // FIXME Retry if -ve - if (this.F[i] + this.H[i] + this.B[i] > this.D[i]) { - out.println("THINK AGAIN! YOU HAVE ONLY $" + this.D[i]); + if (currentResources.getTotal() > currentResources.budget) { + out.println("THINK AGAIN! YOU HAVE ONLY $" + currentResources.budget); // FIXME Redo inputs from Food } } @@ -237,17 +233,21 @@ public class CivilWar { private String moraleForArmy(BattleState battleState, int armyIdx) { var builder = new StringBuilder(); + ArmyResources currentResources; + if (this.numGenerals == 1 || armyIdx == 0) { builder.append("CONFEDERATE "); + currentResources = resources.confederate; } else { builder.append("UNION "); + currentResources = resources.union; } // FIND MORALE - this.O[armyIdx] = (2 * Math.pow(F[armyIdx], 2) + Math.pow(H[armyIdx], 2)) / Math.pow(battleState.F1, 2) + 1; - if (this.O[armyIdx] >= 10) { + currentResources.morale = (2 * Math.pow(currentResources.food, 2) + Math.pow(currentResources.salaries, 2)) / Math.pow(battleState.F1, 2) + 1; + if (currentResources.morale >= 10) { builder.append("MORALE IS HIGH"); - } else if (this.O[armyIdx] >= 5) { + } else if (currentResources.morale >= 5) { builder.append("MORALE IS FAIR"); } else { builder.append("MORALE IS POOR"); @@ -295,10 +295,10 @@ public class CivilWar { // 2070 REM : SIMULATED LOSSES-NORTH private void simulatedLosses(HistoricalDatum battle) { C6 = (2.0 * battle.expectedCasualties.union / 5) * (1 + 1.0 / (2 * (Math.abs(Y2 - Y) + 1))); - C6 = C6 * (1.28 + (5.0 * battle.troops.union / 6) / (B[1] + 1)); - C6 = Math.floor(C6 * (1 + 1 / O[1]) + 0.5); + C6 = C6 * (1.28 + (5.0 * battle.troops.union / 6) / (resources.union.ammunition + 1)); + C6 = Math.floor(C6 * (1 + 1 / resources.union.morale) + 0.5); // IF LOSS > MEN PRESENT, RESCALE LOSSES - E2 = 100 / O[1]; + E2 = 100 / resources.union.morale; if (Math.floor(C6 + E2) >= unionTroops) { C6 = Math.floor(13.0 * unionTroops / 20); E2 = 7 * C6 / 13; @@ -313,11 +313,11 @@ public class CivilWar { out.println(" CONFEDERACY UNION"); var C5 = (2 * battle.data.expectedCasualties.confederate / 5) * (1 + 1.0 / (2 * (Math.abs(Y2 - Y) + 1))); - C5 = (int) Math.floor(C5 * (1 + 1.0 / this.O[0]) * (1.28 + battle.F1 / (this.B[0] + 1.0)) + .5); - var E = 100 / O[0]; + C5 = (int) Math.floor(C5 * (1 + 1.0 / resources.confederate.morale) * (1.28 + battle.F1 / (resources.confederate.ammunition + 1.0)) + .5); + var E = 100 / resources.confederate.morale; - if (C5 + 100 / O[0] >= battle.data.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (M3 + 1.0))) { - C5 = (int) Math.floor(13.0 * battle.data.troops.confederate / 20 * (1 + (totalExpectedCasualties.union - totalCasualties.confederate) / (M3 + 1.0))); + if (C5 + 100 / resources.confederate.morale >= battle.data.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (totalTroops.confederate + 1.0))) { + C5 = (int) Math.floor(13.0 * battle.data.troops.confederate / 20 * (1 + (totalExpectedCasualties.union - totalCasualties.confederate) / (totalTroops.confederate + 1.0))); E = 7 * C5 / 13.0; excessiveConfederateLosses = 1; } @@ -326,7 +326,7 @@ public class CivilWar { if (this.numGenerals == 1) { C6 = (int) Math.floor(17.0 * battle.data.expectedCasualties.union * battle.data.expectedCasualties.confederate / (C5 * 20)); - E2 = 5 * O[0]; + E2 = 5 * resources.confederate.morale; } out.println("CASUALTIES: " + rightAlignInt(C5) + " " + rightAlignInt(C6)); @@ -379,12 +379,12 @@ public class CivilWar { totalCasualties.union += (int) (C6 + E2); totalExpectedCasualties.confederate += battle.data.expectedCasualties.confederate; totalExpectedCasualties.union += battle.data.expectedCasualties.union; - Q1 += F[0] + H[0] + B[0]; - Q2 += F[1] + H[1] + B[1]; - R1 += battle.data.troops.confederate * (100 - I1) / 20; - R2 += battle.data.troops.union * (100 - I2) / 20; - M3 += battle.data.troops.confederate; - M4 += battle.data.troops.union; + totalExpenditure.confederate += resources.confederate.getTotal(); + totalExpenditure.union += resources.union.getTotal(); + revenue.confederate += battle.data.troops.confederate * (100 - inflation.confederate) / 20; + revenue.union += battle.data.troops.union * (100 - inflation.union) / 20; + totalTroops.confederate += battle.data.troops.confederate; + totalTroops.union += battle.data.troops.union; updateStrategies(this.Y); } @@ -420,7 +420,6 @@ public class CivilWar { // FIXME 2960 IF R1=0 THEN 3100 out.println("FOR THE " + (W + L + W0) + " BATTLES FOUGHT (EXCLUDING RERUNS)"); -// out.println(" ", " ", " "); out.println(" CONFEDERACY UNION"); out.println("HISTORICAL LOSSES " + (int) Math.floor(totalExpectedCasualties.confederate + .5) + " " + (int) Math.floor(totalExpectedCasualties.union + .5)); out.println("SIMULATED LOSSES " + (int) Math.floor(totalCasualties.confederate + .5) + " " + (int) Math.floor(totalCasualties.union + .5)); @@ -494,16 +493,17 @@ public class CivilWar { this.totalCasualties = new ArmyPair<>(0, 0); this.totalExpectedCasualties = new ArmyPair<>(0, 0); + this.totalExpenditure = new ArmyPair<>(0, 0); + this.totalTroops = new ArmyPair<>(0, 0); + + this.revenue = new ArmyPair<>(0, 0); + this.inflation = new ArmyPair<>(0, 0); + + this.resources = new ArmyPair<>(new ArmyResources(), new ArmyResources()); // UNION INFO ON LIKELY CONFEDERATE STRATEGY this.strategies = new int[]{25, 25, 25, 25}; - this.F = new int[]{0, 0}; - this.H = new int[]{0, 0}; - this.B = new int[]{0, 0}; - this.D = new int[]{0, 0}; - this.O = new double[]{0, 0}; - // READ HISTORICAL DATA. // HISTORICAL DATA...CAN ADD MORE (STRAT.,ETC) BY INSERTING DATA STATEMENTS AFTER APPRO. INFO, AND ADJUSTING READ this.data = List.of(new HistoricalDatum("BULL RUN", new ArmyPair<>(18000, 18500), new ArmyPair<>(1967, 2708), OffensiveStatus.DEFENSIVE, new String[]{"JULY 21, 1861. GEN. BEAUREGARD, COMMANDING THE SOUTH, MET", "UNION FORCES WITH GEN. MCDOWELL IN A PREMATURE BATTLE AT", "BULL RUN. GEN. JACKSON HELPED PUSH BACK THE UNION ATTACK."}), new HistoricalDatum("SHILOH", new ArmyPair<>(40000, 44894), new ArmyPair<>(10699, 13047), OffensiveStatus.OFFENSIVE, new String[]{"APRIL 6-7, 1862. THE CONFEDERATE SURPRISE ATTACK AT", "SHILOH FAILED DUE TO POOR ORGANIZATION."}), new HistoricalDatum("SEVEN DAYS", new ArmyPair<>(95000, 115000), new ArmyPair<>(20614, 15849), OffensiveStatus.OFFENSIVE, new String[]{"JUNE 25-JULY 1, 1862. GENERAL LEE (CSA) UPHELD THE", "OFFENSIVE THROUGHOUT THE BATTLE AND FORCED GEN. MCCLELLAN", "AND THE UNION FORCES AWAY FROM RICHMOND."}), new HistoricalDatum("SECOND BULL RUN", new ArmyPair<>(54000, 63000), new ArmyPair<>(10000, 14000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"AUG 29-30, 1862. THE COMBINED CONFEDERATE FORCES UNDER", " LEE", "AND JACKSON DROVE THE UNION FORCES BACK INTO WASHINGTON."}), new HistoricalDatum("ANTIETAM", new ArmyPair<>(40000, 50000), new ArmyPair<>(10000, 12000), OffensiveStatus.OFFENSIVE, new String[]{"SEPT 17, 1862. THE SOUTH FAILED TO INCORPORATE MARYLAND", "INTO THE CONFEDERACY."}), new HistoricalDatum("FREDERICKSBURG", new ArmyPair<>(75000, 120000), new ArmyPair<>(5377, 12653), OffensiveStatus.DEFENSIVE, new String[]{"DEC 13, 1862. THE CONFEDERACY UNDER LEE SUCCESSFULLY", "REPULSED AN ATTACK BY THE UNION UNDER GEN. BURNSIDE."}), new HistoricalDatum("MURFREESBORO", new ArmyPair<>(38000, 45000), new ArmyPair<>(11000, 12000), OffensiveStatus.DEFENSIVE, new String[]{"DEC 31, 1862. THE SOUTH UNDER GEN. BRAGG WON A CLOSE BATTLE."}), new HistoricalDatum("CHANCELLORSVILLE", new ArmyPair<>(32000, 90000), new ArmyPair<>(13000, 17197), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"MAY 1-6, 1863. THE SOUTH HAD A COSTLY VICTORY AND LOST", "ONE OF THEIR OUTSTANDING GENERALS, 'STONEWALL' JACKSON."}), new HistoricalDatum("VICKSBURG", new ArmyPair<>(50000, 70000), new ArmyPair<>(12000, 19000), OffensiveStatus.DEFENSIVE, new String[]{"JULY 4, 1863. VICKSBURG WAS A COSTLY DEFEAT FOR THE SOUTH", "BECAUSE IT GAVE THE UNION ACCESS TO THE MISSISSIPPI."}), new HistoricalDatum("GETTYSBURG", new ArmyPair<>(72500, 85000), new ArmyPair<>(20000, 23000), OffensiveStatus.OFFENSIVE, new String[]{"JULY 1-3, 1863. A SOUTHERN MISTAKE BY GEN. LEE AT GETTYSBURG", "COST THEM ONE OF THE MOST CRUCIAL BATTLES OF THE WAR."}), new HistoricalDatum("CHICKAMAUGA", new ArmyPair<>(66000, 60000), new ArmyPair<>(18000, 16000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"SEPT. 15, 1863. CONFUSION IN A FOREST NEAR CHICKAMAUGA LED", "TO A COSTLY SOUTHERN VICTORY."}), new HistoricalDatum("CHATTANOOGA", new ArmyPair<>(37000, 60000), new ArmyPair<>(36700, 5800), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"NOV. 25, 1863. AFTER THE SOUTH HAD SIEGED GEN. ROSENCRANS'", "ARMY FOR THREE MONTHS, GEN. GRANT BROKE THE SIEGE."}), new HistoricalDatum("SPOTSYLVANIA", new ArmyPair<>(62000, 110000), new ArmyPair<>(17723, 18000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"MAY 5, 1864. GRANT'S PLAN TO KEEP LEE ISOLATED BEGAN TO", "FAIL HERE, AND CONTINUED AT COLD HARBOR AND PETERSBURG."}), new HistoricalDatum("ATLANTA", new ArmyPair<>(65000, 100000), new ArmyPair<>(8500, 3700), OffensiveStatus.DEFENSIVE, new String[]{"AUGUST, 1864. SHERMAN AND THREE VETERAN ARMIES CONVERGED", "ON ATLANTA AND DEALT THE DEATH BLOW TO THE CONFEDERACY."})); @@ -623,6 +623,19 @@ public class CivilWar { } } + private static class ArmyResources { + private int food; + private int salaries; + private int ammunition; + private int budget; + + private double morale; // TODO really here? + + public int getTotal() { + return this.food + this.salaries + this.ammunition; + } + } + private record HistoricalDatum(String name, ArmyPair troops, ArmyPair expectedCasualties, OffensiveStatus offensiveStatus, String[] blurb) { From fbbd9a7e81c8149ca8bc4105f3093dd872a91d1f Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sat, 15 Jan 2022 22:40:17 +0000 Subject: [PATCH 08/82] Refactor --- 27_Civil_War/java/src/CivilWar.java | 103 ++++++++++++++++------------ 1 file changed, 59 insertions(+), 44 deletions(-) diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index ea667890..8e13b760 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -21,21 +21,16 @@ public class CivilWar { private int Y2; private final ArmyPair totalExpectedCasualties; private final ArmyPair totalCasualties; - private int excessiveConfederateLosses; - private int excessiveUnionLosses; - private int L; - private int W; + private boolean excessiveConfederateLosses; + private boolean excessiveUnionLosses; + private final BattleResults results; private final ArmyPair revenue; + private final ArmyPair inflation; private final ArmyPair totalExpenditure; private final ArmyPair totalTroops; - private double C6; - private double E2; - private int W0; - private int confedTroops; // M5 private int unionTroops; // M6 private boolean confedSurrender; private boolean unionSurrender; - private final ArmyPair inflation; private double R; private boolean wantBattleDescriptions; @@ -101,7 +96,6 @@ public class CivilWar { unionStrategy(); - simulatedLosses(battle.data); calcLosses(battle); reset(); @@ -140,18 +134,18 @@ public class CivilWar { var battleState = new BattleState(battle); - excessiveConfederateLosses = 0; + excessiveConfederateLosses = false; // INFLATION CALC // REM - ONLY IN PRINTOUT IS CONFED INFLATION = I1+15% - inflation.confederate = 10 + (L - W) * 2; - inflation.union = 10 + (W - L) * 2; + inflation.confederate = 10 + (results.union - results.confederate) * 2; + inflation.union = 10 + (results.confederate - results.union) * 2; // MONEY AVAILABLE resources.confederate.budget = 100 * (int) Math.floor((battle.troops.confederate * (100.0 - inflation.confederate) / 2000) * (1 + (revenue.confederate - totalExpenditure.confederate) / (revenue.confederate + 1.0)) + .5); // MEN AVAILABLE - this.confedTroops = (int) Math.floor(battle.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (totalTroops.confederate + 1.0))); + var confedTroops = (int) Math.floor(battle.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (totalTroops.confederate + 1.0))); this.unionTroops = (int) Math.floor(battle.troops.union * (1 + (totalExpectedCasualties.union - totalCasualties.union) / (totalTroops.union + 1.0))); battleState.F1 = 5 * battle.troops.confederate / 6.0; @@ -293,17 +287,20 @@ public class CivilWar { } // 2070 REM : SIMULATED LOSSES-NORTH - private void simulatedLosses(HistoricalDatum battle) { - C6 = (2.0 * battle.expectedCasualties.union / 5) * (1 + 1.0 / (2 * (Math.abs(Y2 - Y) + 1))); - C6 = C6 * (1.28 + (5.0 * battle.troops.union / 6) / (resources.union.ammunition + 1)); - C6 = Math.floor(C6 * (1 + 1 / resources.union.morale) + 0.5); + private UnionLosses simulateUnionLosses(HistoricalDatum battle) { + var losses = (2.0 * battle.expectedCasualties.union / 5) * (1 + 1.0 / (2 * (Math.abs(Y2 - Y) + 1))); + losses = losses * (1.28 + (5.0 * battle.troops.union / 6) / (resources.union.ammunition + 1)); + losses = Math.floor(losses * (1 + 1 / resources.union.morale) + 0.5); // IF LOSS > MEN PRESENT, RESCALE LOSSES - E2 = 100 / resources.union.morale; - if (Math.floor(C6 + E2) >= unionTroops) { - C6 = Math.floor(13.0 * unionTroops / 20); - E2 = 7 * C6 / 13; - excessiveUnionLosses = 1; + var moraleFactor = 100 / resources.union.morale; + + if (Math.floor(losses + moraleFactor) >= unionTroops) { + losses = Math.floor(13.0 * unionTroops / 20); + moraleFactor = 7 * losses / 13; + excessiveUnionLosses = true; } + + return new UnionLosses((int) losses, (int) Math.floor(moraleFactor)); } // 2170: CALCULATE SIMULATED LOSSES @@ -319,41 +316,44 @@ public class CivilWar { if (C5 + 100 / resources.confederate.morale >= battle.data.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (totalTroops.confederate + 1.0))) { C5 = (int) Math.floor(13.0 * battle.data.troops.confederate / 20 * (1 + (totalExpectedCasualties.union - totalCasualties.confederate) / (totalTroops.confederate + 1.0))); E = 7 * C5 / 13.0; - excessiveConfederateLosses = 1; + excessiveConfederateLosses = true; } ///// 2270 + final UnionLosses unionLosses; + if (this.numGenerals == 1) { - C6 = (int) Math.floor(17.0 * battle.data.expectedCasualties.union * battle.data.expectedCasualties.confederate / (C5 * 20)); - E2 = 5 * resources.confederate.morale; + unionLosses = new UnionLosses((int) Math.floor(17.0 * battle.data.expectedCasualties.union * battle.data.expectedCasualties.confederate / (C5 * 20)), (int) Math.floor(5 * resources.confederate.morale)); + } else { + unionLosses = simulateUnionLosses(battle.data); } - out.println("CASUALTIES: " + rightAlignInt(C5) + " " + rightAlignInt(C6)); - out.println("DESERTIONS: " + rightAlignInt(E) + " " + rightAlignInt(E2)); + out.println("CASUALTIES: " + rightAlignInt(C5) + " " + rightAlignInt(unionLosses.losses)); + out.println("DESERTIONS: " + rightAlignInt(E) + " " + rightAlignInt(unionLosses.desertions)); out.println(); if (numGenerals == 2) { out.println("COMPARED TO THE ACTUAL CASUALTIES AT " + battle.data.name); out.println("CONFEDERATE: " + (int) Math.floor(100 * (C5 / (double) battle.data.expectedCasualties.confederate) + 0.5) + " % OF THE ORIGINAL"); - out.println("UNION: " + (int) Math.floor(100 * (C6 / (double) battle.data.expectedCasualties.union) + 0.5) + " % OF THE ORIGINAL"); + out.println("UNION: " + (int) Math.floor(100 * (unionLosses.losses / (double) battle.data.expectedCasualties.union) + 0.5) + " % OF THE ORIGINAL"); out.println(); // REM - 1 WHO WON - var winner = findWinner(C5 + E, C6 + E2); + var winner = findWinner(C5 + E, unionLosses.losses + unionLosses.desertions); switch (winner) { case UNION -> { out.println("THE UNION WINS " + battle.data.name); - L++; + results.union++; } case CONFED -> { out.println("THE CONFEDERACY WINS " + battle.data.name); - W++; + results.confederate++; } case INDECISIVE -> { out.println("BATTLE OUTCOME UNRESOLVED"); - this.W0++; + results.indeterminate++; } } } else { @@ -361,22 +361,22 @@ public class CivilWar { // FIND WHO WON - if (excessiveConfederateLosses == 1) { + if (excessiveConfederateLosses) { out.println("YOU LOSE " + battle.data.name); if (this.battleNumber != 0) { - L++; + results.union++; } } else { out.println("YOU WIN " + battle.data.name); // CUMULATIVE BATTLE FACTORS WHICH ALTER HISTORICAL RESOURCES AVAILABLE.IF A REPLAY DON'T UPDATE. - W++; + results.confederate++; } } if (this.battleNumber != 0) { totalCasualties.confederate += (int) (C5 + E); - totalCasualties.union += (int) (C6 + E2); + totalCasualties.union += unionLosses.losses + unionLosses.desertions; totalExpectedCasualties.confederate += battle.data.expectedCasualties.confederate; totalExpectedCasualties.union += battle.data.expectedCasualties.union; totalExpenditure.confederate += resources.confederate.getTotal(); @@ -392,7 +392,7 @@ public class CivilWar { // 2790 private void reset() { - excessiveConfederateLosses = excessiveUnionLosses = 0; + excessiveConfederateLosses = excessiveUnionLosses = false; out.println("---------------"); } @@ -405,13 +405,13 @@ public class CivilWar { out.println(); out.println(); out.println(); - out.println("THE CONFEDERACY HAS WON " + this.W + " BATTLES AND LOST " + this.L); + out.println("THE CONFEDERACY HAS WON " + results.confederate + " BATTLES AND LOST " + results.union); if (this.Y2 == 5) { out.println("THE CONFEDERACY HAS WON THE WAR"); } - if (this.Y == 5 || this.W <= this.L) { + if (this.Y == 5 || results.confederate <= results.union) { out.println("THE UNION HAS WON THE WAR"); } @@ -419,7 +419,7 @@ public class CivilWar { // FIXME 2960 IF R1=0 THEN 3100 - out.println("FOR THE " + (W + L + W0) + " BATTLES FOUGHT (EXCLUDING RERUNS)"); + out.println("FOR THE " + results.getTotal() + " BATTLES FOUGHT (EXCLUDING RERUNS)"); out.println(" CONFEDERACY UNION"); out.println("HISTORICAL LOSSES " + (int) Math.floor(totalExpectedCasualties.confederate + .5) + " " + (int) Math.floor(totalExpectedCasualties.union + .5)); out.println("SIMULATED LOSSES " + (int) Math.floor(totalCasualties.confederate + .5) + " " + (int) Math.floor(totalCasualties.union + .5)); @@ -435,15 +435,15 @@ public class CivilWar { } private Winner findWinner(double confLosses, double unionLosses) { - if (this.excessiveConfederateLosses == 1 && this.excessiveUnionLosses == 1) { + if (this.excessiveConfederateLosses && this.excessiveUnionLosses) { return Winner.INDECISIVE; } - if (this.excessiveConfederateLosses == 1) { + if (this.excessiveConfederateLosses) { return Winner.UNION; } - if (this.excessiveUnionLosses == 1 || confLosses < unionLosses) { + if (this.excessiveUnionLosses || confLosses < unionLosses) { return Winner.CONFED; } @@ -491,6 +491,8 @@ public class CivilWar { public CivilWar(PrintStream out) { this.out = out; + this.results = new BattleResults(); + this.totalCasualties = new ArmyPair<>(0, 0); this.totalExpectedCasualties = new ArmyPair<>(0, 0); this.totalExpenditure = new ArmyPair<>(0, 0); @@ -623,6 +625,16 @@ public class CivilWar { } } + private static class BattleResults { + private int confederate; + private int union; + private int indeterminate; + + public int getTotal() { + return confederate + union + indeterminate; + } + } + private static class ArmyResources { private int food; private int salaries; @@ -640,4 +652,7 @@ public class CivilWar { ArmyPair expectedCasualties, OffensiveStatus offensiveStatus, String[] blurb) { } + + private record UnionLosses(int losses, int desertions) { + } } \ No newline at end of file From 2bd4be3291dc96a5850d2030d82eca0087899049 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sat, 15 Jan 2022 22:43:28 +0000 Subject: [PATCH 09/82] Make more readable --- 27_Civil_War/java/src/CivilWar.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index 8e13b760..ad909f2c 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -508,7 +508,22 @@ public class CivilWar { // READ HISTORICAL DATA. // HISTORICAL DATA...CAN ADD MORE (STRAT.,ETC) BY INSERTING DATA STATEMENTS AFTER APPRO. INFO, AND ADJUSTING READ - this.data = List.of(new HistoricalDatum("BULL RUN", new ArmyPair<>(18000, 18500), new ArmyPair<>(1967, 2708), OffensiveStatus.DEFENSIVE, new String[]{"JULY 21, 1861. GEN. BEAUREGARD, COMMANDING THE SOUTH, MET", "UNION FORCES WITH GEN. MCDOWELL IN A PREMATURE BATTLE AT", "BULL RUN. GEN. JACKSON HELPED PUSH BACK THE UNION ATTACK."}), new HistoricalDatum("SHILOH", new ArmyPair<>(40000, 44894), new ArmyPair<>(10699, 13047), OffensiveStatus.OFFENSIVE, new String[]{"APRIL 6-7, 1862. THE CONFEDERATE SURPRISE ATTACK AT", "SHILOH FAILED DUE TO POOR ORGANIZATION."}), new HistoricalDatum("SEVEN DAYS", new ArmyPair<>(95000, 115000), new ArmyPair<>(20614, 15849), OffensiveStatus.OFFENSIVE, new String[]{"JUNE 25-JULY 1, 1862. GENERAL LEE (CSA) UPHELD THE", "OFFENSIVE THROUGHOUT THE BATTLE AND FORCED GEN. MCCLELLAN", "AND THE UNION FORCES AWAY FROM RICHMOND."}), new HistoricalDatum("SECOND BULL RUN", new ArmyPair<>(54000, 63000), new ArmyPair<>(10000, 14000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"AUG 29-30, 1862. THE COMBINED CONFEDERATE FORCES UNDER", " LEE", "AND JACKSON DROVE THE UNION FORCES BACK INTO WASHINGTON."}), new HistoricalDatum("ANTIETAM", new ArmyPair<>(40000, 50000), new ArmyPair<>(10000, 12000), OffensiveStatus.OFFENSIVE, new String[]{"SEPT 17, 1862. THE SOUTH FAILED TO INCORPORATE MARYLAND", "INTO THE CONFEDERACY."}), new HistoricalDatum("FREDERICKSBURG", new ArmyPair<>(75000, 120000), new ArmyPair<>(5377, 12653), OffensiveStatus.DEFENSIVE, new String[]{"DEC 13, 1862. THE CONFEDERACY UNDER LEE SUCCESSFULLY", "REPULSED AN ATTACK BY THE UNION UNDER GEN. BURNSIDE."}), new HistoricalDatum("MURFREESBORO", new ArmyPair<>(38000, 45000), new ArmyPair<>(11000, 12000), OffensiveStatus.DEFENSIVE, new String[]{"DEC 31, 1862. THE SOUTH UNDER GEN. BRAGG WON A CLOSE BATTLE."}), new HistoricalDatum("CHANCELLORSVILLE", new ArmyPair<>(32000, 90000), new ArmyPair<>(13000, 17197), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"MAY 1-6, 1863. THE SOUTH HAD A COSTLY VICTORY AND LOST", "ONE OF THEIR OUTSTANDING GENERALS, 'STONEWALL' JACKSON."}), new HistoricalDatum("VICKSBURG", new ArmyPair<>(50000, 70000), new ArmyPair<>(12000, 19000), OffensiveStatus.DEFENSIVE, new String[]{"JULY 4, 1863. VICKSBURG WAS A COSTLY DEFEAT FOR THE SOUTH", "BECAUSE IT GAVE THE UNION ACCESS TO THE MISSISSIPPI."}), new HistoricalDatum("GETTYSBURG", new ArmyPair<>(72500, 85000), new ArmyPair<>(20000, 23000), OffensiveStatus.OFFENSIVE, new String[]{"JULY 1-3, 1863. A SOUTHERN MISTAKE BY GEN. LEE AT GETTYSBURG", "COST THEM ONE OF THE MOST CRUCIAL BATTLES OF THE WAR."}), new HistoricalDatum("CHICKAMAUGA", new ArmyPair<>(66000, 60000), new ArmyPair<>(18000, 16000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"SEPT. 15, 1863. CONFUSION IN A FOREST NEAR CHICKAMAUGA LED", "TO A COSTLY SOUTHERN VICTORY."}), new HistoricalDatum("CHATTANOOGA", new ArmyPair<>(37000, 60000), new ArmyPair<>(36700, 5800), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"NOV. 25, 1863. AFTER THE SOUTH HAD SIEGED GEN. ROSENCRANS'", "ARMY FOR THREE MONTHS, GEN. GRANT BROKE THE SIEGE."}), new HistoricalDatum("SPOTSYLVANIA", new ArmyPair<>(62000, 110000), new ArmyPair<>(17723, 18000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"MAY 5, 1864. GRANT'S PLAN TO KEEP LEE ISOLATED BEGAN TO", "FAIL HERE, AND CONTINUED AT COLD HARBOR AND PETERSBURG."}), new HistoricalDatum("ATLANTA", new ArmyPair<>(65000, 100000), new ArmyPair<>(8500, 3700), OffensiveStatus.DEFENSIVE, new String[]{"AUGUST, 1864. SHERMAN AND THREE VETERAN ARMIES CONVERGED", "ON ATLANTA AND DEALT THE DEATH BLOW TO THE CONFEDERACY."})); + this.data = List.of( + new HistoricalDatum("BULL RUN", new ArmyPair<>(18000, 18500), new ArmyPair<>(1967, 2708), OffensiveStatus.DEFENSIVE, new String[]{"JULY 21, 1861. GEN. BEAUREGARD, COMMANDING THE SOUTH, MET", "UNION FORCES WITH GEN. MCDOWELL IN A PREMATURE BATTLE AT", "BULL RUN. GEN. JACKSON HELPED PUSH BACK THE UNION ATTACK."}), + new HistoricalDatum("SHILOH", new ArmyPair<>(40000, 44894), new ArmyPair<>(10699, 13047), OffensiveStatus.OFFENSIVE, new String[]{"APRIL 6-7, 1862. THE CONFEDERATE SURPRISE ATTACK AT", "SHILOH FAILED DUE TO POOR ORGANIZATION."}), + new HistoricalDatum("SEVEN DAYS", new ArmyPair<>(95000, 115000), new ArmyPair<>(20614, 15849), OffensiveStatus.OFFENSIVE, new String[]{"JUNE 25-JULY 1, 1862. GENERAL LEE (CSA) UPHELD THE", "OFFENSIVE THROUGHOUT THE BATTLE AND FORCED GEN. MCCLELLAN", "AND THE UNION FORCES AWAY FROM RICHMOND."}), + new HistoricalDatum("SECOND BULL RUN", new ArmyPair<>(54000, 63000), new ArmyPair<>(10000, 14000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"AUG 29-30, 1862. THE COMBINED CONFEDERATE FORCES UNDER", " LEE", "AND JACKSON DROVE THE UNION FORCES BACK INTO WASHINGTON."}), + new HistoricalDatum("ANTIETAM", new ArmyPair<>(40000, 50000), new ArmyPair<>(10000, 12000), OffensiveStatus.OFFENSIVE, new String[]{"SEPT 17, 1862. THE SOUTH FAILED TO INCORPORATE MARYLAND", "INTO THE CONFEDERACY."}), + new HistoricalDatum("FREDERICKSBURG", new ArmyPair<>(75000, 120000), new ArmyPair<>(5377, 12653), OffensiveStatus.DEFENSIVE, new String[]{"DEC 13, 1862. THE CONFEDERACY UNDER LEE SUCCESSFULLY", "REPULSED AN ATTACK BY THE UNION UNDER GEN. BURNSIDE."}), + new HistoricalDatum("MURFREESBORO", new ArmyPair<>(38000, 45000), new ArmyPair<>(11000, 12000), OffensiveStatus.DEFENSIVE, new String[]{"DEC 31, 1862. THE SOUTH UNDER GEN. BRAGG WON A CLOSE BATTLE."}), + new HistoricalDatum("CHANCELLORSVILLE", new ArmyPair<>(32000, 90000), new ArmyPair<>(13000, 17197), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"MAY 1-6, 1863. THE SOUTH HAD A COSTLY VICTORY AND LOST", "ONE OF THEIR OUTSTANDING GENERALS, 'STONEWALL' JACKSON."}), + new HistoricalDatum("VICKSBURG", new ArmyPair<>(50000, 70000), new ArmyPair<>(12000, 19000), OffensiveStatus.DEFENSIVE, new String[]{"JULY 4, 1863. VICKSBURG WAS A COSTLY DEFEAT FOR THE SOUTH", "BECAUSE IT GAVE THE UNION ACCESS TO THE MISSISSIPPI."}), + new HistoricalDatum("GETTYSBURG", new ArmyPair<>(72500, 85000), new ArmyPair<>(20000, 23000), OffensiveStatus.OFFENSIVE, new String[]{"JULY 1-3, 1863. A SOUTHERN MISTAKE BY GEN. LEE AT GETTYSBURG", "COST THEM ONE OF THE MOST CRUCIAL BATTLES OF THE WAR."}), + new HistoricalDatum("CHICKAMAUGA", new ArmyPair<>(66000, 60000), new ArmyPair<>(18000, 16000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"SEPT. 15, 1863. CONFUSION IN A FOREST NEAR CHICKAMAUGA LED", "TO A COSTLY SOUTHERN VICTORY."}), + new HistoricalDatum("CHATTANOOGA", new ArmyPair<>(37000, 60000), new ArmyPair<>(36700, 5800), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"NOV. 25, 1863. AFTER THE SOUTH HAD SIEGED GEN. ROSENCRANS'", "ARMY FOR THREE MONTHS, GEN. GRANT BROKE THE SIEGE."}), + new HistoricalDatum("SPOTSYLVANIA", new ArmyPair<>(62000, 110000), new ArmyPair<>(17723, 18000), OffensiveStatus.BOTH_OFFENSIVE, new String[]{"MAY 5, 1864. GRANT'S PLAN TO KEEP LEE ISOLATED BEGAN TO", "FAIL HERE, AND CONTINUED AT COLD HARBOR AND PETERSBURG."}), + new HistoricalDatum("ATLANTA", new ArmyPair<>(65000, 100000), new ArmyPair<>(8500, 3700), OffensiveStatus.DEFENSIVE, new String[]{"AUGUST, 1864. SHERMAN AND THREE VETERAN ARMIES CONVERGED", "ON ATLANTA AND DEALT THE DEATH BLOW TO THE CONFEDERACY."}) + ); } private void showCredits() { From 2e8050e7e6e66dac0d78543d5d9226a380e73b9c Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sat, 15 Jan 2022 22:54:13 +0000 Subject: [PATCH 10/82] Fix budget validation; restore "keep same allocations" --- 27_Civil_War/java/src/CivilWar.java | 38 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index ad909f2c..7b8d8b4c 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -190,27 +190,31 @@ public class CivilWar { currentResources = resources.union; } - out.println("HOW MUCH DO YOU WISH TO SPEND FOR"); - out.print("- FOOD...... ? "); - var F = terminalInput.nextInt(); - if (F == 0) { - if (this.revenue.confederate != 0) { - out.println("ASSUME YOU WANT TO KEEP SAME ALLOCATIONS"); - out.println(); + var validInputs = false; + while (!validInputs) { + out.println("HOW MUCH DO YOU WISH TO SPEND FOR"); + out.print("- FOOD...... ? "); + var food = terminalInput.nextInt(); + if (food == 0) { + if (this.revenue.confederate != 0) { + out.println("ASSUME YOU WANT TO KEEP SAME ALLOCATIONS"); + out.println(); + } + } else { + currentResources.food = food; } - } - currentResources.food = F; + out.print("- SALARIES.. ? "); + currentResources.salaries = terminalInput.nextInt(); - out.print("- SALARIES.. ? "); - currentResources.salaries = terminalInput.nextInt(); + out.print("- AMMUNITION ? "); + currentResources.ammunition = terminalInput.nextInt(); // FIXME Retry if -ve - out.print("- AMMUNITION ? "); - currentResources.ammunition = terminalInput.nextInt(); // FIXME Retry if -ve - - if (currentResources.getTotal() > currentResources.budget) { - out.println("THINK AGAIN! YOU HAVE ONLY $" + currentResources.budget); - // FIXME Redo inputs from Food + if (currentResources.getTotal() > currentResources.budget) { + out.println("THINK AGAIN! YOU HAVE ONLY $" + currentResources.budget); + } else { + validInputs = true; + } } } From e9823979e634c19ab1c752c5183f83c94891b7e8 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sat, 15 Jan 2022 23:34:11 +0000 Subject: [PATCH 11/82] More robust validation --- 27_Civil_War/civilwar.bas | 44 +++++++++++++++++++++++------ 27_Civil_War/java/src/CivilWar.java | 26 +++++++++++++---- 2 files changed, 57 insertions(+), 13 deletions(-) diff --git a/27_Civil_War/civilwar.bas b/27_Civil_War/civilwar.bas index f8fe9701..f9cb256b 100644 --- a/27_Civil_War/civilwar.bas +++ b/27_Civil_War/civilwar.bas @@ -172,23 +172,47 @@ 1840 PRINT 1850 REM - CHOOSE STRATEGIES 1860 IF B$ <> "YES" THEN 1910 -1870 FOR I=1 TO 2 -1880 ON I GOTO 1890,1920 + + +== 2 +1890 PRINT "CONFEDERATE STRATEGY "; +1920 INPUT Y +1930 IF ABS(Y-3)<3 THEN 1960 +1940 PRINT "STRATEGY";Y;"NOT ALLOWED." +1950 GOTO 1910 +2010 LET Y1=Y + +2020 PRINT "UNION STRATEGY "; +1920 INPUT Y +1930 IF ABS(Y-3)<3 THEN 1960 +1940 PRINT "STRATEGY";Y;"NOT ALLOWED." +1950 GOTO 1910 + + +== 1 1890 PRINT "CONFEDERATE STRATEGY "; -1900 GOTO 1920 -1910 PRINT "YOUR STRATEGY "; 1920 INPUT Y 1930 IF ABS(Y-3)<3 THEN 1960 1940 PRINT "STRATEGY";Y;"NOT ALLOWED." 1950 GOTO 1910 -1960 IF B$="YES" THEN 2000 1970 IF Y=5 THEN 2830 1980 GOSUB 3110 1990 GOTO 2170 -2000 IF I=2 THEN 2040 2010 LET Y1=Y -2020 PRINT "UNION STRATEGY "; -2030 NEXT I + +# 2020 PRINT "UNION STRATEGY "; +# 1920 INPUT Y +# 1930 IF ABS(Y-3)<3 THEN 1960 +# 1940 PRINT "STRATEGY";Y;"NOT ALLOWED." +# 1950 GOTO 1910 +# 1970 IF Y=5 THEN 2830 +# 1980 GOSUB 3110 +# 1990 GOTO 2170 + + + + + 2040 LET Y2=Y 2050 LET Y=Y1 2060 IF Y2=5 THEN 2020 @@ -298,6 +322,7 @@ 3080 PRINT S(1);S(2);S(3);S(4) 3090 REM--------------------------------- 3100 STOP + 3110 REM - UNION STRATEGY IS COMPUTER CHOSEN 3120 PRINT "UNION STRATEGY IS "; 3130 IF A <> 0 THEN 3180 @@ -318,6 +343,9 @@ 3270 LET Y2=I 3280 PRINT Y2 3290 RETURN + + + 3300 REM LEARN PRESENT STRATEGY, START FORGETTING OLD ONES 3310 REM - PRESENT STRATEGY OF SOUTH GAINS 3*S, OTHERS LOSE S 3320 REM PROBABILITY POINTS, UNLESS A STRATEGY FALLS BELOW 5%. diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index 7b8d8b4c..099a9183 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -598,17 +598,33 @@ public class CivilWar { } private static String inputString(Predicate validator, String reminder) { - var terminalInput = new Scanner(System.in); - while (true) { - var input = terminalInput.nextLine(); - if (validator.test(input)) { - return input; + try { + var input = new Scanner(System.in).nextLine(); + if (validator.test(input)) { + return input; + } + } catch (InputMismatchException e) { + // Ignore } System.out.println(reminder); } } + private static int inputInt(Predicate validator, Function reminder) { + while (true) { + try { + var input = new Scanner(System.in).nextInt(); + if (validator.test(input)) { + return input; + } + System.out.println(reminder.apply(input)); + } catch (InputMismatchException e) { + System.out.println(reminder.apply(0)); + } + } + } + private static boolean isYes(String s) { if (s == null) { return false; From c54f077e9be21dacedda5c3e360845c5e30fd4c6 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sat, 15 Jan 2022 23:46:21 +0000 Subject: [PATCH 12/82] Improve battle number validation --- 27_Civil_War/java/src/CivilWar.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index 099a9183..7733fb7f 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -1,6 +1,8 @@ import java.io.PrintStream; +import java.util.InputMismatchException; import java.util.List; import java.util.Scanner; +import java.util.function.Function; import java.util.function.Predicate; import static java.util.stream.Collectors.joining; @@ -116,15 +118,14 @@ public class CivilWar { out.println(); out.print("WHICH BATTLE DO YOU WISH TO SIMULATE ? "); - var terminalInput = new Scanner(System.in); - var battleNumber = terminalInput.nextInt(); + var battleNumber = inputInt(i -> i >= 1 || (i == 0 && this.currentBattle != null), i -> "BATTLE " + i + " NOT ALLOWED."); - if (battleNumber == 0 && this.currentBattle != null) { + if (battleNumber == 0) { out.println(this.currentBattle.data.name + " INSTANT REPLAY"); return this.currentBattle; } - if (battleNumber <= 0 || battleNumber > this.data.size()) { + if (battleNumber > this.data.size()) { // TYPE ANY OTHER NUMBER TO END THE SIMULATION return null; } @@ -177,6 +178,8 @@ public class CivilWar { // ONLY IN PRINTOUT IS CONFED INFLATION = I1+15% // IF TWO GENERALS, INPUT CONFED. FIRST + var terminalInput = new Scanner(System.in); + for (int i = 0; i < numGenerals; i++) { out.println(); From bac4ad5cf860c2aa6c8b9ed8460754c2ebe9e5b0 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sat, 15 Jan 2022 23:52:09 +0000 Subject: [PATCH 13/82] Changed in error --- 27_Civil_War/civilwar.bas | 44 +++++++-------------------------------- 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/27_Civil_War/civilwar.bas b/27_Civil_War/civilwar.bas index f9cb256b..f8fe9701 100644 --- a/27_Civil_War/civilwar.bas +++ b/27_Civil_War/civilwar.bas @@ -172,47 +172,23 @@ 1840 PRINT 1850 REM - CHOOSE STRATEGIES 1860 IF B$ <> "YES" THEN 1910 - - -== 2 -1890 PRINT "CONFEDERATE STRATEGY "; -1920 INPUT Y -1930 IF ABS(Y-3)<3 THEN 1960 -1940 PRINT "STRATEGY";Y;"NOT ALLOWED." -1950 GOTO 1910 -2010 LET Y1=Y - -2020 PRINT "UNION STRATEGY "; -1920 INPUT Y -1930 IF ABS(Y-3)<3 THEN 1960 -1940 PRINT "STRATEGY";Y;"NOT ALLOWED." -1950 GOTO 1910 - - -== 1 +1870 FOR I=1 TO 2 +1880 ON I GOTO 1890,1920 1890 PRINT "CONFEDERATE STRATEGY "; +1900 GOTO 1920 +1910 PRINT "YOUR STRATEGY "; 1920 INPUT Y 1930 IF ABS(Y-3)<3 THEN 1960 1940 PRINT "STRATEGY";Y;"NOT ALLOWED." 1950 GOTO 1910 +1960 IF B$="YES" THEN 2000 1970 IF Y=5 THEN 2830 1980 GOSUB 3110 1990 GOTO 2170 +2000 IF I=2 THEN 2040 2010 LET Y1=Y - -# 2020 PRINT "UNION STRATEGY "; -# 1920 INPUT Y -# 1930 IF ABS(Y-3)<3 THEN 1960 -# 1940 PRINT "STRATEGY";Y;"NOT ALLOWED." -# 1950 GOTO 1910 -# 1970 IF Y=5 THEN 2830 -# 1980 GOSUB 3110 -# 1990 GOTO 2170 - - - - - +2020 PRINT "UNION STRATEGY "; +2030 NEXT I 2040 LET Y2=Y 2050 LET Y=Y1 2060 IF Y2=5 THEN 2020 @@ -322,7 +298,6 @@ 3080 PRINT S(1);S(2);S(3);S(4) 3090 REM--------------------------------- 3100 STOP - 3110 REM - UNION STRATEGY IS COMPUTER CHOSEN 3120 PRINT "UNION STRATEGY IS "; 3130 IF A <> 0 THEN 3180 @@ -343,9 +318,6 @@ 3270 LET Y2=I 3280 PRINT Y2 3290 RETURN - - - 3300 REM LEARN PRESENT STRATEGY, START FORGETTING OLD ONES 3310 REM - PRESENT STRATEGY OF SOUTH GAINS 3*S, OTHERS LOSE S 3320 REM PROBABILITY POINTS, UNLESS A STRATEGY FALLS BELOW 5%. From c1929710fa842da0f3b4253a055e9585527cba2b Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sat, 15 Jan 2022 23:59:42 +0000 Subject: [PATCH 14/82] Refactor / rework Union strategy for simulation --- 27_Civil_War/java/src/CivilWar.java | 51 +++++++++++++++-------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index 7733fb7f..d65601de 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -19,8 +19,8 @@ public class CivilWar { private int numGenerals; private final ArmyPair resources; private int battleNumber; - private int Y; - private int Y2; + private int confedStrategy; + private int unionStrategy; private final ArmyPair totalExpectedCasualties; private final ArmyPair totalCasualties; private boolean excessiveConfederateLosses; @@ -96,8 +96,6 @@ public class CivilWar { offensiveLogic(battle.data); - unionStrategy(); - calcLosses(battle); reset(); @@ -280,22 +278,26 @@ public class CivilWar { out.print("YOUR STRATEGY ? "); } - var terminalInput = new Scanner(System.in); - Y = terminalInput.nextInt(); - if (Math.abs(Y - 3) >= 3) { - out.println("STRATEGY " + Y + " NOT ALLOWED."); - // FIXME Proper numeric check!! Not abs - // FIXME Retry Y input + confedStrategy = inputInt(i -> i >= 1 && i <= 5, i -> "STRATEGY " + i + " NOT ALLOWED."); + if (confedStrategy == 5) { // 1970 + confedSurrender = true; } - if (Y == 5) { // 1970 - confedSurrender = true; + if (numGenerals == 2) { + out.print("UNION STRATEGY ? "); + + unionStrategy = inputInt(i -> i >= 1 && i <= 5, i -> "STRATEGY " + i + " NOT ALLOWED."); + if (unionStrategy == 5) { // 1970 + unionSurrender = true; + } + } else { + unionStrategy(); } } // 2070 REM : SIMULATED LOSSES-NORTH private UnionLosses simulateUnionLosses(HistoricalDatum battle) { - var losses = (2.0 * battle.expectedCasualties.union / 5) * (1 + 1.0 / (2 * (Math.abs(Y2 - Y) + 1))); + var losses = (2.0 * battle.expectedCasualties.union / 5) * (1 + 1.0 / (2 * (Math.abs(unionStrategy - confedStrategy) + 1))); losses = losses * (1.28 + (5.0 * battle.troops.union / 6) / (resources.union.ammunition + 1)); losses = Math.floor(losses * (1 + 1 / resources.union.morale) + 0.5); // IF LOSS > MEN PRESENT, RESCALE LOSSES @@ -316,7 +318,7 @@ public class CivilWar { out.println(); out.println(" CONFEDERACY UNION"); - var C5 = (2 * battle.data.expectedCasualties.confederate / 5) * (1 + 1.0 / (2 * (Math.abs(Y2 - Y) + 1))); + var C5 = (2 * battle.data.expectedCasualties.confederate / 5) * (1 + 1.0 / (2 * (Math.abs(unionStrategy - confedStrategy) + 1))); C5 = (int) Math.floor(C5 * (1 + 1.0 / resources.confederate.morale) * (1.28 + battle.F1 / (resources.confederate.ammunition + 1.0)) + .5); var E = 100 / resources.confederate.morale; @@ -393,7 +395,7 @@ public class CivilWar { totalTroops.confederate += battle.data.troops.confederate; totalTroops.union += battle.data.troops.union; - updateStrategies(this.Y); + updateStrategies(this.confedStrategy); } } @@ -414,11 +416,11 @@ public class CivilWar { out.println(); out.println("THE CONFEDERACY HAS WON " + results.confederate + " BATTLES AND LOST " + results.union); - if (this.Y2 == 5) { + if (this.unionStrategy == 5) { out.println("THE CONFEDERACY HAS WON THE WAR"); } - if (this.Y == 5 || results.confederate <= results.union) { + if (this.confedStrategy == 5 || results.confederate <= results.union) { out.println("THE UNION HAS WON THE WAR"); } @@ -466,16 +468,17 @@ public class CivilWar { } private void unionStrategy() { - if (this.battleNumber != 0) { + // 3130 ... so you can only input / override Union strategy on re-run?? + if (this.battleNumber == 0) { out.print("UNION STRATEGY ? "); var terminalInput = new Scanner(System.in); - Y2 = terminalInput.nextInt(); - if (Y2 < 0) { + unionStrategy = terminalInput.nextInt(); + if (unionStrategy < 0) { out.println("ENTER 1, 2, 3, OR 4 (USUALLY PREVIOUS UNION STRATEGY)"); // FIXME Retry Y2 input !!! } - if (Y2 < 5) { // 3155 + if (unionStrategy < 5) { // 3155 return; } } @@ -484,15 +487,15 @@ public class CivilWar { this.R = 100 * Math.random(); - for (Y2 = 0; Y2 < 4; Y2++) { - S0 += this.strategies[Y2]; + for (unionStrategy = 1; unionStrategy <= 4; unionStrategy++) { + S0 += this.strategies[unionStrategy - 1]; // IF ACTUAL STRATEGY INFO IS IN PROGRAM DATA STATEMENTS THEN R-100 IS EXTRA WEIGHT GIVEN TO THAT STATEGY. if (R < S0) { break; } } // IF ACTUAL STRAT. IN,THEN HERE IS Y2= HIST. STRAT. - out.println("UNION STRATEGY IS " + Y2); + out.println("UNION STRATEGY IS " + unionStrategy); } public CivilWar(PrintStream out) { From 2aeb5eacde7b7252547d582a0f3624f4f412c56d Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sun, 16 Jan 2022 00:01:21 +0000 Subject: [PATCH 15/82] R => local --- 27_Civil_War/java/src/CivilWar.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index d65601de..a3992492 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -33,7 +33,6 @@ public class CivilWar { private int unionTroops; // M6 private boolean confedSurrender; private boolean unionSurrender; - private double R; private boolean wantBattleDescriptions; private final static String YES_NO_REMINDER = "(ANSWER YES OR NO)"; @@ -484,13 +483,12 @@ public class CivilWar { } var S0 = 0; - - this.R = 100 * Math.random(); + var r = 100 * Math.random(); for (unionStrategy = 1; unionStrategy <= 4; unionStrategy++) { S0 += this.strategies[unionStrategy - 1]; // IF ACTUAL STRATEGY INFO IS IN PROGRAM DATA STATEMENTS THEN R-100 IS EXTRA WEIGHT GIVEN TO THAT STATEGY. - if (R < S0) { + if (r < S0) { break; } } From 1d00dbf241dd2aceb6ada2c61b7d15aefcbae5b7 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sun, 16 Jan 2022 00:10:40 +0000 Subject: [PATCH 16/82] Refactor --- 27_Civil_War/java/src/CivilWar.java | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/27_Civil_War/java/src/CivilWar.java b/27_Civil_War/java/src/CivilWar.java index a3992492..042126f6 100644 --- a/27_Civil_War/java/src/CivilWar.java +++ b/27_Civil_War/java/src/CivilWar.java @@ -14,26 +14,30 @@ public class CivilWar { private final PrintStream out; private final List data; + private final BattleResults results; + private BattleState currentBattle; - private final int[] strategies; private int numGenerals; - private final ArmyPair resources; private int battleNumber; + private boolean wantBattleDescriptions; + private final int[] strategies; + private int confedStrategy; private int unionStrategy; + + private final ArmyPair resources; private final ArmyPair totalExpectedCasualties; private final ArmyPair totalCasualties; - private boolean excessiveConfederateLosses; - private boolean excessiveUnionLosses; - private final BattleResults results; private final ArmyPair revenue; private final ArmyPair inflation; private final ArmyPair totalExpenditure; private final ArmyPair totalTroops; - private int unionTroops; // M6 + + private boolean excessiveConfederateLosses; + private boolean excessiveUnionLosses; + private boolean confedSurrender; private boolean unionSurrender; - private boolean wantBattleDescriptions; private final static String YES_NO_REMINDER = "(ANSWER YES OR NO)"; private final static Predicate YES_NO_CHECKER = i -> isYes(i) || isNo(i); @@ -143,8 +147,6 @@ public class CivilWar { resources.confederate.budget = 100 * (int) Math.floor((battle.troops.confederate * (100.0 - inflation.confederate) / 2000) * (1 + (revenue.confederate - totalExpenditure.confederate) / (revenue.confederate + 1.0)) + .5); // MEN AVAILABLE - var confedTroops = (int) Math.floor(battle.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (totalTroops.confederate + 1.0))); - this.unionTroops = (int) Math.floor(battle.troops.union * (1 + (totalExpectedCasualties.union - totalCasualties.union) / (totalTroops.union + 1.0))); battleState.F1 = 5 * battle.troops.confederate / 6.0; if (this.numGenerals == 2) { @@ -168,7 +170,7 @@ public class CivilWar { out.println(); out.println(" CONFEDERACY UNION"); - out.println("MEN " + confedTroops + " " + unionTroops); + out.println("MEN " + getConfedTroops(battle) + " " + getUnionTroops(battle)); out.println("MONEY $ " + resources.confederate.budget + " $ " + resources.union.budget); out.println("INFLATION " + (inflation.confederate + 15) + "% " + inflation.union + "%"); @@ -228,6 +230,14 @@ public class CivilWar { return battleState; } + private int getUnionTroops(HistoricalDatum battle) { + return (int) Math.floor(battle.troops.union * (1 + (totalExpectedCasualties.union - totalCasualties.union) / (totalTroops.union + 1.0))); + } + + private int getConfedTroops(HistoricalDatum battle) { + return (int) Math.floor(battle.troops.confederate * (1 + (totalExpectedCasualties.confederate - totalCasualties.confederate) / (totalTroops.confederate + 1.0))); + } + private String moraleForArmy(BattleState battleState, int armyIdx) { var builder = new StringBuilder(); @@ -302,8 +312,8 @@ public class CivilWar { // IF LOSS > MEN PRESENT, RESCALE LOSSES var moraleFactor = 100 / resources.union.morale; - if (Math.floor(losses + moraleFactor) >= unionTroops) { - losses = Math.floor(13.0 * unionTroops / 20); + if (Math.floor(losses + moraleFactor) >= getUnionTroops(battle)) { + losses = Math.floor(13.0 * getUnionTroops(battle) / 20); moraleFactor = 7 * losses / 13; excessiveUnionLosses = true; } From 75a5c91e88c71bd9c18651910bdc1f370e6d9b30 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Sun, 16 Jan 2022 03:27:32 +0200 Subject: [PATCH 17/82] Utils: generate solution and project files --- .../DotnetUtils/DotnetUtils/Extensions.cs | 8 +-- .../DotnetUtils/DotnetUtils/Methods.cs | 56 +++++++++++++++++++ .../DotnetUtils/DotnetUtils/PortInfo.cs | 19 +++++-- .../DotnetUtils/DotnetUtils/Program.cs | 55 +++++++++++++++++- 4 files changed, 125 insertions(+), 13 deletions(-) create mode 100644 00_Utilities/DotnetUtils/DotnetUtils/Methods.cs diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Extensions.cs b/00_Utilities/DotnetUtils/DotnetUtils/Extensions.cs index 82ff9532..a0f52bee 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Extensions.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Extensions.cs @@ -1,4 +1,5 @@ using System.Diagnostics.CodeAnalysis; +using static System.IO.Path; namespace DotnetUtils; @@ -18,10 +19,7 @@ public static class Extensions { rootPath.IsNullOrWhitespace() ) { return path; } - var path1 = path.TrimEnd('\\'); - rootPath = rootPath.TrimEnd('\\'); - if (!path1.StartsWith(rootPath, StringComparison.InvariantCultureIgnoreCase)) { return path; } - - return path1[(rootPath.Length + 1)..]; // ignore the initial / + path = path.TrimEnd('\\'); // remove trailing backslash, if present + return GetRelativePath(rootPath, path.TrimEnd('\\')); } } diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs b/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs new file mode 100644 index 00000000..de69131f --- /dev/null +++ b/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs @@ -0,0 +1,56 @@ +using System.Diagnostics; + +namespace DotnetUtils; + +public static class Methods { + public static ProcessResult RunProcess(string filename, string arguments) { + var process = new Process() { + StartInfo = { + FileName = filename, + Arguments = arguments, + UseShellExecute = false, + CreateNoWindow = true, + RedirectStandardOutput = true, + RedirectStandardError = true, + }, + EnableRaisingEvents = true + }; + return RunProcess(process); + } + + public static ProcessResult RunProcess(Process process, string input = "") { + var (output, error) = ("", ""); + var (redirectOut, redirectErr) = ( + process.StartInfo.RedirectStandardOutput, + process.StartInfo.RedirectStandardError + ); + if (redirectOut) { + process.OutputDataReceived += (s, ea) => output += ea.Data + "\n"; + } + if (redirectErr) { + process.ErrorDataReceived += (s, ea) => error += ea.Data + "\n"; + } + + if (!process.Start()) { + throw new InvalidOperationException(); + }; + + if (redirectOut) { process.BeginOutputReadLine(); } + if (redirectErr) { process.BeginErrorReadLine(); } + if (!string.IsNullOrEmpty(input)) { + process.StandardInput.WriteLine(input); + process.StandardInput.Close(); + } + process.WaitForExit(); + return new ProcessResult(process.ExitCode, output, error); + } +} + +public sealed record ProcessResult(int ExitCode, string StdOut, string StdErr) { + public override string? ToString() => + StdOut + + (StdOut is not (null or "") && ExitCode > 0 ? "\n" : "") + + (ExitCode > 0 ? + $"{ExitCode}\n{StdErr}" : + ""); +} diff --git a/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs b/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs index 894c8834..547e2878 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs @@ -1,5 +1,4 @@ -using System.Reflection; -using static System.IO.Directory; +using static System.IO.Directory; using static System.IO.Path; using static DotnetUtils.Globals; @@ -17,6 +16,14 @@ public record PortInfo( MatchCasing = MatchCasing.CaseInsensitive }; + // .NET namespaces cannot have a digit as the first character + // For games whose name starts with a digit, we map the name to a specific string + private static readonly Dictionary specialGameNames = new() { + { "3-D_Plot", "ThreeDPlot" }, + { "3-D_Tic-Tac-Toe", "ThreeDTicTacToe" }, + { "23_Matches", "TwentyThreeMatches"} + }; + public static PortInfo? Create(string fullPath, string langKeyword) { var folderName = GetFileName(fullPath); var parts = folderName.Split('_', 2); @@ -27,9 +34,11 @@ public record PortInfo( (int?)null; var gameName = - parts.Length > 1 ? - parts[1].Replace("_", "") : - null; + parts.Length == 0 ? + null : + specialGameNames.TryGetValue(parts[1], out var specialName) ? + specialName : + parts[1].Replace("_", "").Replace("-", ""); if (index is 0 or null || gameName is null) { return null; } diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index 6d4594b7..f082060c 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -1,6 +1,8 @@ -using DotnetUtils; +using System.Diagnostics; +using DotnetUtils; using static System.Console; using static System.IO.Path; +using static DotnetUtils.Methods; var infos = PortInfos.Get; @@ -11,7 +13,10 @@ var actions = new (Action action, string description)[] { (multipleSlns, "Output multiple sln files"), (missingProj, "Output missing project file"), (unexpectedProjName, "Output misnamed project files"), - (multipleProjs, "Output multiple project files") + (multipleProjs, "Output multiple project files"), + + (generateMissingSlns, "Generate solution files when missing"), + (generateMissingProjs, "Generate project files when missing") }; foreach (var (_, description, index) in actions.WithIndex()) { @@ -159,8 +164,52 @@ void multipleProjs() { WriteLine(item.LangPath); WriteLine(); printProjs(item); - } WriteLine(); WriteLine($"Count: {data.Length}"); } + +void generateMissingSlns() { + foreach (var item in infos.Where(x => !x.Slns.Any())) { + var result = RunProcess("dotnet", $"new sln -n {item.GameName} -o {item.LangPath}"); + WriteLine(result); + + var slnFullPath = Combine(item.LangPath, $"{item.GameName}.sln"); + foreach (var proj in item.Projs) { + result = RunProcess("dotnet", $"sln {slnFullPath} add {proj}"); + WriteLine(result); + } + } +} + +void generateMissingProjs() { + foreach (var item in infos.Where(x => !x.Projs.Any())) { + var (langArg, langVersion) = item.Lang switch { + "csharp" => ("\"C#\"", 10), + "vbnet" => ("\"VB\"", 16.9), + _ => throw new InvalidOperationException() + }; + + var result = RunProcess("dotnet", $"new console --language {langArg} --name {item.GameName}.{item.ProjExt} -o {item.LangPath} -f net6.0 --langversion {langVersion}"); + WriteLine(result); + + var projFullPath = Combine(item.LangPath, $"{item.GameName}.{item.ProjExt}"); + if (item.Slns.Length == 1) { + result = RunProcess("dotnet", $"sln {item.Slns[0]} add {projFullPath}"); + WriteLine(result); + } + } +} + +void checkProjects() { + // warn if project files do not: + // target .NET 6 + // implicit using + // nullable enable + // warn if none og the projects have: + // output type exe +} + +void tryBuild() { + // if has code files, try to build +} From 7f7a4f95ceaf21740665f8c3cdac126901eda763 Mon Sep 17 00:00:00 2001 From: RibTips <36372030+ribtips@users.noreply.github.com> Date: Sun, 16 Jan 2022 00:34:02 -0500 Subject: [PATCH 18/82] The game of craps in perl 29_Craps --- 29_Craps/perl/craps.pl | 113 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 29_Craps/perl/craps.pl diff --git a/29_Craps/perl/craps.pl b/29_Craps/perl/craps.pl new file mode 100644 index 00000000..7dd39856 --- /dev/null +++ b/29_Craps/perl/craps.pl @@ -0,0 +1,113 @@ +#!/usr/bin/perl +# + +my $bank = 0; + +&main; + +sub main { + &print_intro; + my $continue=5; + until ($continue != 5) { + $continue=&game_play; + &print_bank; + } + &final_bank; +} + +sub game_play { + my $point = 0; + my $continue = 1; + print "INPUT THE AMOUNT OF YOUR WAGER.\n"; + chomp(my $wager=); + print "I WILL NOW THROW THE DICE\n"; + until ($continue == 0) { + my $roll = &roll_dice; + $continue = &check_value($roll,$wager); + } + print "IF YOU WANT TO PLAY AGAIN PRINT 5 IF NOT PRINT 2\n"; + chomp(my $ans=); + return $ans; +} + +sub print_bank { + if ($bank < 0) { + print "YOU ARE NOW UNDER \$$bank\n"; + } + elsif ($bank > 0) { + print "YOU ARE NOW AHEAD \$$bank\n"; + } + else { + print "YOU ARE EVEN AT 0\n"; + } +} + +sub final_bank { + if ($bank < 0) { + print "TOO BAD, YOU ARE IN THE HOLE. COME AGAIN\n"; + } + elsif ($bank > 0) { + print "CONGRATULATIONS---YOU CAME OUT A WINNER. COME AGAIN!\n"; + } + else { + print "CONGRATULATIONS---YOU CAME OUT EVEN. NOT BAD FOR AN AMATEUR!\n"; + } +} + +sub check_value { + my $roll = shift; + my $wager = shift; + if ($roll == 7 || $roll == 11) { + print "$roll - NATURAL....A WINNER!!!!\n"; + print "$roll PAYS EVEN MONEY, YOU WIN $wager DOLLARS\n"; + $bank += $wager; + return 0; + } + elsif ($roll == 2 || $roll == 3 || $roll == 12) { + if ($roll == 2) { + print "$roll - SNAKE EYES....YOU LOSE.\n"; + print "YOU LOSE $wager DOLLARS.\n"; + } + else { + print "$roll - CRAPS...YOU LOSE.\n"; + print "YOU LOSE $wager DOLLARS.\n"; + } + $bank -= $wager; + return 0; + } + else { + my $point = $roll; + print "$point IS THE POINT. I WILL ROLL AGAIN\n"; + until (1==2) { + $roll = &roll_dice; + if ($roll == 7) { + print "$roll YOU LOSE $wager\n"; + $bank -= $wager; + return 0; + } + elsif ($roll == $point) { + print "$roll - A WINNER..........CONGRATS!!!!!!!!\n"; + my $payout = $wager * 2; + print "$roll AT 2 TO 1 ODDS PAYS YOU...LET ME SEE...$payout DOLLARS\n"; + $bank += $payout; + return 0; + } + else { + print "$roll - NO POINT. I WILL ROLL AGAIN\n"; + sleep(1); + } + } + } +} + +sub roll_dice { + my $die1 = 1+int rand(6); + my $die2 = 1+int rand(6); + return ($die1 + $die2); +} + +sub print_intro { + print ' ' x 33 . "CRAPS\n"; + print ' ' x 15 . "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n\n\n"; + print "2,3,12 ARE LOSERS; 4,5,6,8,9,10 ARE POINTS; 7,11 ARE NATURAL WINNERS.\n"; +} From 3cd28f1c4558c7178baa043bac8e2dce086831a1 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Sun, 16 Jan 2022 08:09:58 +0200 Subject: [PATCH 19/82] Project generation by hand instead of using dotnet new --- .../DotnetUtils/DotnetUtils/Methods.cs | 2 +- .../DotnetUtils/DotnetUtils/PortInfo.cs | 2 +- .../DotnetUtils/DotnetUtils/Program.cs | 35 ++++++++++++++----- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs b/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs index de69131f..2aafa800 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs @@ -50,7 +50,7 @@ public sealed record ProcessResult(int ExitCode, string StdOut, string StdErr) { public override string? ToString() => StdOut + (StdOut is not (null or "") && ExitCode > 0 ? "\n" : "") + - (ExitCode > 0 ? + (ExitCode != 0 ? $"{ExitCode}\n{StdErr}" : ""); } diff --git a/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs b/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs index 547e2878..a1caaf15 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs @@ -34,7 +34,7 @@ public record PortInfo( (int?)null; var gameName = - parts.Length == 0 ? + parts.Length <= 1 ? null : specialGameNames.TryGetValue(parts[1], out var specialName) ? specialName : diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index f082060c..f9995994 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -184,18 +184,37 @@ void generateMissingSlns() { void generateMissingProjs() { foreach (var item in infos.Where(x => !x.Projs.Any())) { - var (langArg, langVersion) = item.Lang switch { - "csharp" => ("\"C#\"", 10), - "vbnet" => ("\"VB\"", 16.9), + // We can't use the dotnet command to create a new project using the built-in console template, because part of that template + // is a Program.cs / Program.vb file. If there already are code files, there's no need to add a new empty one; and + // if there's already such a file, it might try to overwrite it. + + var projText = item.Lang switch { + "csharp" => @" + + Exe + net6.0 + 10 + enable + enable + + +", + "vbnet" => @$" + + Exe + {item.GameName} + net6.0 + 16.9 + + +", _ => throw new InvalidOperationException() }; - - var result = RunProcess("dotnet", $"new console --language {langArg} --name {item.GameName}.{item.ProjExt} -o {item.LangPath} -f net6.0 --langversion {langVersion}"); - WriteLine(result); - var projFullPath = Combine(item.LangPath, $"{item.GameName}.{item.ProjExt}"); + File.WriteAllText(projFullPath, projText); + if (item.Slns.Length == 1) { - result = RunProcess("dotnet", $"sln {item.Slns[0]} add {projFullPath}"); + var result = RunProcess("dotnet", $"sln {item.Slns[0]} add {projFullPath}"); WriteLine(result); } } From 8a2f251c4062c69c70438314e3a5aa0e9c343898 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Sun, 16 Jan 2022 08:17:31 +0200 Subject: [PATCH 20/82] Add sln and csroj/vbproj files where missing --- .../DotnetUtils/DotnetUtils/Program.cs | 3 +-- 02_Amazing/vbnet/Amazing.sln | 22 +++++++++++++++ 02_Amazing/vbnet/Amazing.vbproj | 8 ++++++ 03_Animal/vbnet/Animal.sln | 22 +++++++++++++++ 03_Animal/vbnet/Animal.vbproj | 8 ++++++ 04_Awari/csharp/Awari.sln | 22 +++++++++++++++ 04_Awari/vbnet/Awari.sln | 22 +++++++++++++++ 04_Awari/vbnet/Awari.vbproj | 8 ++++++ 05_Bagels/csharp/Bagels.sln | 22 +++++++++++++++ 05_Bagels/vbnet/Bagels.sln | 22 +++++++++++++++ 05_Bagels/vbnet/Bagels.vbproj | 8 ++++++ 07_Basketball/csharp/Basketball.csproj | 9 +++++++ 07_Basketball/csharp/Basketball.sln | 22 +++++++++++++++ 07_Basketball/vbnet/Basketball.sln | 22 +++++++++++++++ 07_Basketball/vbnet/Basketball.vbproj | 8 ++++++ 09_Battle/vbnet/Battle.sln | 22 +++++++++++++++ 09_Battle/vbnet/Battle.vbproj | 8 ++++++ 10_Blackjack/csharp/Blackjack.sln | 22 +++++++++++++++ 10_Blackjack/vbnet/Blackjack.sln | 22 +++++++++++++++ 10_Blackjack/vbnet/Blackjack.vbproj | 8 ++++++ 11_Bombardment/csharp/Bombardment.sln | 22 +++++++++++++++ 11_Bombardment/vbnet/Bombardment.sln | 22 +++++++++++++++ 11_Bombardment/vbnet/Bombardment.vbproj | 8 ++++++ 12_Bombs_Away/vbnet/BombsAway.sln | 22 +++++++++++++++ 12_Bombs_Away/vbnet/BombsAway.vbproj | 8 ++++++ 13_Bounce/csharp/Bounce.csproj | 9 +++++++ 13_Bounce/csharp/Bounce.sln | 22 +++++++++++++++ 13_Bounce/vbnet/Bounce.sln | 22 +++++++++++++++ 13_Bounce/vbnet/Bounce.vbproj | 8 ++++++ 14_Bowling/csharp/Bowling.csproj | 9 +++++++ 14_Bowling/csharp/Bowling.sln | 22 +++++++++++++++ 14_Bowling/vbnet/Bowling.sln | 22 +++++++++++++++ 14_Bowling/vbnet/Bowling.vbproj | 8 ++++++ 15_Boxing/vbnet/Boxing.sln | 22 +++++++++++++++ 15_Boxing/vbnet/Boxing.vbproj | 8 ++++++ 16_Bug/csharp/Bug.csproj | 9 +++++++ 16_Bug/csharp/Bug.sln | 22 +++++++++++++++ 16_Bug/vbnet/Bug.sln | 22 +++++++++++++++ 16_Bug/vbnet/Bug.vbproj | 8 ++++++ 17_Bullfight/vbnet/Bullfight.sln | 22 +++++++++++++++ 17_Bullfight/vbnet/Bullfight.vbproj | 8 ++++++ 18_Bullseye/vbnet/Bullseye.sln | 22 +++++++++++++++ 18_Bullseye/vbnet/Bullseye.vbproj | 8 ++++++ 19_Bunny/csharp/Bunny.csproj | 9 +++++++ 19_Bunny/csharp/Bunny.sln | 22 +++++++++++++++ 19_Bunny/vbnet/Bunny.sln | 22 +++++++++++++++ 19_Bunny/vbnet/Bunny.vbproj | 8 ++++++ 20_Buzzword/vbnet/Buzzword.sln | 22 +++++++++++++++ 20_Buzzword/vbnet/Buzzword.vbproj | 8 ++++++ 21_Calendar/vbnet/Calendar.sln | 22 +++++++++++++++ 21_Calendar/vbnet/Calendar.vbproj | 8 ++++++ 22_Change/vbnet/Change.sln | 22 +++++++++++++++ 22_Change/vbnet/Change.vbproj | 8 ++++++ 23_Checkers/csharp/Checkers.csproj | 9 +++++++ 23_Checkers/csharp/Checkers.sln | 22 +++++++++++++++ 23_Checkers/vbnet/Checkers.sln | 22 +++++++++++++++ 23_Checkers/vbnet/Checkers.vbproj | 8 ++++++ 24_Chemist/vbnet/Chemist.sln | 22 +++++++++++++++ 24_Chemist/vbnet/Chemist.vbproj | 8 ++++++ 25_Chief/csharp/Chief.csproj | 9 +++++++ 25_Chief/csharp/Chief.sln | 22 +++++++++++++++ 25_Chief/vbnet/Chief.sln | 22 +++++++++++++++ 25_Chief/vbnet/Chief.vbproj | 8 ++++++ 26_Chomp/csharp/Chomp.csproj | 9 +++++++ 26_Chomp/csharp/Chomp.sln | 22 +++++++++++++++ 26_Chomp/vbnet/Chomp.sln | 22 +++++++++++++++ 26_Chomp/vbnet/Chomp.vbproj | 8 ++++++ 27_Civil_War/vbnet/CivilWar.sln | 22 +++++++++++++++ 27_Civil_War/vbnet/CivilWar.vbproj | 8 ++++++ 28_Combat/vbnet/Combat.sln | 22 +++++++++++++++ 28_Combat/vbnet/Combat.vbproj | 8 ++++++ 29_Craps/vbnet/Craps.sln | 22 +++++++++++++++ 29_Craps/vbnet/Craps.vbproj | 8 ++++++ 30_Cube/csharp/Cube.csproj | 9 +++++++ 30_Cube/csharp/Cube.sln | 22 +++++++++++++++ 30_Cube/vbnet/Cube.sln | 22 +++++++++++++++ 30_Cube/vbnet/Cube.vbproj | 8 ++++++ 31_Depth_Charge/vbnet/DepthCharge.sln | 22 +++++++++++++++ 31_Depth_Charge/vbnet/DepthCharge.vbproj | 8 ++++++ 32_Diamond/csharp/Diamond.csproj | 9 +++++++ 32_Diamond/csharp/Diamond.sln | 22 +++++++++++++++ 32_Diamond/vbnet/Diamond.sln | 22 +++++++++++++++ 32_Diamond/vbnet/Diamond.vbproj | 8 ++++++ 33_Dice/csharp/Dice.sln | 22 +++++++++++++++ 33_Dice/vbnet/Dice.sln | 22 +++++++++++++++ 33_Dice/vbnet/Dice.vbproj | 8 ++++++ 34_Digits/csharp/Digits.csproj | 9 +++++++ 34_Digits/csharp/Digits.sln | 22 +++++++++++++++ 34_Digits/vbnet/Digits.sln | 22 +++++++++++++++ 34_Digits/vbnet/Digits.vbproj | 8 ++++++ 35_Even_Wins/csharp/EvenWins.csproj | 9 +++++++ 35_Even_Wins/csharp/EvenWins.sln | 22 +++++++++++++++ 35_Even_Wins/vbnet/EvenWins.sln | 22 +++++++++++++++ 35_Even_Wins/vbnet/EvenWins.vbproj | 8 ++++++ 36_Flip_Flop/vbnet/FlipFlop.sln | 22 +++++++++++++++ 36_Flip_Flop/vbnet/FlipFlop.vbproj | 8 ++++++ 37_Football/csharp/Football.csproj | 9 +++++++ 37_Football/csharp/Football.sln | 22 +++++++++++++++ 37_Football/vbnet/Football.sln | 22 +++++++++++++++ 37_Football/vbnet/Football.vbproj | 8 ++++++ 38_Fur_Trader/vbnet/FurTrader.sln | 22 +++++++++++++++ 38_Fur_Trader/vbnet/FurTrader.vbproj | 8 ++++++ 39_Golf/csharp/Golf.csproj | 9 +++++++ 39_Golf/csharp/Golf.sln | 22 +++++++++++++++ 39_Golf/vbnet/Golf.sln | 22 +++++++++++++++ 39_Golf/vbnet/Golf.vbproj | 8 ++++++ 40_Gomoko/csharp/Gomoko.csproj | 9 +++++++ 40_Gomoko/csharp/Gomoko.sln | 22 +++++++++++++++ 40_Gomoko/vbnet/Gomoko.sln | 22 +++++++++++++++ 40_Gomoko/vbnet/Gomoko.vbproj | 8 ++++++ 41_Guess/csharp/Guess.csproj | 9 +++++++ 41_Guess/csharp/Guess.sln | 22 +++++++++++++++ 41_Guess/vbnet/Guess.sln | 22 +++++++++++++++ 41_Guess/vbnet/Guess.vbproj | 8 ++++++ 42_Gunner/csharp/Gunner.sln | 22 +++++++++++++++ 42_Gunner/vbnet/Gunner.sln | 22 +++++++++++++++ 42_Gunner/vbnet/Gunner.vbproj | 8 ++++++ 43_Hammurabi/vbnet/Hammurabi.sln | 22 +++++++++++++++ 43_Hammurabi/vbnet/Hammurabi.vbproj | 8 ++++++ 44_Hangman/vbnet/Hangman.sln | 22 +++++++++++++++ 44_Hangman/vbnet/Hangman.vbproj | 8 ++++++ 45_Hello/csharp/Hello.csproj | 9 +++++++ 45_Hello/csharp/Hello.sln | 22 +++++++++++++++ 45_Hello/vbnet/Hello.sln | 22 +++++++++++++++ 45_Hello/vbnet/Hello.vbproj | 8 ++++++ 46_Hexapawn/vbnet/Hexapawn.sln | 22 +++++++++++++++ 46_Hexapawn/vbnet/Hexapawn.vbproj | 8 ++++++ 47_Hi-Lo/csharp/HiLo.sln | 22 +++++++++++++++ 47_Hi-Lo/vbnet/HiLo.sln | 22 +++++++++++++++ 47_Hi-Lo/vbnet/HiLo.vbproj | 8 ++++++ 48_High_IQ/csharp/HighIQ.csproj | 9 +++++++ 48_High_IQ/csharp/HighIQ.sln | 22 +++++++++++++++ 48_High_IQ/vbnet/HighIQ.sln | 22 +++++++++++++++ 48_High_IQ/vbnet/HighIQ.vbproj | 8 ++++++ 49_Hockey/csharp/Hockey.csproj | 9 +++++++ 49_Hockey/csharp/Hockey.sln | 22 +++++++++++++++ 49_Hockey/vbnet/Hockey.sln | 22 +++++++++++++++ 49_Hockey/vbnet/Hockey.vbproj | 8 ++++++ 50_Horserace/csharp/Horserace.csproj | 9 +++++++ 50_Horserace/csharp/Horserace.sln | 22 +++++++++++++++ 50_Horserace/vbnet/Horserace.sln | 22 +++++++++++++++ 50_Horserace/vbnet/Horserace.vbproj | 8 ++++++ 51_Hurkle/csharp/Hurkle.sln | 27 +++++++++++++++++++ 51_Hurkle/vbnet/Hurkle.sln | 22 +++++++++++++++ 51_Hurkle/vbnet/Hurkle.vbproj | 8 ++++++ 52_Kinema/csharp/Kinema.csproj | 9 +++++++ 52_Kinema/csharp/Kinema.sln | 22 +++++++++++++++ 52_Kinema/vbnet/Kinema.sln | 22 +++++++++++++++ 52_Kinema/vbnet/Kinema.vbproj | 8 ++++++ 53_King/csharp/King.csproj | 9 +++++++ 53_King/csharp/King.sln | 22 +++++++++++++++ 53_King/vbnet/King.sln | 22 +++++++++++++++ 53_King/vbnet/King.vbproj | 8 ++++++ 54_Letter/csharp/Letter.csproj | 9 +++++++ 54_Letter/csharp/Letter.sln | 22 +++++++++++++++ 54_Letter/vbnet/Letter.sln | 22 +++++++++++++++ 54_Letter/vbnet/Letter.vbproj | 8 ++++++ 55_Life/vbnet/Life.sln | 22 +++++++++++++++ 55_Life/vbnet/Life.vbproj | 8 ++++++ 56_Life_for_Two/csharp/LifeforTwo.csproj | 9 +++++++ 56_Life_for_Two/csharp/LifeforTwo.sln | 22 +++++++++++++++ 56_Life_for_Two/vbnet/LifeforTwo.sln | 22 +++++++++++++++ 56_Life_for_Two/vbnet/LifeforTwo.vbproj | 8 ++++++ .../csharp/LiteratureQuiz.csproj | 9 +++++++ 57_Literature_Quiz/csharp/LiteratureQuiz.sln | 22 +++++++++++++++ 57_Literature_Quiz/vbnet/LiteratureQuiz.sln | 22 +++++++++++++++ .../vbnet/LiteratureQuiz.vbproj | 8 ++++++ 58_Love/vbnet/Love.sln | 22 +++++++++++++++ 58_Love/vbnet/Love.vbproj | 8 ++++++ .../csharp/LunarLEMRocket.csproj | 9 +++++++ 59_Lunar_LEM_Rocket/csharp/LunarLEMRocket.sln | 22 +++++++++++++++ 59_Lunar_LEM_Rocket/vbnet/LunarLEMRocket.sln | 22 +++++++++++++++ .../vbnet/LunarLEMRocket.vbproj | 8 ++++++ 60_Mastermind/vbnet/Mastermind.sln | 22 +++++++++++++++ 60_Mastermind/vbnet/Mastermind.vbproj | 8 ++++++ 61_Math_Dice/vbnet/MathDice.sln | 22 +++++++++++++++ 61_Math_Dice/vbnet/MathDice.vbproj | 8 ++++++ 62_Mugwump/vbnet/Mugwump.sln | 22 +++++++++++++++ 62_Mugwump/vbnet/Mugwump.vbproj | 8 ++++++ 63_Name/vbnet/Name.sln | 22 +++++++++++++++ 63_Name/vbnet/Name.vbproj | 8 ++++++ 64_Nicomachus/csharp/Nicomachus.csproj | 9 +++++++ 64_Nicomachus/csharp/Nicomachus.sln | 22 +++++++++++++++ 64_Nicomachus/vbnet/Nicomachus.sln | 22 +++++++++++++++ 64_Nicomachus/vbnet/Nicomachus.vbproj | 8 ++++++ 65_Nim/csharp/Nim.csproj | 9 +++++++ 65_Nim/csharp/Nim.sln | 22 +++++++++++++++ 65_Nim/vbnet/Nim.sln | 22 +++++++++++++++ 65_Nim/vbnet/Nim.vbproj | 8 ++++++ 66_Number/csharp/Number.csproj | 9 +++++++ 66_Number/csharp/Number.sln | 22 +++++++++++++++ 66_Number/vbnet/Number.sln | 22 +++++++++++++++ 66_Number/vbnet/Number.vbproj | 8 ++++++ 67_One_Check/csharp/OneCheck.csproj | 9 +++++++ 67_One_Check/csharp/OneCheck.sln | 22 +++++++++++++++ 67_One_Check/vbnet/OneCheck.sln | 22 +++++++++++++++ 67_One_Check/vbnet/OneCheck.vbproj | 8 ++++++ 68_Orbit/csharp/Orbit.csproj | 9 +++++++ 68_Orbit/csharp/Orbit.sln | 22 +++++++++++++++ 68_Orbit/vbnet/Orbit.sln | 22 +++++++++++++++ 68_Orbit/vbnet/Orbit.vbproj | 8 ++++++ 69_Pizza/vbnet/Pizza.sln | 22 +++++++++++++++ 69_Pizza/vbnet/Pizza.vbproj | 8 ++++++ 70_Poetry/csharp/Poetry.csproj | 9 +++++++ 70_Poetry/csharp/Poetry.sln | 22 +++++++++++++++ 70_Poetry/vbnet/Poetry.sln | 22 +++++++++++++++ 70_Poetry/vbnet/Poetry.vbproj | 8 ++++++ 71_Poker/csharp/Poker.csproj | 9 +++++++ 71_Poker/csharp/Poker.sln | 22 +++++++++++++++ 71_Poker/vbnet/Poker.sln | 22 +++++++++++++++ 71_Poker/vbnet/Poker.vbproj | 8 ++++++ 72_Queen/csharp/Queen.csproj | 9 +++++++ 72_Queen/csharp/Queen.sln | 22 +++++++++++++++ 72_Queen/vbnet/Queen.sln | 22 +++++++++++++++ 72_Queen/vbnet/Queen.vbproj | 8 ++++++ 73_Reverse/vbnet/Reverse.sln | 22 +++++++++++++++ 73_Reverse/vbnet/Reverse.vbproj | 8 ++++++ .../csharp/RockScissorsPaper.sln | 22 +++++++++++++++ .../vbnet/RockScissorsPaper.sln | 22 +++++++++++++++ .../vbnet/RockScissorsPaper.vbproj | 8 ++++++ 75_Roulette/csharp/Roulette.csproj | 9 +++++++ 75_Roulette/csharp/Roulette.sln | 22 +++++++++++++++ 75_Roulette/vbnet/Roulette.sln | 22 +++++++++++++++ 75_Roulette/vbnet/Roulette.vbproj | 8 ++++++ 76_Russian_Roulette/vbnet/RussianRoulette.sln | 22 +++++++++++++++ .../vbnet/RussianRoulette.vbproj | 8 ++++++ 77_Salvo/csharp/Salvo.csproj | 9 +++++++ 77_Salvo/csharp/Salvo.sln | 22 +++++++++++++++ 77_Salvo/vbnet/Salvo.sln | 22 +++++++++++++++ 77_Salvo/vbnet/Salvo.vbproj | 8 ++++++ 78_Sine_Wave/vbnet/SineWave.sln | 22 +++++++++++++++ 78_Sine_Wave/vbnet/SineWave.vbproj | 8 ++++++ 79_Slalom/csharp/Slalom.csproj | 9 +++++++ 79_Slalom/csharp/Slalom.sln | 22 +++++++++++++++ 79_Slalom/vbnet/Slalom.sln | 22 +++++++++++++++ 79_Slalom/vbnet/Slalom.vbproj | 8 ++++++ 80_Slots/csharp/Slots.csproj | 9 +++++++ 80_Slots/csharp/Slots.sln | 22 +++++++++++++++ 80_Slots/vbnet/Slots.sln | 22 +++++++++++++++ 80_Slots/vbnet/Slots.vbproj | 8 ++++++ 81_Splat/csharp/Splat.csproj | 9 +++++++ 81_Splat/csharp/Splat.sln | 22 +++++++++++++++ 81_Splat/vbnet/Splat.sln | 22 +++++++++++++++ 81_Splat/vbnet/Splat.vbproj | 8 ++++++ 82_Stars/vbnet/Stars.sln | 22 +++++++++++++++ 82_Stars/vbnet/Stars.vbproj | 8 ++++++ 83_Stock_Market/vbnet/StockMarket.sln | 22 +++++++++++++++ 83_Stock_Market/vbnet/StockMarket.vbproj | 8 ++++++ 84_Super_Star_Trek/vbnet/SuperStarTrek.sln | 22 +++++++++++++++ 84_Super_Star_Trek/vbnet/SuperStarTrek.vbproj | 8 ++++++ 85_Synonym/csharp/Synonym.csproj | 9 +++++++ 85_Synonym/csharp/Synonym.sln | 22 +++++++++++++++ 85_Synonym/vbnet/Synonym.sln | 22 +++++++++++++++ 85_Synonym/vbnet/Synonym.vbproj | 8 ++++++ 86_Target/vbnet/Target.sln | 22 +++++++++++++++ 86_Target/vbnet/Target.vbproj | 8 ++++++ 87_3-D_Plot/vbnet/ThreeDPlot.sln | 22 +++++++++++++++ 87_3-D_Plot/vbnet/ThreeDPlot.vbproj | 8 ++++++ .../csharp/ThreeDTicTacToe.csproj | 9 +++++++ 88_3-D_Tic-Tac-Toe/csharp/ThreeDTicTacToe.sln | 22 +++++++++++++++ 88_3-D_Tic-Tac-Toe/vbnet/ThreeDTicTacToe.sln | 22 +++++++++++++++ .../vbnet/ThreeDTicTacToe.vbproj | 8 ++++++ 89_Tic-Tac-Toe/csharp/TicTacToe.sln | 22 +++++++++++++++ 89_Tic-Tac-Toe/vbnet/TicTacToe.sln | 22 +++++++++++++++ 89_Tic-Tac-Toe/vbnet/TicTacToe.vbproj | 8 ++++++ 90_Tower/vbnet/Tower.sln | 22 +++++++++++++++ 90_Tower/vbnet/Tower.vbproj | 8 ++++++ 91_Train/vbnet/Train.sln | 22 +++++++++++++++ 91_Train/vbnet/Train.vbproj | 8 ++++++ 92_Trap/csharp/Trap.csproj | 9 +++++++ 92_Trap/csharp/Trap.sln | 22 +++++++++++++++ 92_Trap/vbnet/Trap.sln | 22 +++++++++++++++ 92_Trap/vbnet/Trap.vbproj | 8 ++++++ 93_23_Matches/vbnet/TwentyThreeMatches.sln | 22 +++++++++++++++ 93_23_Matches/vbnet/TwentyThreeMatches.vbproj | 8 ++++++ 94_War/vbnet/War.sln | 22 +++++++++++++++ 94_War/vbnet/War.vbproj | 8 ++++++ 95_Weekday/csharp/Weekday.csproj | 9 +++++++ 95_Weekday/csharp/Weekday.sln | 22 +++++++++++++++ 95_Weekday/vbnet/Weekday.sln | 22 +++++++++++++++ 95_Weekday/vbnet/Weekday.vbproj | 8 ++++++ 281 files changed, 4319 insertions(+), 2 deletions(-) create mode 100644 02_Amazing/vbnet/Amazing.sln create mode 100644 02_Amazing/vbnet/Amazing.vbproj create mode 100644 03_Animal/vbnet/Animal.sln create mode 100644 03_Animal/vbnet/Animal.vbproj create mode 100644 04_Awari/csharp/Awari.sln create mode 100644 04_Awari/vbnet/Awari.sln create mode 100644 04_Awari/vbnet/Awari.vbproj create mode 100644 05_Bagels/csharp/Bagels.sln create mode 100644 05_Bagels/vbnet/Bagels.sln create mode 100644 05_Bagels/vbnet/Bagels.vbproj create mode 100644 07_Basketball/csharp/Basketball.csproj create mode 100644 07_Basketball/csharp/Basketball.sln create mode 100644 07_Basketball/vbnet/Basketball.sln create mode 100644 07_Basketball/vbnet/Basketball.vbproj create mode 100644 09_Battle/vbnet/Battle.sln create mode 100644 09_Battle/vbnet/Battle.vbproj create mode 100644 10_Blackjack/csharp/Blackjack.sln create mode 100644 10_Blackjack/vbnet/Blackjack.sln create mode 100644 10_Blackjack/vbnet/Blackjack.vbproj create mode 100644 11_Bombardment/csharp/Bombardment.sln create mode 100644 11_Bombardment/vbnet/Bombardment.sln create mode 100644 11_Bombardment/vbnet/Bombardment.vbproj create mode 100644 12_Bombs_Away/vbnet/BombsAway.sln create mode 100644 12_Bombs_Away/vbnet/BombsAway.vbproj create mode 100644 13_Bounce/csharp/Bounce.csproj create mode 100644 13_Bounce/csharp/Bounce.sln create mode 100644 13_Bounce/vbnet/Bounce.sln create mode 100644 13_Bounce/vbnet/Bounce.vbproj create mode 100644 14_Bowling/csharp/Bowling.csproj create mode 100644 14_Bowling/csharp/Bowling.sln create mode 100644 14_Bowling/vbnet/Bowling.sln create mode 100644 14_Bowling/vbnet/Bowling.vbproj create mode 100644 15_Boxing/vbnet/Boxing.sln create mode 100644 15_Boxing/vbnet/Boxing.vbproj create mode 100644 16_Bug/csharp/Bug.csproj create mode 100644 16_Bug/csharp/Bug.sln create mode 100644 16_Bug/vbnet/Bug.sln create mode 100644 16_Bug/vbnet/Bug.vbproj create mode 100644 17_Bullfight/vbnet/Bullfight.sln create mode 100644 17_Bullfight/vbnet/Bullfight.vbproj create mode 100644 18_Bullseye/vbnet/Bullseye.sln create mode 100644 18_Bullseye/vbnet/Bullseye.vbproj create mode 100644 19_Bunny/csharp/Bunny.csproj create mode 100644 19_Bunny/csharp/Bunny.sln create mode 100644 19_Bunny/vbnet/Bunny.sln create mode 100644 19_Bunny/vbnet/Bunny.vbproj create mode 100644 20_Buzzword/vbnet/Buzzword.sln create mode 100644 20_Buzzword/vbnet/Buzzword.vbproj create mode 100644 21_Calendar/vbnet/Calendar.sln create mode 100644 21_Calendar/vbnet/Calendar.vbproj create mode 100644 22_Change/vbnet/Change.sln create mode 100644 22_Change/vbnet/Change.vbproj create mode 100644 23_Checkers/csharp/Checkers.csproj create mode 100644 23_Checkers/csharp/Checkers.sln create mode 100644 23_Checkers/vbnet/Checkers.sln create mode 100644 23_Checkers/vbnet/Checkers.vbproj create mode 100644 24_Chemist/vbnet/Chemist.sln create mode 100644 24_Chemist/vbnet/Chemist.vbproj create mode 100644 25_Chief/csharp/Chief.csproj create mode 100644 25_Chief/csharp/Chief.sln create mode 100644 25_Chief/vbnet/Chief.sln create mode 100644 25_Chief/vbnet/Chief.vbproj create mode 100644 26_Chomp/csharp/Chomp.csproj create mode 100644 26_Chomp/csharp/Chomp.sln create mode 100644 26_Chomp/vbnet/Chomp.sln create mode 100644 26_Chomp/vbnet/Chomp.vbproj create mode 100644 27_Civil_War/vbnet/CivilWar.sln create mode 100644 27_Civil_War/vbnet/CivilWar.vbproj create mode 100644 28_Combat/vbnet/Combat.sln create mode 100644 28_Combat/vbnet/Combat.vbproj create mode 100644 29_Craps/vbnet/Craps.sln create mode 100644 29_Craps/vbnet/Craps.vbproj create mode 100644 30_Cube/csharp/Cube.csproj create mode 100644 30_Cube/csharp/Cube.sln create mode 100644 30_Cube/vbnet/Cube.sln create mode 100644 30_Cube/vbnet/Cube.vbproj create mode 100644 31_Depth_Charge/vbnet/DepthCharge.sln create mode 100644 31_Depth_Charge/vbnet/DepthCharge.vbproj create mode 100644 32_Diamond/csharp/Diamond.csproj create mode 100644 32_Diamond/csharp/Diamond.sln create mode 100644 32_Diamond/vbnet/Diamond.sln create mode 100644 32_Diamond/vbnet/Diamond.vbproj create mode 100644 33_Dice/csharp/Dice.sln create mode 100644 33_Dice/vbnet/Dice.sln create mode 100644 33_Dice/vbnet/Dice.vbproj create mode 100644 34_Digits/csharp/Digits.csproj create mode 100644 34_Digits/csharp/Digits.sln create mode 100644 34_Digits/vbnet/Digits.sln create mode 100644 34_Digits/vbnet/Digits.vbproj create mode 100644 35_Even_Wins/csharp/EvenWins.csproj create mode 100644 35_Even_Wins/csharp/EvenWins.sln create mode 100644 35_Even_Wins/vbnet/EvenWins.sln create mode 100644 35_Even_Wins/vbnet/EvenWins.vbproj create mode 100644 36_Flip_Flop/vbnet/FlipFlop.sln create mode 100644 36_Flip_Flop/vbnet/FlipFlop.vbproj create mode 100644 37_Football/csharp/Football.csproj create mode 100644 37_Football/csharp/Football.sln create mode 100644 37_Football/vbnet/Football.sln create mode 100644 37_Football/vbnet/Football.vbproj create mode 100644 38_Fur_Trader/vbnet/FurTrader.sln create mode 100644 38_Fur_Trader/vbnet/FurTrader.vbproj create mode 100644 39_Golf/csharp/Golf.csproj create mode 100644 39_Golf/csharp/Golf.sln create mode 100644 39_Golf/vbnet/Golf.sln create mode 100644 39_Golf/vbnet/Golf.vbproj create mode 100644 40_Gomoko/csharp/Gomoko.csproj create mode 100644 40_Gomoko/csharp/Gomoko.sln create mode 100644 40_Gomoko/vbnet/Gomoko.sln create mode 100644 40_Gomoko/vbnet/Gomoko.vbproj create mode 100644 41_Guess/csharp/Guess.csproj create mode 100644 41_Guess/csharp/Guess.sln create mode 100644 41_Guess/vbnet/Guess.sln create mode 100644 41_Guess/vbnet/Guess.vbproj create mode 100644 42_Gunner/csharp/Gunner.sln create mode 100644 42_Gunner/vbnet/Gunner.sln create mode 100644 42_Gunner/vbnet/Gunner.vbproj create mode 100644 43_Hammurabi/vbnet/Hammurabi.sln create mode 100644 43_Hammurabi/vbnet/Hammurabi.vbproj create mode 100644 44_Hangman/vbnet/Hangman.sln create mode 100644 44_Hangman/vbnet/Hangman.vbproj create mode 100644 45_Hello/csharp/Hello.csproj create mode 100644 45_Hello/csharp/Hello.sln create mode 100644 45_Hello/vbnet/Hello.sln create mode 100644 45_Hello/vbnet/Hello.vbproj create mode 100644 46_Hexapawn/vbnet/Hexapawn.sln create mode 100644 46_Hexapawn/vbnet/Hexapawn.vbproj create mode 100644 47_Hi-Lo/csharp/HiLo.sln create mode 100644 47_Hi-Lo/vbnet/HiLo.sln create mode 100644 47_Hi-Lo/vbnet/HiLo.vbproj create mode 100644 48_High_IQ/csharp/HighIQ.csproj create mode 100644 48_High_IQ/csharp/HighIQ.sln create mode 100644 48_High_IQ/vbnet/HighIQ.sln create mode 100644 48_High_IQ/vbnet/HighIQ.vbproj create mode 100644 49_Hockey/csharp/Hockey.csproj create mode 100644 49_Hockey/csharp/Hockey.sln create mode 100644 49_Hockey/vbnet/Hockey.sln create mode 100644 49_Hockey/vbnet/Hockey.vbproj create mode 100644 50_Horserace/csharp/Horserace.csproj create mode 100644 50_Horserace/csharp/Horserace.sln create mode 100644 50_Horserace/vbnet/Horserace.sln create mode 100644 50_Horserace/vbnet/Horserace.vbproj create mode 100644 51_Hurkle/csharp/Hurkle.sln create mode 100644 51_Hurkle/vbnet/Hurkle.sln create mode 100644 51_Hurkle/vbnet/Hurkle.vbproj create mode 100644 52_Kinema/csharp/Kinema.csproj create mode 100644 52_Kinema/csharp/Kinema.sln create mode 100644 52_Kinema/vbnet/Kinema.sln create mode 100644 52_Kinema/vbnet/Kinema.vbproj create mode 100644 53_King/csharp/King.csproj create mode 100644 53_King/csharp/King.sln create mode 100644 53_King/vbnet/King.sln create mode 100644 53_King/vbnet/King.vbproj create mode 100644 54_Letter/csharp/Letter.csproj create mode 100644 54_Letter/csharp/Letter.sln create mode 100644 54_Letter/vbnet/Letter.sln create mode 100644 54_Letter/vbnet/Letter.vbproj create mode 100644 55_Life/vbnet/Life.sln create mode 100644 55_Life/vbnet/Life.vbproj create mode 100644 56_Life_for_Two/csharp/LifeforTwo.csproj create mode 100644 56_Life_for_Two/csharp/LifeforTwo.sln create mode 100644 56_Life_for_Two/vbnet/LifeforTwo.sln create mode 100644 56_Life_for_Two/vbnet/LifeforTwo.vbproj create mode 100644 57_Literature_Quiz/csharp/LiteratureQuiz.csproj create mode 100644 57_Literature_Quiz/csharp/LiteratureQuiz.sln create mode 100644 57_Literature_Quiz/vbnet/LiteratureQuiz.sln create mode 100644 57_Literature_Quiz/vbnet/LiteratureQuiz.vbproj create mode 100644 58_Love/vbnet/Love.sln create mode 100644 58_Love/vbnet/Love.vbproj create mode 100644 59_Lunar_LEM_Rocket/csharp/LunarLEMRocket.csproj create mode 100644 59_Lunar_LEM_Rocket/csharp/LunarLEMRocket.sln create mode 100644 59_Lunar_LEM_Rocket/vbnet/LunarLEMRocket.sln create mode 100644 59_Lunar_LEM_Rocket/vbnet/LunarLEMRocket.vbproj create mode 100644 60_Mastermind/vbnet/Mastermind.sln create mode 100644 60_Mastermind/vbnet/Mastermind.vbproj create mode 100644 61_Math_Dice/vbnet/MathDice.sln create mode 100644 61_Math_Dice/vbnet/MathDice.vbproj create mode 100644 62_Mugwump/vbnet/Mugwump.sln create mode 100644 62_Mugwump/vbnet/Mugwump.vbproj create mode 100644 63_Name/vbnet/Name.sln create mode 100644 63_Name/vbnet/Name.vbproj create mode 100644 64_Nicomachus/csharp/Nicomachus.csproj create mode 100644 64_Nicomachus/csharp/Nicomachus.sln create mode 100644 64_Nicomachus/vbnet/Nicomachus.sln create mode 100644 64_Nicomachus/vbnet/Nicomachus.vbproj create mode 100644 65_Nim/csharp/Nim.csproj create mode 100644 65_Nim/csharp/Nim.sln create mode 100644 65_Nim/vbnet/Nim.sln create mode 100644 65_Nim/vbnet/Nim.vbproj create mode 100644 66_Number/csharp/Number.csproj create mode 100644 66_Number/csharp/Number.sln create mode 100644 66_Number/vbnet/Number.sln create mode 100644 66_Number/vbnet/Number.vbproj create mode 100644 67_One_Check/csharp/OneCheck.csproj create mode 100644 67_One_Check/csharp/OneCheck.sln create mode 100644 67_One_Check/vbnet/OneCheck.sln create mode 100644 67_One_Check/vbnet/OneCheck.vbproj create mode 100644 68_Orbit/csharp/Orbit.csproj create mode 100644 68_Orbit/csharp/Orbit.sln create mode 100644 68_Orbit/vbnet/Orbit.sln create mode 100644 68_Orbit/vbnet/Orbit.vbproj create mode 100644 69_Pizza/vbnet/Pizza.sln create mode 100644 69_Pizza/vbnet/Pizza.vbproj create mode 100644 70_Poetry/csharp/Poetry.csproj create mode 100644 70_Poetry/csharp/Poetry.sln create mode 100644 70_Poetry/vbnet/Poetry.sln create mode 100644 70_Poetry/vbnet/Poetry.vbproj create mode 100644 71_Poker/csharp/Poker.csproj create mode 100644 71_Poker/csharp/Poker.sln create mode 100644 71_Poker/vbnet/Poker.sln create mode 100644 71_Poker/vbnet/Poker.vbproj create mode 100644 72_Queen/csharp/Queen.csproj create mode 100644 72_Queen/csharp/Queen.sln create mode 100644 72_Queen/vbnet/Queen.sln create mode 100644 72_Queen/vbnet/Queen.vbproj create mode 100644 73_Reverse/vbnet/Reverse.sln create mode 100644 73_Reverse/vbnet/Reverse.vbproj create mode 100644 74_Rock_Scissors_Paper/csharp/RockScissorsPaper.sln create mode 100644 74_Rock_Scissors_Paper/vbnet/RockScissorsPaper.sln create mode 100644 74_Rock_Scissors_Paper/vbnet/RockScissorsPaper.vbproj create mode 100644 75_Roulette/csharp/Roulette.csproj create mode 100644 75_Roulette/csharp/Roulette.sln create mode 100644 75_Roulette/vbnet/Roulette.sln create mode 100644 75_Roulette/vbnet/Roulette.vbproj create mode 100644 76_Russian_Roulette/vbnet/RussianRoulette.sln create mode 100644 76_Russian_Roulette/vbnet/RussianRoulette.vbproj create mode 100644 77_Salvo/csharp/Salvo.csproj create mode 100644 77_Salvo/csharp/Salvo.sln create mode 100644 77_Salvo/vbnet/Salvo.sln create mode 100644 77_Salvo/vbnet/Salvo.vbproj create mode 100644 78_Sine_Wave/vbnet/SineWave.sln create mode 100644 78_Sine_Wave/vbnet/SineWave.vbproj create mode 100644 79_Slalom/csharp/Slalom.csproj create mode 100644 79_Slalom/csharp/Slalom.sln create mode 100644 79_Slalom/vbnet/Slalom.sln create mode 100644 79_Slalom/vbnet/Slalom.vbproj create mode 100644 80_Slots/csharp/Slots.csproj create mode 100644 80_Slots/csharp/Slots.sln create mode 100644 80_Slots/vbnet/Slots.sln create mode 100644 80_Slots/vbnet/Slots.vbproj create mode 100644 81_Splat/csharp/Splat.csproj create mode 100644 81_Splat/csharp/Splat.sln create mode 100644 81_Splat/vbnet/Splat.sln create mode 100644 81_Splat/vbnet/Splat.vbproj create mode 100644 82_Stars/vbnet/Stars.sln create mode 100644 82_Stars/vbnet/Stars.vbproj create mode 100644 83_Stock_Market/vbnet/StockMarket.sln create mode 100644 83_Stock_Market/vbnet/StockMarket.vbproj create mode 100644 84_Super_Star_Trek/vbnet/SuperStarTrek.sln create mode 100644 84_Super_Star_Trek/vbnet/SuperStarTrek.vbproj create mode 100644 85_Synonym/csharp/Synonym.csproj create mode 100644 85_Synonym/csharp/Synonym.sln create mode 100644 85_Synonym/vbnet/Synonym.sln create mode 100644 85_Synonym/vbnet/Synonym.vbproj create mode 100644 86_Target/vbnet/Target.sln create mode 100644 86_Target/vbnet/Target.vbproj create mode 100644 87_3-D_Plot/vbnet/ThreeDPlot.sln create mode 100644 87_3-D_Plot/vbnet/ThreeDPlot.vbproj create mode 100644 88_3-D_Tic-Tac-Toe/csharp/ThreeDTicTacToe.csproj create mode 100644 88_3-D_Tic-Tac-Toe/csharp/ThreeDTicTacToe.sln create mode 100644 88_3-D_Tic-Tac-Toe/vbnet/ThreeDTicTacToe.sln create mode 100644 88_3-D_Tic-Tac-Toe/vbnet/ThreeDTicTacToe.vbproj create mode 100644 89_Tic-Tac-Toe/csharp/TicTacToe.sln create mode 100644 89_Tic-Tac-Toe/vbnet/TicTacToe.sln create mode 100644 89_Tic-Tac-Toe/vbnet/TicTacToe.vbproj create mode 100644 90_Tower/vbnet/Tower.sln create mode 100644 90_Tower/vbnet/Tower.vbproj create mode 100644 91_Train/vbnet/Train.sln create mode 100644 91_Train/vbnet/Train.vbproj create mode 100644 92_Trap/csharp/Trap.csproj create mode 100644 92_Trap/csharp/Trap.sln create mode 100644 92_Trap/vbnet/Trap.sln create mode 100644 92_Trap/vbnet/Trap.vbproj create mode 100644 93_23_Matches/vbnet/TwentyThreeMatches.sln create mode 100644 93_23_Matches/vbnet/TwentyThreeMatches.vbproj create mode 100644 94_War/vbnet/War.sln create mode 100644 94_War/vbnet/War.vbproj create mode 100644 95_Weekday/csharp/Weekday.csproj create mode 100644 95_Weekday/csharp/Weekday.sln create mode 100644 95_Weekday/vbnet/Weekday.sln create mode 100644 95_Weekday/vbnet/Weekday.vbproj diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index f9995994..e8ea235e 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -1,5 +1,4 @@ -using System.Diagnostics; -using DotnetUtils; +using DotnetUtils; using static System.Console; using static System.IO.Path; using static DotnetUtils.Methods; diff --git a/02_Amazing/vbnet/Amazing.sln b/02_Amazing/vbnet/Amazing.sln new file mode 100644 index 00000000..81309fe0 --- /dev/null +++ b/02_Amazing/vbnet/Amazing.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Amazing", "Amazing.vbproj", "{FB9DF301-CB34-4C9A-8823-F034303F5DA3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FB9DF301-CB34-4C9A-8823-F034303F5DA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB9DF301-CB34-4C9A-8823-F034303F5DA3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB9DF301-CB34-4C9A-8823-F034303F5DA3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB9DF301-CB34-4C9A-8823-F034303F5DA3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/02_Amazing/vbnet/Amazing.vbproj b/02_Amazing/vbnet/Amazing.vbproj new file mode 100644 index 00000000..c619d3fa --- /dev/null +++ b/02_Amazing/vbnet/Amazing.vbproj @@ -0,0 +1,8 @@ + + + Exe + Amazing + net6.0 + 16.9 + + diff --git a/03_Animal/vbnet/Animal.sln b/03_Animal/vbnet/Animal.sln new file mode 100644 index 00000000..eaaf1b67 --- /dev/null +++ b/03_Animal/vbnet/Animal.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Animal", "Animal.vbproj", "{147D66D5-D817-4024-9447-9F5B9A6D2B7D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {147D66D5-D817-4024-9447-9F5B9A6D2B7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {147D66D5-D817-4024-9447-9F5B9A6D2B7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {147D66D5-D817-4024-9447-9F5B9A6D2B7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {147D66D5-D817-4024-9447-9F5B9A6D2B7D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/03_Animal/vbnet/Animal.vbproj b/03_Animal/vbnet/Animal.vbproj new file mode 100644 index 00000000..f54e4e3d --- /dev/null +++ b/03_Animal/vbnet/Animal.vbproj @@ -0,0 +1,8 @@ + + + Exe + Animal + net6.0 + 16.9 + + diff --git a/04_Awari/csharp/Awari.sln b/04_Awari/csharp/Awari.sln new file mode 100644 index 00000000..816cfcc9 --- /dev/null +++ b/04_Awari/csharp/Awari.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp", "csharp.csproj", "{4E2057CB-0BFE-41A4-910C-798DFABF7FE9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4E2057CB-0BFE-41A4-910C-798DFABF7FE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E2057CB-0BFE-41A4-910C-798DFABF7FE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E2057CB-0BFE-41A4-910C-798DFABF7FE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E2057CB-0BFE-41A4-910C-798DFABF7FE9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/04_Awari/vbnet/Awari.sln b/04_Awari/vbnet/Awari.sln new file mode 100644 index 00000000..ef0fd0cf --- /dev/null +++ b/04_Awari/vbnet/Awari.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Awari", "Awari.vbproj", "{718AECEB-CC24-49C8-B620-B2F93E021C51}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {718AECEB-CC24-49C8-B620-B2F93E021C51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {718AECEB-CC24-49C8-B620-B2F93E021C51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {718AECEB-CC24-49C8-B620-B2F93E021C51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {718AECEB-CC24-49C8-B620-B2F93E021C51}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/04_Awari/vbnet/Awari.vbproj b/04_Awari/vbnet/Awari.vbproj new file mode 100644 index 00000000..368d6f02 --- /dev/null +++ b/04_Awari/vbnet/Awari.vbproj @@ -0,0 +1,8 @@ + + + Exe + Awari + net6.0 + 16.9 + + diff --git a/05_Bagels/csharp/Bagels.sln b/05_Bagels/csharp/Bagels.sln new file mode 100644 index 00000000..3aaa718b --- /dev/null +++ b/05_Bagels/csharp/Bagels.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bagels", "Bagels.csproj", "{2FC5F33F-2C4B-4707-94E5-3C9B2B633EFE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2FC5F33F-2C4B-4707-94E5-3C9B2B633EFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2FC5F33F-2C4B-4707-94E5-3C9B2B633EFE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2FC5F33F-2C4B-4707-94E5-3C9B2B633EFE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2FC5F33F-2C4B-4707-94E5-3C9B2B633EFE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/05_Bagels/vbnet/Bagels.sln b/05_Bagels/vbnet/Bagels.sln new file mode 100644 index 00000000..ab6fa275 --- /dev/null +++ b/05_Bagels/vbnet/Bagels.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bagels", "Bagels.vbproj", "{913FE7A8-B481-4EB3-8938-566BEAD5B0F2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {913FE7A8-B481-4EB3-8938-566BEAD5B0F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {913FE7A8-B481-4EB3-8938-566BEAD5B0F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {913FE7A8-B481-4EB3-8938-566BEAD5B0F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {913FE7A8-B481-4EB3-8938-566BEAD5B0F2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/05_Bagels/vbnet/Bagels.vbproj b/05_Bagels/vbnet/Bagels.vbproj new file mode 100644 index 00000000..c0d9d2d0 --- /dev/null +++ b/05_Bagels/vbnet/Bagels.vbproj @@ -0,0 +1,8 @@ + + + Exe + Bagels + net6.0 + 16.9 + + diff --git a/07_Basketball/csharp/Basketball.csproj b/07_Basketball/csharp/Basketball.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/07_Basketball/csharp/Basketball.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/07_Basketball/csharp/Basketball.sln b/07_Basketball/csharp/Basketball.sln new file mode 100644 index 00000000..92f2de05 --- /dev/null +++ b/07_Basketball/csharp/Basketball.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basketball", "Basketball.csproj", "{00D03FB3-B485-480F-B14D-746371BDE08B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {00D03FB3-B485-480F-B14D-746371BDE08B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00D03FB3-B485-480F-B14D-746371BDE08B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00D03FB3-B485-480F-B14D-746371BDE08B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00D03FB3-B485-480F-B14D-746371BDE08B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/07_Basketball/vbnet/Basketball.sln b/07_Basketball/vbnet/Basketball.sln new file mode 100644 index 00000000..b32c954f --- /dev/null +++ b/07_Basketball/vbnet/Basketball.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Basketball", "Basketball.vbproj", "{09C533F2-4874-4BA4-9F80-BBE9E8E17456}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {09C533F2-4874-4BA4-9F80-BBE9E8E17456}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {09C533F2-4874-4BA4-9F80-BBE9E8E17456}.Debug|Any CPU.Build.0 = Debug|Any CPU + {09C533F2-4874-4BA4-9F80-BBE9E8E17456}.Release|Any CPU.ActiveCfg = Release|Any CPU + {09C533F2-4874-4BA4-9F80-BBE9E8E17456}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/07_Basketball/vbnet/Basketball.vbproj b/07_Basketball/vbnet/Basketball.vbproj new file mode 100644 index 00000000..6d9f101f --- /dev/null +++ b/07_Basketball/vbnet/Basketball.vbproj @@ -0,0 +1,8 @@ + + + Exe + Basketball + net6.0 + 16.9 + + diff --git a/09_Battle/vbnet/Battle.sln b/09_Battle/vbnet/Battle.sln new file mode 100644 index 00000000..bf92bf39 --- /dev/null +++ b/09_Battle/vbnet/Battle.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Battle", "Battle.vbproj", "{D8475464-CB9B-448F-89A7-5BA15193C495}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D8475464-CB9B-448F-89A7-5BA15193C495}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8475464-CB9B-448F-89A7-5BA15193C495}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8475464-CB9B-448F-89A7-5BA15193C495}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8475464-CB9B-448F-89A7-5BA15193C495}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/09_Battle/vbnet/Battle.vbproj b/09_Battle/vbnet/Battle.vbproj new file mode 100644 index 00000000..dc5c5908 --- /dev/null +++ b/09_Battle/vbnet/Battle.vbproj @@ -0,0 +1,8 @@ + + + Exe + Battle + net6.0 + 16.9 + + diff --git a/10_Blackjack/csharp/Blackjack.sln b/10_Blackjack/csharp/Blackjack.sln new file mode 100644 index 00000000..1a01fb8b --- /dev/null +++ b/10_Blackjack/csharp/Blackjack.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blackjack", "Blackjack.csproj", "{83253F48-9CCD-475C-A990-8703F1A2E31C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {83253F48-9CCD-475C-A990-8703F1A2E31C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83253F48-9CCD-475C-A990-8703F1A2E31C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83253F48-9CCD-475C-A990-8703F1A2E31C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83253F48-9CCD-475C-A990-8703F1A2E31C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/10_Blackjack/vbnet/Blackjack.sln b/10_Blackjack/vbnet/Blackjack.sln new file mode 100644 index 00000000..2610b4a7 --- /dev/null +++ b/10_Blackjack/vbnet/Blackjack.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Blackjack", "Blackjack.vbproj", "{B112CA5F-142B-46E9-92CB-5E3A84816AAE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B112CA5F-142B-46E9-92CB-5E3A84816AAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B112CA5F-142B-46E9-92CB-5E3A84816AAE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B112CA5F-142B-46E9-92CB-5E3A84816AAE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B112CA5F-142B-46E9-92CB-5E3A84816AAE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/10_Blackjack/vbnet/Blackjack.vbproj b/10_Blackjack/vbnet/Blackjack.vbproj new file mode 100644 index 00000000..bc1d8eed --- /dev/null +++ b/10_Blackjack/vbnet/Blackjack.vbproj @@ -0,0 +1,8 @@ + + + Exe + Blackjack + net6.0 + 16.9 + + diff --git a/11_Bombardment/csharp/Bombardment.sln b/11_Bombardment/csharp/Bombardment.sln new file mode 100644 index 00000000..a401c67e --- /dev/null +++ b/11_Bombardment/csharp/Bombardment.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bombardment", "Bombardment.csproj", "{1DCFD283-9300-405B-A2B4-231F30265730}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1DCFD283-9300-405B-A2B4-231F30265730}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1DCFD283-9300-405B-A2B4-231F30265730}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1DCFD283-9300-405B-A2B4-231F30265730}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1DCFD283-9300-405B-A2B4-231F30265730}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/11_Bombardment/vbnet/Bombardment.sln b/11_Bombardment/vbnet/Bombardment.sln new file mode 100644 index 00000000..326fb000 --- /dev/null +++ b/11_Bombardment/vbnet/Bombardment.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bombardment", "Bombardment.vbproj", "{7C967BC0-101C-413F-92A8-3A8A7D9846FE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7C967BC0-101C-413F-92A8-3A8A7D9846FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C967BC0-101C-413F-92A8-3A8A7D9846FE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C967BC0-101C-413F-92A8-3A8A7D9846FE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C967BC0-101C-413F-92A8-3A8A7D9846FE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/11_Bombardment/vbnet/Bombardment.vbproj b/11_Bombardment/vbnet/Bombardment.vbproj new file mode 100644 index 00000000..746887ce --- /dev/null +++ b/11_Bombardment/vbnet/Bombardment.vbproj @@ -0,0 +1,8 @@ + + + Exe + Bombardment + net6.0 + 16.9 + + diff --git a/12_Bombs_Away/vbnet/BombsAway.sln b/12_Bombs_Away/vbnet/BombsAway.sln new file mode 100644 index 00000000..124d3943 --- /dev/null +++ b/12_Bombs_Away/vbnet/BombsAway.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BombsAway", "BombsAway.vbproj", "{7FB28848-EC1C-4594-B823-BA6DB06B34A8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7FB28848-EC1C-4594-B823-BA6DB06B34A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7FB28848-EC1C-4594-B823-BA6DB06B34A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FB28848-EC1C-4594-B823-BA6DB06B34A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7FB28848-EC1C-4594-B823-BA6DB06B34A8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/12_Bombs_Away/vbnet/BombsAway.vbproj b/12_Bombs_Away/vbnet/BombsAway.vbproj new file mode 100644 index 00000000..da557be9 --- /dev/null +++ b/12_Bombs_Away/vbnet/BombsAway.vbproj @@ -0,0 +1,8 @@ + + + Exe + BombsAway + net6.0 + 16.9 + + diff --git a/13_Bounce/csharp/Bounce.csproj b/13_Bounce/csharp/Bounce.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/13_Bounce/csharp/Bounce.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/13_Bounce/csharp/Bounce.sln b/13_Bounce/csharp/Bounce.sln new file mode 100644 index 00000000..f844a126 --- /dev/null +++ b/13_Bounce/csharp/Bounce.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bounce", "Bounce.csproj", "{4A967985-8CB0-49D2-B322-B2668491CA6E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4A967985-8CB0-49D2-B322-B2668491CA6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A967985-8CB0-49D2-B322-B2668491CA6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A967985-8CB0-49D2-B322-B2668491CA6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A967985-8CB0-49D2-B322-B2668491CA6E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/13_Bounce/vbnet/Bounce.sln b/13_Bounce/vbnet/Bounce.sln new file mode 100644 index 00000000..327f27dc --- /dev/null +++ b/13_Bounce/vbnet/Bounce.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bounce", "Bounce.vbproj", "{95D84C53-AE4E-4A5A-869A-A49D6FC89618}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {95D84C53-AE4E-4A5A-869A-A49D6FC89618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {95D84C53-AE4E-4A5A-869A-A49D6FC89618}.Debug|Any CPU.Build.0 = Debug|Any CPU + {95D84C53-AE4E-4A5A-869A-A49D6FC89618}.Release|Any CPU.ActiveCfg = Release|Any CPU + {95D84C53-AE4E-4A5A-869A-A49D6FC89618}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/13_Bounce/vbnet/Bounce.vbproj b/13_Bounce/vbnet/Bounce.vbproj new file mode 100644 index 00000000..33443331 --- /dev/null +++ b/13_Bounce/vbnet/Bounce.vbproj @@ -0,0 +1,8 @@ + + + Exe + Bounce + net6.0 + 16.9 + + diff --git a/14_Bowling/csharp/Bowling.csproj b/14_Bowling/csharp/Bowling.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/14_Bowling/csharp/Bowling.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/14_Bowling/csharp/Bowling.sln b/14_Bowling/csharp/Bowling.sln new file mode 100644 index 00000000..aa48103b --- /dev/null +++ b/14_Bowling/csharp/Bowling.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bowling", "Bowling.csproj", "{9951637A-8D70-42A4-8CB7-315FA414F960}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9951637A-8D70-42A4-8CB7-315FA414F960}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9951637A-8D70-42A4-8CB7-315FA414F960}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9951637A-8D70-42A4-8CB7-315FA414F960}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9951637A-8D70-42A4-8CB7-315FA414F960}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/14_Bowling/vbnet/Bowling.sln b/14_Bowling/vbnet/Bowling.sln new file mode 100644 index 00000000..98b8a996 --- /dev/null +++ b/14_Bowling/vbnet/Bowling.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bowling", "Bowling.vbproj", "{DBEB424A-1538-4F14-BA57-BA4E326EF4D8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DBEB424A-1538-4F14-BA57-BA4E326EF4D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DBEB424A-1538-4F14-BA57-BA4E326EF4D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBEB424A-1538-4F14-BA57-BA4E326EF4D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DBEB424A-1538-4F14-BA57-BA4E326EF4D8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/14_Bowling/vbnet/Bowling.vbproj b/14_Bowling/vbnet/Bowling.vbproj new file mode 100644 index 00000000..36ec929f --- /dev/null +++ b/14_Bowling/vbnet/Bowling.vbproj @@ -0,0 +1,8 @@ + + + Exe + Bowling + net6.0 + 16.9 + + diff --git a/15_Boxing/vbnet/Boxing.sln b/15_Boxing/vbnet/Boxing.sln new file mode 100644 index 00000000..4cca8bb5 --- /dev/null +++ b/15_Boxing/vbnet/Boxing.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Boxing", "Boxing.vbproj", "{8BCEDE01-59A7-4AA3-AE09-8B7FD69A5867}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8BCEDE01-59A7-4AA3-AE09-8B7FD69A5867}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BCEDE01-59A7-4AA3-AE09-8B7FD69A5867}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BCEDE01-59A7-4AA3-AE09-8B7FD69A5867}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BCEDE01-59A7-4AA3-AE09-8B7FD69A5867}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/15_Boxing/vbnet/Boxing.vbproj b/15_Boxing/vbnet/Boxing.vbproj new file mode 100644 index 00000000..f6774e72 --- /dev/null +++ b/15_Boxing/vbnet/Boxing.vbproj @@ -0,0 +1,8 @@ + + + Exe + Boxing + net6.0 + 16.9 + + diff --git a/16_Bug/csharp/Bug.csproj b/16_Bug/csharp/Bug.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/16_Bug/csharp/Bug.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/16_Bug/csharp/Bug.sln b/16_Bug/csharp/Bug.sln new file mode 100644 index 00000000..9024df5b --- /dev/null +++ b/16_Bug/csharp/Bug.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bug", "Bug.csproj", "{C1929CC1-C366-43E4-9476-AE107231A302}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C1929CC1-C366-43E4-9476-AE107231A302}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1929CC1-C366-43E4-9476-AE107231A302}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1929CC1-C366-43E4-9476-AE107231A302}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1929CC1-C366-43E4-9476-AE107231A302}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/16_Bug/vbnet/Bug.sln b/16_Bug/vbnet/Bug.sln new file mode 100644 index 00000000..f0ef35a4 --- /dev/null +++ b/16_Bug/vbnet/Bug.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bug", "Bug.vbproj", "{4F4EA8E5-55A8-4191-BE57-B28638C33609}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4F4EA8E5-55A8-4191-BE57-B28638C33609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F4EA8E5-55A8-4191-BE57-B28638C33609}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F4EA8E5-55A8-4191-BE57-B28638C33609}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F4EA8E5-55A8-4191-BE57-B28638C33609}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/16_Bug/vbnet/Bug.vbproj b/16_Bug/vbnet/Bug.vbproj new file mode 100644 index 00000000..dd4f74e4 --- /dev/null +++ b/16_Bug/vbnet/Bug.vbproj @@ -0,0 +1,8 @@ + + + Exe + Bug + net6.0 + 16.9 + + diff --git a/17_Bullfight/vbnet/Bullfight.sln b/17_Bullfight/vbnet/Bullfight.sln new file mode 100644 index 00000000..9fec219d --- /dev/null +++ b/17_Bullfight/vbnet/Bullfight.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bullfight", "Bullfight.vbproj", "{38805A6B-C251-4C45-9832-B8E2F3F6436F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {38805A6B-C251-4C45-9832-B8E2F3F6436F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38805A6B-C251-4C45-9832-B8E2F3F6436F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38805A6B-C251-4C45-9832-B8E2F3F6436F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38805A6B-C251-4C45-9832-B8E2F3F6436F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/17_Bullfight/vbnet/Bullfight.vbproj b/17_Bullfight/vbnet/Bullfight.vbproj new file mode 100644 index 00000000..016406fa --- /dev/null +++ b/17_Bullfight/vbnet/Bullfight.vbproj @@ -0,0 +1,8 @@ + + + Exe + Bullfight + net6.0 + 16.9 + + diff --git a/18_Bullseye/vbnet/Bullseye.sln b/18_Bullseye/vbnet/Bullseye.sln new file mode 100644 index 00000000..03e2390c --- /dev/null +++ b/18_Bullseye/vbnet/Bullseye.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bullseye", "Bullseye.vbproj", "{0CFD308F-EB9C-4A05-B742-5EE7C912A5E4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0CFD308F-EB9C-4A05-B742-5EE7C912A5E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CFD308F-EB9C-4A05-B742-5EE7C912A5E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CFD308F-EB9C-4A05-B742-5EE7C912A5E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CFD308F-EB9C-4A05-B742-5EE7C912A5E4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/18_Bullseye/vbnet/Bullseye.vbproj b/18_Bullseye/vbnet/Bullseye.vbproj new file mode 100644 index 00000000..3f13676f --- /dev/null +++ b/18_Bullseye/vbnet/Bullseye.vbproj @@ -0,0 +1,8 @@ + + + Exe + Bullseye + net6.0 + 16.9 + + diff --git a/19_Bunny/csharp/Bunny.csproj b/19_Bunny/csharp/Bunny.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/19_Bunny/csharp/Bunny.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/19_Bunny/csharp/Bunny.sln b/19_Bunny/csharp/Bunny.sln new file mode 100644 index 00000000..c7f9f008 --- /dev/null +++ b/19_Bunny/csharp/Bunny.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bunny", "Bunny.csproj", "{6685F5CF-20F2-4682-B187-50105BD44906}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6685F5CF-20F2-4682-B187-50105BD44906}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6685F5CF-20F2-4682-B187-50105BD44906}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6685F5CF-20F2-4682-B187-50105BD44906}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6685F5CF-20F2-4682-B187-50105BD44906}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/19_Bunny/vbnet/Bunny.sln b/19_Bunny/vbnet/Bunny.sln new file mode 100644 index 00000000..b5d177ca --- /dev/null +++ b/19_Bunny/vbnet/Bunny.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bunny", "Bunny.vbproj", "{E9098ADF-4B31-4082-9102-2A5BB8B40C6C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E9098ADF-4B31-4082-9102-2A5BB8B40C6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E9098ADF-4B31-4082-9102-2A5BB8B40C6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E9098ADF-4B31-4082-9102-2A5BB8B40C6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E9098ADF-4B31-4082-9102-2A5BB8B40C6C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/19_Bunny/vbnet/Bunny.vbproj b/19_Bunny/vbnet/Bunny.vbproj new file mode 100644 index 00000000..49bd3df2 --- /dev/null +++ b/19_Bunny/vbnet/Bunny.vbproj @@ -0,0 +1,8 @@ + + + Exe + Bunny + net6.0 + 16.9 + + diff --git a/20_Buzzword/vbnet/Buzzword.sln b/20_Buzzword/vbnet/Buzzword.sln new file mode 100644 index 00000000..2f8a8ef3 --- /dev/null +++ b/20_Buzzword/vbnet/Buzzword.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Buzzword", "Buzzword.vbproj", "{B2BD53F2-82C3-4729-BA82-DB96E18F8666}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B2BD53F2-82C3-4729-BA82-DB96E18F8666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2BD53F2-82C3-4729-BA82-DB96E18F8666}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2BD53F2-82C3-4729-BA82-DB96E18F8666}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2BD53F2-82C3-4729-BA82-DB96E18F8666}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/20_Buzzword/vbnet/Buzzword.vbproj b/20_Buzzword/vbnet/Buzzword.vbproj new file mode 100644 index 00000000..945c5a63 --- /dev/null +++ b/20_Buzzword/vbnet/Buzzword.vbproj @@ -0,0 +1,8 @@ + + + Exe + Buzzword + net6.0 + 16.9 + + diff --git a/21_Calendar/vbnet/Calendar.sln b/21_Calendar/vbnet/Calendar.sln new file mode 100644 index 00000000..c8e5c017 --- /dev/null +++ b/21_Calendar/vbnet/Calendar.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Calendar", "Calendar.vbproj", "{00B21257-3E25-4150-AA6D-266350688663}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {00B21257-3E25-4150-AA6D-266350688663}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00B21257-3E25-4150-AA6D-266350688663}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00B21257-3E25-4150-AA6D-266350688663}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00B21257-3E25-4150-AA6D-266350688663}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/21_Calendar/vbnet/Calendar.vbproj b/21_Calendar/vbnet/Calendar.vbproj new file mode 100644 index 00000000..ed6bd15a --- /dev/null +++ b/21_Calendar/vbnet/Calendar.vbproj @@ -0,0 +1,8 @@ + + + Exe + Calendar + net6.0 + 16.9 + + diff --git a/22_Change/vbnet/Change.sln b/22_Change/vbnet/Change.sln new file mode 100644 index 00000000..4af8571a --- /dev/null +++ b/22_Change/vbnet/Change.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Change", "Change.vbproj", "{77FC724B-EA88-4419-824B-32366FFE9608}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {77FC724B-EA88-4419-824B-32366FFE9608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77FC724B-EA88-4419-824B-32366FFE9608}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77FC724B-EA88-4419-824B-32366FFE9608}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77FC724B-EA88-4419-824B-32366FFE9608}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/22_Change/vbnet/Change.vbproj b/22_Change/vbnet/Change.vbproj new file mode 100644 index 00000000..b6a5e3c1 --- /dev/null +++ b/22_Change/vbnet/Change.vbproj @@ -0,0 +1,8 @@ + + + Exe + Change + net6.0 + 16.9 + + diff --git a/23_Checkers/csharp/Checkers.csproj b/23_Checkers/csharp/Checkers.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/23_Checkers/csharp/Checkers.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/23_Checkers/csharp/Checkers.sln b/23_Checkers/csharp/Checkers.sln new file mode 100644 index 00000000..f7cce0b6 --- /dev/null +++ b/23_Checkers/csharp/Checkers.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Checkers", "Checkers.csproj", "{52D0DDFC-1A0D-4E57-A4FC-428EC717313C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {52D0DDFC-1A0D-4E57-A4FC-428EC717313C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52D0DDFC-1A0D-4E57-A4FC-428EC717313C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52D0DDFC-1A0D-4E57-A4FC-428EC717313C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52D0DDFC-1A0D-4E57-A4FC-428EC717313C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/23_Checkers/vbnet/Checkers.sln b/23_Checkers/vbnet/Checkers.sln new file mode 100644 index 00000000..f5409425 --- /dev/null +++ b/23_Checkers/vbnet/Checkers.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Checkers", "Checkers.vbproj", "{92B871EF-4871-40C0-ADDE-406301B937B9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {92B871EF-4871-40C0-ADDE-406301B937B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92B871EF-4871-40C0-ADDE-406301B937B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92B871EF-4871-40C0-ADDE-406301B937B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92B871EF-4871-40C0-ADDE-406301B937B9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/23_Checkers/vbnet/Checkers.vbproj b/23_Checkers/vbnet/Checkers.vbproj new file mode 100644 index 00000000..fb77091f --- /dev/null +++ b/23_Checkers/vbnet/Checkers.vbproj @@ -0,0 +1,8 @@ + + + Exe + Checkers + net6.0 + 16.9 + + diff --git a/24_Chemist/vbnet/Chemist.sln b/24_Chemist/vbnet/Chemist.sln new file mode 100644 index 00000000..1200eeff --- /dev/null +++ b/24_Chemist/vbnet/Chemist.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Chemist", "Chemist.vbproj", "{25BEFBB8-58A1-4691-9CE6-D8C770F5189D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {25BEFBB8-58A1-4691-9CE6-D8C770F5189D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {25BEFBB8-58A1-4691-9CE6-D8C770F5189D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25BEFBB8-58A1-4691-9CE6-D8C770F5189D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {25BEFBB8-58A1-4691-9CE6-D8C770F5189D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/24_Chemist/vbnet/Chemist.vbproj b/24_Chemist/vbnet/Chemist.vbproj new file mode 100644 index 00000000..7990a9b7 --- /dev/null +++ b/24_Chemist/vbnet/Chemist.vbproj @@ -0,0 +1,8 @@ + + + Exe + Chemist + net6.0 + 16.9 + + diff --git a/25_Chief/csharp/Chief.csproj b/25_Chief/csharp/Chief.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/25_Chief/csharp/Chief.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/25_Chief/csharp/Chief.sln b/25_Chief/csharp/Chief.sln new file mode 100644 index 00000000..036992c3 --- /dev/null +++ b/25_Chief/csharp/Chief.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chief", "Chief.csproj", "{AE650092-EEF2-4747-91F4-C8311AD16A4B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AE650092-EEF2-4747-91F4-C8311AD16A4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE650092-EEF2-4747-91F4-C8311AD16A4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE650092-EEF2-4747-91F4-C8311AD16A4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE650092-EEF2-4747-91F4-C8311AD16A4B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/25_Chief/vbnet/Chief.sln b/25_Chief/vbnet/Chief.sln new file mode 100644 index 00000000..579b0124 --- /dev/null +++ b/25_Chief/vbnet/Chief.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Chief", "Chief.vbproj", "{9BAA28D9-1DCF-42DA-934A-CD3EC5E26E7C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9BAA28D9-1DCF-42DA-934A-CD3EC5E26E7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9BAA28D9-1DCF-42DA-934A-CD3EC5E26E7C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9BAA28D9-1DCF-42DA-934A-CD3EC5E26E7C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9BAA28D9-1DCF-42DA-934A-CD3EC5E26E7C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/25_Chief/vbnet/Chief.vbproj b/25_Chief/vbnet/Chief.vbproj new file mode 100644 index 00000000..09c22917 --- /dev/null +++ b/25_Chief/vbnet/Chief.vbproj @@ -0,0 +1,8 @@ + + + Exe + Chief + net6.0 + 16.9 + + diff --git a/26_Chomp/csharp/Chomp.csproj b/26_Chomp/csharp/Chomp.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/26_Chomp/csharp/Chomp.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/26_Chomp/csharp/Chomp.sln b/26_Chomp/csharp/Chomp.sln new file mode 100644 index 00000000..1567eb9d --- /dev/null +++ b/26_Chomp/csharp/Chomp.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chomp", "Chomp.csproj", "{35863FB3-002D-4618-B993-51A51A586BCC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {35863FB3-002D-4618-B993-51A51A586BCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35863FB3-002D-4618-B993-51A51A586BCC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35863FB3-002D-4618-B993-51A51A586BCC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35863FB3-002D-4618-B993-51A51A586BCC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/26_Chomp/vbnet/Chomp.sln b/26_Chomp/vbnet/Chomp.sln new file mode 100644 index 00000000..3b772010 --- /dev/null +++ b/26_Chomp/vbnet/Chomp.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Chomp", "Chomp.vbproj", "{F7F8E933-9679-4393-94F0-46F47D81B025}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F7F8E933-9679-4393-94F0-46F47D81B025}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7F8E933-9679-4393-94F0-46F47D81B025}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7F8E933-9679-4393-94F0-46F47D81B025}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7F8E933-9679-4393-94F0-46F47D81B025}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/26_Chomp/vbnet/Chomp.vbproj b/26_Chomp/vbnet/Chomp.vbproj new file mode 100644 index 00000000..a3308b2a --- /dev/null +++ b/26_Chomp/vbnet/Chomp.vbproj @@ -0,0 +1,8 @@ + + + Exe + Chomp + net6.0 + 16.9 + + diff --git a/27_Civil_War/vbnet/CivilWar.sln b/27_Civil_War/vbnet/CivilWar.sln new file mode 100644 index 00000000..3f696f6f --- /dev/null +++ b/27_Civil_War/vbnet/CivilWar.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CivilWar", "CivilWar.vbproj", "{D726A817-AF69-43B9-9092-876453960C19}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D726A817-AF69-43B9-9092-876453960C19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D726A817-AF69-43B9-9092-876453960C19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D726A817-AF69-43B9-9092-876453960C19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D726A817-AF69-43B9-9092-876453960C19}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/27_Civil_War/vbnet/CivilWar.vbproj b/27_Civil_War/vbnet/CivilWar.vbproj new file mode 100644 index 00000000..d132bbbc --- /dev/null +++ b/27_Civil_War/vbnet/CivilWar.vbproj @@ -0,0 +1,8 @@ + + + Exe + CivilWar + net6.0 + 16.9 + + diff --git a/28_Combat/vbnet/Combat.sln b/28_Combat/vbnet/Combat.sln new file mode 100644 index 00000000..f06a8366 --- /dev/null +++ b/28_Combat/vbnet/Combat.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Combat", "Combat.vbproj", "{B7C67E0E-1493-4957-9FD9-A384D038F024}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B7C67E0E-1493-4957-9FD9-A384D038F024}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7C67E0E-1493-4957-9FD9-A384D038F024}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7C67E0E-1493-4957-9FD9-A384D038F024}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7C67E0E-1493-4957-9FD9-A384D038F024}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/28_Combat/vbnet/Combat.vbproj b/28_Combat/vbnet/Combat.vbproj new file mode 100644 index 00000000..19ba1b19 --- /dev/null +++ b/28_Combat/vbnet/Combat.vbproj @@ -0,0 +1,8 @@ + + + Exe + Combat + net6.0 + 16.9 + + diff --git a/29_Craps/vbnet/Craps.sln b/29_Craps/vbnet/Craps.sln new file mode 100644 index 00000000..7d564508 --- /dev/null +++ b/29_Craps/vbnet/Craps.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Craps", "Craps.vbproj", "{297AA824-815F-4E2B-948C-BDAD2266C5AF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {297AA824-815F-4E2B-948C-BDAD2266C5AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {297AA824-815F-4E2B-948C-BDAD2266C5AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {297AA824-815F-4E2B-948C-BDAD2266C5AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {297AA824-815F-4E2B-948C-BDAD2266C5AF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/29_Craps/vbnet/Craps.vbproj b/29_Craps/vbnet/Craps.vbproj new file mode 100644 index 00000000..a1c6ee27 --- /dev/null +++ b/29_Craps/vbnet/Craps.vbproj @@ -0,0 +1,8 @@ + + + Exe + Craps + net6.0 + 16.9 + + diff --git a/30_Cube/csharp/Cube.csproj b/30_Cube/csharp/Cube.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/30_Cube/csharp/Cube.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/30_Cube/csharp/Cube.sln b/30_Cube/csharp/Cube.sln new file mode 100644 index 00000000..be69dc76 --- /dev/null +++ b/30_Cube/csharp/Cube.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cube", "Cube.csproj", "{CC2F0DBE-EBA0-4275-ACA4-7140E3202889}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CC2F0DBE-EBA0-4275-ACA4-7140E3202889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC2F0DBE-EBA0-4275-ACA4-7140E3202889}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC2F0DBE-EBA0-4275-ACA4-7140E3202889}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC2F0DBE-EBA0-4275-ACA4-7140E3202889}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/30_Cube/vbnet/Cube.sln b/30_Cube/vbnet/Cube.sln new file mode 100644 index 00000000..36f7fc75 --- /dev/null +++ b/30_Cube/vbnet/Cube.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Cube", "Cube.vbproj", "{C4AA207B-37EC-4746-B634-FBFC9522F3F8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C4AA207B-37EC-4746-B634-FBFC9522F3F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4AA207B-37EC-4746-B634-FBFC9522F3F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4AA207B-37EC-4746-B634-FBFC9522F3F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4AA207B-37EC-4746-B634-FBFC9522F3F8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/30_Cube/vbnet/Cube.vbproj b/30_Cube/vbnet/Cube.vbproj new file mode 100644 index 00000000..1cbe484d --- /dev/null +++ b/30_Cube/vbnet/Cube.vbproj @@ -0,0 +1,8 @@ + + + Exe + Cube + net6.0 + 16.9 + + diff --git a/31_Depth_Charge/vbnet/DepthCharge.sln b/31_Depth_Charge/vbnet/DepthCharge.sln new file mode 100644 index 00000000..b042eee0 --- /dev/null +++ b/31_Depth_Charge/vbnet/DepthCharge.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DepthCharge", "DepthCharge.vbproj", "{7F8404FE-7CF2-46AC-B4D4-2CAB5EF3FB2F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7F8404FE-7CF2-46AC-B4D4-2CAB5EF3FB2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F8404FE-7CF2-46AC-B4D4-2CAB5EF3FB2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F8404FE-7CF2-46AC-B4D4-2CAB5EF3FB2F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F8404FE-7CF2-46AC-B4D4-2CAB5EF3FB2F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/31_Depth_Charge/vbnet/DepthCharge.vbproj b/31_Depth_Charge/vbnet/DepthCharge.vbproj new file mode 100644 index 00000000..ee43c035 --- /dev/null +++ b/31_Depth_Charge/vbnet/DepthCharge.vbproj @@ -0,0 +1,8 @@ + + + Exe + DepthCharge + net6.0 + 16.9 + + diff --git a/32_Diamond/csharp/Diamond.csproj b/32_Diamond/csharp/Diamond.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/32_Diamond/csharp/Diamond.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/32_Diamond/csharp/Diamond.sln b/32_Diamond/csharp/Diamond.sln new file mode 100644 index 00000000..2af37dbd --- /dev/null +++ b/32_Diamond/csharp/Diamond.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diamond", "Diamond.csproj", "{44B406C8-70F0-4183-B19A-5B045A1AEBA4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {44B406C8-70F0-4183-B19A-5B045A1AEBA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44B406C8-70F0-4183-B19A-5B045A1AEBA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44B406C8-70F0-4183-B19A-5B045A1AEBA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44B406C8-70F0-4183-B19A-5B045A1AEBA4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/32_Diamond/vbnet/Diamond.sln b/32_Diamond/vbnet/Diamond.sln new file mode 100644 index 00000000..3f05715d --- /dev/null +++ b/32_Diamond/vbnet/Diamond.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Diamond", "Diamond.vbproj", "{87084ED3-F01C-4D7E-8BE7-10C2F3FA148F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {87084ED3-F01C-4D7E-8BE7-10C2F3FA148F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87084ED3-F01C-4D7E-8BE7-10C2F3FA148F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87084ED3-F01C-4D7E-8BE7-10C2F3FA148F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87084ED3-F01C-4D7E-8BE7-10C2F3FA148F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/32_Diamond/vbnet/Diamond.vbproj b/32_Diamond/vbnet/Diamond.vbproj new file mode 100644 index 00000000..069fe872 --- /dev/null +++ b/32_Diamond/vbnet/Diamond.vbproj @@ -0,0 +1,8 @@ + + + Exe + Diamond + net6.0 + 16.9 + + diff --git a/33_Dice/csharp/Dice.sln b/33_Dice/csharp/Dice.sln new file mode 100644 index 00000000..738a8c1c --- /dev/null +++ b/33_Dice/csharp/Dice.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dice", "Dice.csproj", "{D136AC51-DDC0-471A-8EAC-D3C772FA7D51}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D136AC51-DDC0-471A-8EAC-D3C772FA7D51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D136AC51-DDC0-471A-8EAC-D3C772FA7D51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D136AC51-DDC0-471A-8EAC-D3C772FA7D51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D136AC51-DDC0-471A-8EAC-D3C772FA7D51}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/33_Dice/vbnet/Dice.sln b/33_Dice/vbnet/Dice.sln new file mode 100644 index 00000000..afb7b912 --- /dev/null +++ b/33_Dice/vbnet/Dice.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Dice", "Dice.vbproj", "{6410CCD0-0D78-49C9-9B15-70F901A1EB19}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6410CCD0-0D78-49C9-9B15-70F901A1EB19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6410CCD0-0D78-49C9-9B15-70F901A1EB19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6410CCD0-0D78-49C9-9B15-70F901A1EB19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6410CCD0-0D78-49C9-9B15-70F901A1EB19}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/33_Dice/vbnet/Dice.vbproj b/33_Dice/vbnet/Dice.vbproj new file mode 100644 index 00000000..16929f96 --- /dev/null +++ b/33_Dice/vbnet/Dice.vbproj @@ -0,0 +1,8 @@ + + + Exe + Dice + net6.0 + 16.9 + + diff --git a/34_Digits/csharp/Digits.csproj b/34_Digits/csharp/Digits.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/34_Digits/csharp/Digits.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/34_Digits/csharp/Digits.sln b/34_Digits/csharp/Digits.sln new file mode 100644 index 00000000..04b94496 --- /dev/null +++ b/34_Digits/csharp/Digits.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digits", "Digits.csproj", "{BB89211D-85FB-4FC0-AF62-715459227D7E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BB89211D-85FB-4FC0-AF62-715459227D7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB89211D-85FB-4FC0-AF62-715459227D7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB89211D-85FB-4FC0-AF62-715459227D7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB89211D-85FB-4FC0-AF62-715459227D7E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/34_Digits/vbnet/Digits.sln b/34_Digits/vbnet/Digits.sln new file mode 100644 index 00000000..2d5733a9 --- /dev/null +++ b/34_Digits/vbnet/Digits.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Digits", "Digits.vbproj", "{837EB2E4-3EE6-447A-8AF7-91CA08841B93}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {837EB2E4-3EE6-447A-8AF7-91CA08841B93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {837EB2E4-3EE6-447A-8AF7-91CA08841B93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {837EB2E4-3EE6-447A-8AF7-91CA08841B93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {837EB2E4-3EE6-447A-8AF7-91CA08841B93}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/34_Digits/vbnet/Digits.vbproj b/34_Digits/vbnet/Digits.vbproj new file mode 100644 index 00000000..d8f673e1 --- /dev/null +++ b/34_Digits/vbnet/Digits.vbproj @@ -0,0 +1,8 @@ + + + Exe + Digits + net6.0 + 16.9 + + diff --git a/35_Even_Wins/csharp/EvenWins.csproj b/35_Even_Wins/csharp/EvenWins.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/35_Even_Wins/csharp/EvenWins.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/35_Even_Wins/csharp/EvenWins.sln b/35_Even_Wins/csharp/EvenWins.sln new file mode 100644 index 00000000..b384c20c --- /dev/null +++ b/35_Even_Wins/csharp/EvenWins.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EvenWins", "EvenWins.csproj", "{84209510-4089-4147-B220-E41E534A228B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {84209510-4089-4147-B220-E41E534A228B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84209510-4089-4147-B220-E41E534A228B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84209510-4089-4147-B220-E41E534A228B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84209510-4089-4147-B220-E41E534A228B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/35_Even_Wins/vbnet/EvenWins.sln b/35_Even_Wins/vbnet/EvenWins.sln new file mode 100644 index 00000000..0714f204 --- /dev/null +++ b/35_Even_Wins/vbnet/EvenWins.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EvenWins", "EvenWins.vbproj", "{16D44A7A-9C05-4845-8289-3A65A4D978D0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {16D44A7A-9C05-4845-8289-3A65A4D978D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16D44A7A-9C05-4845-8289-3A65A4D978D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16D44A7A-9C05-4845-8289-3A65A4D978D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16D44A7A-9C05-4845-8289-3A65A4D978D0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/35_Even_Wins/vbnet/EvenWins.vbproj b/35_Even_Wins/vbnet/EvenWins.vbproj new file mode 100644 index 00000000..7ca1146f --- /dev/null +++ b/35_Even_Wins/vbnet/EvenWins.vbproj @@ -0,0 +1,8 @@ + + + Exe + EvenWins + net6.0 + 16.9 + + diff --git a/36_Flip_Flop/vbnet/FlipFlop.sln b/36_Flip_Flop/vbnet/FlipFlop.sln new file mode 100644 index 00000000..8301941b --- /dev/null +++ b/36_Flip_Flop/vbnet/FlipFlop.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FlipFlop", "FlipFlop.vbproj", "{4A5887DD-FA0C-47EE-B3A2-E334DCE3544C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4A5887DD-FA0C-47EE-B3A2-E334DCE3544C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A5887DD-FA0C-47EE-B3A2-E334DCE3544C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A5887DD-FA0C-47EE-B3A2-E334DCE3544C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A5887DD-FA0C-47EE-B3A2-E334DCE3544C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/36_Flip_Flop/vbnet/FlipFlop.vbproj b/36_Flip_Flop/vbnet/FlipFlop.vbproj new file mode 100644 index 00000000..388b75c1 --- /dev/null +++ b/36_Flip_Flop/vbnet/FlipFlop.vbproj @@ -0,0 +1,8 @@ + + + Exe + FlipFlop + net6.0 + 16.9 + + diff --git a/37_Football/csharp/Football.csproj b/37_Football/csharp/Football.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/37_Football/csharp/Football.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/37_Football/csharp/Football.sln b/37_Football/csharp/Football.sln new file mode 100644 index 00000000..b0d85b41 --- /dev/null +++ b/37_Football/csharp/Football.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Football", "Football.csproj", "{092442FA-EA04-4A80-AB12-138E18CD480A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {092442FA-EA04-4A80-AB12-138E18CD480A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {092442FA-EA04-4A80-AB12-138E18CD480A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {092442FA-EA04-4A80-AB12-138E18CD480A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {092442FA-EA04-4A80-AB12-138E18CD480A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/37_Football/vbnet/Football.sln b/37_Football/vbnet/Football.sln new file mode 100644 index 00000000..2e177718 --- /dev/null +++ b/37_Football/vbnet/Football.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Football", "Football.vbproj", "{5491221D-33D3-4ADF-9E0A-FB58D5C12EE2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5491221D-33D3-4ADF-9E0A-FB58D5C12EE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5491221D-33D3-4ADF-9E0A-FB58D5C12EE2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5491221D-33D3-4ADF-9E0A-FB58D5C12EE2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5491221D-33D3-4ADF-9E0A-FB58D5C12EE2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/37_Football/vbnet/Football.vbproj b/37_Football/vbnet/Football.vbproj new file mode 100644 index 00000000..ce404640 --- /dev/null +++ b/37_Football/vbnet/Football.vbproj @@ -0,0 +1,8 @@ + + + Exe + Football + net6.0 + 16.9 + + diff --git a/38_Fur_Trader/vbnet/FurTrader.sln b/38_Fur_Trader/vbnet/FurTrader.sln new file mode 100644 index 00000000..cb129718 --- /dev/null +++ b/38_Fur_Trader/vbnet/FurTrader.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FurTrader", "FurTrader.vbproj", "{D8310FB8-132A-4D43-A654-17E5A267DDBD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D8310FB8-132A-4D43-A654-17E5A267DDBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8310FB8-132A-4D43-A654-17E5A267DDBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8310FB8-132A-4D43-A654-17E5A267DDBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8310FB8-132A-4D43-A654-17E5A267DDBD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/38_Fur_Trader/vbnet/FurTrader.vbproj b/38_Fur_Trader/vbnet/FurTrader.vbproj new file mode 100644 index 00000000..61ab6d99 --- /dev/null +++ b/38_Fur_Trader/vbnet/FurTrader.vbproj @@ -0,0 +1,8 @@ + + + Exe + FurTrader + net6.0 + 16.9 + + diff --git a/39_Golf/csharp/Golf.csproj b/39_Golf/csharp/Golf.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/39_Golf/csharp/Golf.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/39_Golf/csharp/Golf.sln b/39_Golf/csharp/Golf.sln new file mode 100644 index 00000000..07c90dde --- /dev/null +++ b/39_Golf/csharp/Golf.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Golf", "Golf.csproj", "{0D91BC87-BADF-445F-876F-38F3A66A3B83}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0D91BC87-BADF-445F-876F-38F3A66A3B83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D91BC87-BADF-445F-876F-38F3A66A3B83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D91BC87-BADF-445F-876F-38F3A66A3B83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D91BC87-BADF-445F-876F-38F3A66A3B83}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/39_Golf/vbnet/Golf.sln b/39_Golf/vbnet/Golf.sln new file mode 100644 index 00000000..6698c79f --- /dev/null +++ b/39_Golf/vbnet/Golf.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Golf", "Golf.vbproj", "{65A2E065-6541-4E6E-B6F0-9881080B5FFF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {65A2E065-6541-4E6E-B6F0-9881080B5FFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65A2E065-6541-4E6E-B6F0-9881080B5FFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65A2E065-6541-4E6E-B6F0-9881080B5FFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65A2E065-6541-4E6E-B6F0-9881080B5FFF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/39_Golf/vbnet/Golf.vbproj b/39_Golf/vbnet/Golf.vbproj new file mode 100644 index 00000000..1a20f831 --- /dev/null +++ b/39_Golf/vbnet/Golf.vbproj @@ -0,0 +1,8 @@ + + + Exe + Golf + net6.0 + 16.9 + + diff --git a/40_Gomoko/csharp/Gomoko.csproj b/40_Gomoko/csharp/Gomoko.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/40_Gomoko/csharp/Gomoko.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/40_Gomoko/csharp/Gomoko.sln b/40_Gomoko/csharp/Gomoko.sln new file mode 100644 index 00000000..84182037 --- /dev/null +++ b/40_Gomoko/csharp/Gomoko.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gomoko", "Gomoko.csproj", "{558B84AB-2010-436E-B191-00980C6CBA61}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {558B84AB-2010-436E-B191-00980C6CBA61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {558B84AB-2010-436E-B191-00980C6CBA61}.Debug|Any CPU.Build.0 = Debug|Any CPU + {558B84AB-2010-436E-B191-00980C6CBA61}.Release|Any CPU.ActiveCfg = Release|Any CPU + {558B84AB-2010-436E-B191-00980C6CBA61}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/40_Gomoko/vbnet/Gomoko.sln b/40_Gomoko/vbnet/Gomoko.sln new file mode 100644 index 00000000..fb1c4673 --- /dev/null +++ b/40_Gomoko/vbnet/Gomoko.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Gomoko", "Gomoko.vbproj", "{AEA608B9-083C-4EE7-9DE7-A0AB4FE313A8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AEA608B9-083C-4EE7-9DE7-A0AB4FE313A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AEA608B9-083C-4EE7-9DE7-A0AB4FE313A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AEA608B9-083C-4EE7-9DE7-A0AB4FE313A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AEA608B9-083C-4EE7-9DE7-A0AB4FE313A8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/40_Gomoko/vbnet/Gomoko.vbproj b/40_Gomoko/vbnet/Gomoko.vbproj new file mode 100644 index 00000000..5350e761 --- /dev/null +++ b/40_Gomoko/vbnet/Gomoko.vbproj @@ -0,0 +1,8 @@ + + + Exe + Gomoko + net6.0 + 16.9 + + diff --git a/41_Guess/csharp/Guess.csproj b/41_Guess/csharp/Guess.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/41_Guess/csharp/Guess.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/41_Guess/csharp/Guess.sln b/41_Guess/csharp/Guess.sln new file mode 100644 index 00000000..c6649256 --- /dev/null +++ b/41_Guess/csharp/Guess.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Guess", "Guess.csproj", "{0D116201-33C0-4C86-A8D5-FF7C9CCC638F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0D116201-33C0-4C86-A8D5-FF7C9CCC638F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D116201-33C0-4C86-A8D5-FF7C9CCC638F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D116201-33C0-4C86-A8D5-FF7C9CCC638F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D116201-33C0-4C86-A8D5-FF7C9CCC638F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/41_Guess/vbnet/Guess.sln b/41_Guess/vbnet/Guess.sln new file mode 100644 index 00000000..2238b0be --- /dev/null +++ b/41_Guess/vbnet/Guess.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Guess", "Guess.vbproj", "{33AB1024-1609-4163-BEAF-BA02A5D42F8A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {33AB1024-1609-4163-BEAF-BA02A5D42F8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33AB1024-1609-4163-BEAF-BA02A5D42F8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33AB1024-1609-4163-BEAF-BA02A5D42F8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33AB1024-1609-4163-BEAF-BA02A5D42F8A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/41_Guess/vbnet/Guess.vbproj b/41_Guess/vbnet/Guess.vbproj new file mode 100644 index 00000000..8a5fe396 --- /dev/null +++ b/41_Guess/vbnet/Guess.vbproj @@ -0,0 +1,8 @@ + + + Exe + Guess + net6.0 + 16.9 + + diff --git a/42_Gunner/csharp/Gunner.sln b/42_Gunner/csharp/Gunner.sln new file mode 100644 index 00000000..bbc80af3 --- /dev/null +++ b/42_Gunner/csharp/Gunner.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp", "csharp.csproj", "{83323E98-D981-4AC2-A74B-36804C9C2497}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {83323E98-D981-4AC2-A74B-36804C9C2497}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83323E98-D981-4AC2-A74B-36804C9C2497}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83323E98-D981-4AC2-A74B-36804C9C2497}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83323E98-D981-4AC2-A74B-36804C9C2497}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/42_Gunner/vbnet/Gunner.sln b/42_Gunner/vbnet/Gunner.sln new file mode 100644 index 00000000..33d68126 --- /dev/null +++ b/42_Gunner/vbnet/Gunner.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Gunner", "Gunner.vbproj", "{CC347B04-B99C-4F77-BFCF-2DDFBB4A135D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CC347B04-B99C-4F77-BFCF-2DDFBB4A135D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC347B04-B99C-4F77-BFCF-2DDFBB4A135D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC347B04-B99C-4F77-BFCF-2DDFBB4A135D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC347B04-B99C-4F77-BFCF-2DDFBB4A135D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/42_Gunner/vbnet/Gunner.vbproj b/42_Gunner/vbnet/Gunner.vbproj new file mode 100644 index 00000000..19918a80 --- /dev/null +++ b/42_Gunner/vbnet/Gunner.vbproj @@ -0,0 +1,8 @@ + + + Exe + Gunner + net6.0 + 16.9 + + diff --git a/43_Hammurabi/vbnet/Hammurabi.sln b/43_Hammurabi/vbnet/Hammurabi.sln new file mode 100644 index 00000000..41a13843 --- /dev/null +++ b/43_Hammurabi/vbnet/Hammurabi.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Hammurabi", "Hammurabi.vbproj", "{52BC86C8-4AE8-4F0C-9566-5E0D97BB17BF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {52BC86C8-4AE8-4F0C-9566-5E0D97BB17BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52BC86C8-4AE8-4F0C-9566-5E0D97BB17BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52BC86C8-4AE8-4F0C-9566-5E0D97BB17BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52BC86C8-4AE8-4F0C-9566-5E0D97BB17BF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/43_Hammurabi/vbnet/Hammurabi.vbproj b/43_Hammurabi/vbnet/Hammurabi.vbproj new file mode 100644 index 00000000..8f89306c --- /dev/null +++ b/43_Hammurabi/vbnet/Hammurabi.vbproj @@ -0,0 +1,8 @@ + + + Exe + Hammurabi + net6.0 + 16.9 + + diff --git a/44_Hangman/vbnet/Hangman.sln b/44_Hangman/vbnet/Hangman.sln new file mode 100644 index 00000000..355c5093 --- /dev/null +++ b/44_Hangman/vbnet/Hangman.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Hangman", "Hangman.vbproj", "{048C4117-70FC-4457-9B1D-BBD1FEDFEB76}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {048C4117-70FC-4457-9B1D-BBD1FEDFEB76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {048C4117-70FC-4457-9B1D-BBD1FEDFEB76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {048C4117-70FC-4457-9B1D-BBD1FEDFEB76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {048C4117-70FC-4457-9B1D-BBD1FEDFEB76}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/44_Hangman/vbnet/Hangman.vbproj b/44_Hangman/vbnet/Hangman.vbproj new file mode 100644 index 00000000..6ad7969c --- /dev/null +++ b/44_Hangman/vbnet/Hangman.vbproj @@ -0,0 +1,8 @@ + + + Exe + Hangman + net6.0 + 16.9 + + diff --git a/45_Hello/csharp/Hello.csproj b/45_Hello/csharp/Hello.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/45_Hello/csharp/Hello.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/45_Hello/csharp/Hello.sln b/45_Hello/csharp/Hello.sln new file mode 100644 index 00000000..216c70b6 --- /dev/null +++ b/45_Hello/csharp/Hello.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hello", "Hello.csproj", "{8ECD89E1-D9E1-4FA5-97B6-B1E68FE1CA16}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8ECD89E1-D9E1-4FA5-97B6-B1E68FE1CA16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8ECD89E1-D9E1-4FA5-97B6-B1E68FE1CA16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8ECD89E1-D9E1-4FA5-97B6-B1E68FE1CA16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8ECD89E1-D9E1-4FA5-97B6-B1E68FE1CA16}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/45_Hello/vbnet/Hello.sln b/45_Hello/vbnet/Hello.sln new file mode 100644 index 00000000..72ecdc64 --- /dev/null +++ b/45_Hello/vbnet/Hello.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Hello", "Hello.vbproj", "{7E2BDA03-A9F7-4DE5-AB8F-222DD87C833D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7E2BDA03-A9F7-4DE5-AB8F-222DD87C833D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E2BDA03-A9F7-4DE5-AB8F-222DD87C833D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E2BDA03-A9F7-4DE5-AB8F-222DD87C833D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E2BDA03-A9F7-4DE5-AB8F-222DD87C833D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/45_Hello/vbnet/Hello.vbproj b/45_Hello/vbnet/Hello.vbproj new file mode 100644 index 00000000..9b55d805 --- /dev/null +++ b/45_Hello/vbnet/Hello.vbproj @@ -0,0 +1,8 @@ + + + Exe + Hello + net6.0 + 16.9 + + diff --git a/46_Hexapawn/vbnet/Hexapawn.sln b/46_Hexapawn/vbnet/Hexapawn.sln new file mode 100644 index 00000000..5aff142b --- /dev/null +++ b/46_Hexapawn/vbnet/Hexapawn.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Hexapawn", "Hexapawn.vbproj", "{83C2A51C-6014-4CC7-A4AF-81004B5F721F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {83C2A51C-6014-4CC7-A4AF-81004B5F721F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83C2A51C-6014-4CC7-A4AF-81004B5F721F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83C2A51C-6014-4CC7-A4AF-81004B5F721F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83C2A51C-6014-4CC7-A4AF-81004B5F721F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/46_Hexapawn/vbnet/Hexapawn.vbproj b/46_Hexapawn/vbnet/Hexapawn.vbproj new file mode 100644 index 00000000..4ed34b92 --- /dev/null +++ b/46_Hexapawn/vbnet/Hexapawn.vbproj @@ -0,0 +1,8 @@ + + + Exe + Hexapawn + net6.0 + 16.9 + + diff --git a/47_Hi-Lo/csharp/HiLo.sln b/47_Hi-Lo/csharp/HiLo.sln new file mode 100644 index 00000000..b735d83d --- /dev/null +++ b/47_Hi-Lo/csharp/HiLo.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hi-lo", "hi-lo.csproj", "{59721819-A474-4348-8E3D-5F2FCA5D95FA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {59721819-A474-4348-8E3D-5F2FCA5D95FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59721819-A474-4348-8E3D-5F2FCA5D95FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59721819-A474-4348-8E3D-5F2FCA5D95FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59721819-A474-4348-8E3D-5F2FCA5D95FA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/47_Hi-Lo/vbnet/HiLo.sln b/47_Hi-Lo/vbnet/HiLo.sln new file mode 100644 index 00000000..fbd97f94 --- /dev/null +++ b/47_Hi-Lo/vbnet/HiLo.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HiLo", "HiLo.vbproj", "{B93E0994-AEC4-4FC9-93C2-FC708368B32F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B93E0994-AEC4-4FC9-93C2-FC708368B32F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B93E0994-AEC4-4FC9-93C2-FC708368B32F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B93E0994-AEC4-4FC9-93C2-FC708368B32F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B93E0994-AEC4-4FC9-93C2-FC708368B32F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/47_Hi-Lo/vbnet/HiLo.vbproj b/47_Hi-Lo/vbnet/HiLo.vbproj new file mode 100644 index 00000000..634099d3 --- /dev/null +++ b/47_Hi-Lo/vbnet/HiLo.vbproj @@ -0,0 +1,8 @@ + + + Exe + HiLo + net6.0 + 16.9 + + diff --git a/48_High_IQ/csharp/HighIQ.csproj b/48_High_IQ/csharp/HighIQ.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/48_High_IQ/csharp/HighIQ.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/48_High_IQ/csharp/HighIQ.sln b/48_High_IQ/csharp/HighIQ.sln new file mode 100644 index 00000000..2cdbddc4 --- /dev/null +++ b/48_High_IQ/csharp/HighIQ.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighIQ", "HighIQ.csproj", "{B334E0AD-4A84-4F93-85FB-E6370BC8B71A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B334E0AD-4A84-4F93-85FB-E6370BC8B71A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B334E0AD-4A84-4F93-85FB-E6370BC8B71A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B334E0AD-4A84-4F93-85FB-E6370BC8B71A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B334E0AD-4A84-4F93-85FB-E6370BC8B71A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/48_High_IQ/vbnet/HighIQ.sln b/48_High_IQ/vbnet/HighIQ.sln new file mode 100644 index 00000000..ca1f79c5 --- /dev/null +++ b/48_High_IQ/vbnet/HighIQ.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HighIQ", "HighIQ.vbproj", "{18AA4FCA-2733-4BBC-B65F-68C37B8CFDAF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {18AA4FCA-2733-4BBC-B65F-68C37B8CFDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18AA4FCA-2733-4BBC-B65F-68C37B8CFDAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18AA4FCA-2733-4BBC-B65F-68C37B8CFDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18AA4FCA-2733-4BBC-B65F-68C37B8CFDAF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/48_High_IQ/vbnet/HighIQ.vbproj b/48_High_IQ/vbnet/HighIQ.vbproj new file mode 100644 index 00000000..c37eb8db --- /dev/null +++ b/48_High_IQ/vbnet/HighIQ.vbproj @@ -0,0 +1,8 @@ + + + Exe + HighIQ + net6.0 + 16.9 + + diff --git a/49_Hockey/csharp/Hockey.csproj b/49_Hockey/csharp/Hockey.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/49_Hockey/csharp/Hockey.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/49_Hockey/csharp/Hockey.sln b/49_Hockey/csharp/Hockey.sln new file mode 100644 index 00000000..d2ca8d36 --- /dev/null +++ b/49_Hockey/csharp/Hockey.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hockey", "Hockey.csproj", "{98E2914A-41D4-4931-B17F-4EAD3C98CFE1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {98E2914A-41D4-4931-B17F-4EAD3C98CFE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98E2914A-41D4-4931-B17F-4EAD3C98CFE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98E2914A-41D4-4931-B17F-4EAD3C98CFE1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98E2914A-41D4-4931-B17F-4EAD3C98CFE1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/49_Hockey/vbnet/Hockey.sln b/49_Hockey/vbnet/Hockey.sln new file mode 100644 index 00000000..396cfe92 --- /dev/null +++ b/49_Hockey/vbnet/Hockey.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Hockey", "Hockey.vbproj", "{9ED23BC7-7C12-4B48-8E85-F21E310813D5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9ED23BC7-7C12-4B48-8E85-F21E310813D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9ED23BC7-7C12-4B48-8E85-F21E310813D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9ED23BC7-7C12-4B48-8E85-F21E310813D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9ED23BC7-7C12-4B48-8E85-F21E310813D5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/49_Hockey/vbnet/Hockey.vbproj b/49_Hockey/vbnet/Hockey.vbproj new file mode 100644 index 00000000..59df31bf --- /dev/null +++ b/49_Hockey/vbnet/Hockey.vbproj @@ -0,0 +1,8 @@ + + + Exe + Hockey + net6.0 + 16.9 + + diff --git a/50_Horserace/csharp/Horserace.csproj b/50_Horserace/csharp/Horserace.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/50_Horserace/csharp/Horserace.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/50_Horserace/csharp/Horserace.sln b/50_Horserace/csharp/Horserace.sln new file mode 100644 index 00000000..17d7fae3 --- /dev/null +++ b/50_Horserace/csharp/Horserace.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Horserace", "Horserace.csproj", "{B1CD8505-43BA-4C2C-A458-54E14539DB35}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B1CD8505-43BA-4C2C-A458-54E14539DB35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1CD8505-43BA-4C2C-A458-54E14539DB35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1CD8505-43BA-4C2C-A458-54E14539DB35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1CD8505-43BA-4C2C-A458-54E14539DB35}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/50_Horserace/vbnet/Horserace.sln b/50_Horserace/vbnet/Horserace.sln new file mode 100644 index 00000000..63adf310 --- /dev/null +++ b/50_Horserace/vbnet/Horserace.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Horserace", "Horserace.vbproj", "{B44BF36F-DF93-4374-A3A0-C6D447B4D0A7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B44BF36F-DF93-4374-A3A0-C6D447B4D0A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B44BF36F-DF93-4374-A3A0-C6D447B4D0A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B44BF36F-DF93-4374-A3A0-C6D447B4D0A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B44BF36F-DF93-4374-A3A0-C6D447B4D0A7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/50_Horserace/vbnet/Horserace.vbproj b/50_Horserace/vbnet/Horserace.vbproj new file mode 100644 index 00000000..245d9098 --- /dev/null +++ b/50_Horserace/vbnet/Horserace.vbproj @@ -0,0 +1,8 @@ + + + Exe + Horserace + net6.0 + 16.9 + + diff --git a/51_Hurkle/csharp/Hurkle.sln b/51_Hurkle/csharp/Hurkle.sln new file mode 100644 index 00000000..e1792677 --- /dev/null +++ b/51_Hurkle/csharp/Hurkle.sln @@ -0,0 +1,27 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EBE7BC2B-8F2E-41D5-AF36-7AAC7CE0E1BF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hurkle", "src\hurkle\hurkle.csproj", "{47578EC1-A012-4BF7-8709-64F675E72DB0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {47578EC1-A012-4BF7-8709-64F675E72DB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47578EC1-A012-4BF7-8709-64F675E72DB0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47578EC1-A012-4BF7-8709-64F675E72DB0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47578EC1-A012-4BF7-8709-64F675E72DB0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {47578EC1-A012-4BF7-8709-64F675E72DB0} = {EBE7BC2B-8F2E-41D5-AF36-7AAC7CE0E1BF} + EndGlobalSection +EndGlobal diff --git a/51_Hurkle/vbnet/Hurkle.sln b/51_Hurkle/vbnet/Hurkle.sln new file mode 100644 index 00000000..dda01502 --- /dev/null +++ b/51_Hurkle/vbnet/Hurkle.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Hurkle", "Hurkle.vbproj", "{63674AC0-0FE6-467F-B2D0-016105155ADE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {63674AC0-0FE6-467F-B2D0-016105155ADE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63674AC0-0FE6-467F-B2D0-016105155ADE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63674AC0-0FE6-467F-B2D0-016105155ADE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63674AC0-0FE6-467F-B2D0-016105155ADE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/51_Hurkle/vbnet/Hurkle.vbproj b/51_Hurkle/vbnet/Hurkle.vbproj new file mode 100644 index 00000000..9d93e823 --- /dev/null +++ b/51_Hurkle/vbnet/Hurkle.vbproj @@ -0,0 +1,8 @@ + + + Exe + Hurkle + net6.0 + 16.9 + + diff --git a/52_Kinema/csharp/Kinema.csproj b/52_Kinema/csharp/Kinema.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/52_Kinema/csharp/Kinema.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/52_Kinema/csharp/Kinema.sln b/52_Kinema/csharp/Kinema.sln new file mode 100644 index 00000000..ddd98662 --- /dev/null +++ b/52_Kinema/csharp/Kinema.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kinema", "Kinema.csproj", "{FD7FF20E-F7A8-4372-BF7C-6898BDEF53D7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FD7FF20E-F7A8-4372-BF7C-6898BDEF53D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD7FF20E-F7A8-4372-BF7C-6898BDEF53D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD7FF20E-F7A8-4372-BF7C-6898BDEF53D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD7FF20E-F7A8-4372-BF7C-6898BDEF53D7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/52_Kinema/vbnet/Kinema.sln b/52_Kinema/vbnet/Kinema.sln new file mode 100644 index 00000000..a669536c --- /dev/null +++ b/52_Kinema/vbnet/Kinema.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Kinema", "Kinema.vbproj", "{C929831F-0B1C-4EE4-9BAA-001BE5CCC2E2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C929831F-0B1C-4EE4-9BAA-001BE5CCC2E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C929831F-0B1C-4EE4-9BAA-001BE5CCC2E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C929831F-0B1C-4EE4-9BAA-001BE5CCC2E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C929831F-0B1C-4EE4-9BAA-001BE5CCC2E2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/52_Kinema/vbnet/Kinema.vbproj b/52_Kinema/vbnet/Kinema.vbproj new file mode 100644 index 00000000..b779698b --- /dev/null +++ b/52_Kinema/vbnet/Kinema.vbproj @@ -0,0 +1,8 @@ + + + Exe + Kinema + net6.0 + 16.9 + + diff --git a/53_King/csharp/King.csproj b/53_King/csharp/King.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/53_King/csharp/King.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/53_King/csharp/King.sln b/53_King/csharp/King.sln new file mode 100644 index 00000000..94eb4d7d --- /dev/null +++ b/53_King/csharp/King.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "King", "King.csproj", "{6CB6A32F-FFC7-4839-AAE2-4091D349BD34}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6CB6A32F-FFC7-4839-AAE2-4091D349BD34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CB6A32F-FFC7-4839-AAE2-4091D349BD34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CB6A32F-FFC7-4839-AAE2-4091D349BD34}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CB6A32F-FFC7-4839-AAE2-4091D349BD34}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/53_King/vbnet/King.sln b/53_King/vbnet/King.sln new file mode 100644 index 00000000..c5bdb50c --- /dev/null +++ b/53_King/vbnet/King.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "King", "King.vbproj", "{043D7CC7-1FFC-438E-BB00-31CB467BEB73}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {043D7CC7-1FFC-438E-BB00-31CB467BEB73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {043D7CC7-1FFC-438E-BB00-31CB467BEB73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {043D7CC7-1FFC-438E-BB00-31CB467BEB73}.Release|Any CPU.ActiveCfg = Release|Any CPU + {043D7CC7-1FFC-438E-BB00-31CB467BEB73}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/53_King/vbnet/King.vbproj b/53_King/vbnet/King.vbproj new file mode 100644 index 00000000..62bef191 --- /dev/null +++ b/53_King/vbnet/King.vbproj @@ -0,0 +1,8 @@ + + + Exe + King + net6.0 + 16.9 + + diff --git a/54_Letter/csharp/Letter.csproj b/54_Letter/csharp/Letter.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/54_Letter/csharp/Letter.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/54_Letter/csharp/Letter.sln b/54_Letter/csharp/Letter.sln new file mode 100644 index 00000000..3f567521 --- /dev/null +++ b/54_Letter/csharp/Letter.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Letter", "Letter.csproj", "{8BE20DCF-A729-46ED-92EA-55866844EB93}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8BE20DCF-A729-46ED-92EA-55866844EB93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BE20DCF-A729-46ED-92EA-55866844EB93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BE20DCF-A729-46ED-92EA-55866844EB93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BE20DCF-A729-46ED-92EA-55866844EB93}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/54_Letter/vbnet/Letter.sln b/54_Letter/vbnet/Letter.sln new file mode 100644 index 00000000..e2896128 --- /dev/null +++ b/54_Letter/vbnet/Letter.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Letter", "Letter.vbproj", "{15392FFC-0EBB-4CA3-970F-8AC32DE84724}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {15392FFC-0EBB-4CA3-970F-8AC32DE84724}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15392FFC-0EBB-4CA3-970F-8AC32DE84724}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15392FFC-0EBB-4CA3-970F-8AC32DE84724}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15392FFC-0EBB-4CA3-970F-8AC32DE84724}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/54_Letter/vbnet/Letter.vbproj b/54_Letter/vbnet/Letter.vbproj new file mode 100644 index 00000000..0c55e2e6 --- /dev/null +++ b/54_Letter/vbnet/Letter.vbproj @@ -0,0 +1,8 @@ + + + Exe + Letter + net6.0 + 16.9 + + diff --git a/55_Life/vbnet/Life.sln b/55_Life/vbnet/Life.sln new file mode 100644 index 00000000..8feae175 --- /dev/null +++ b/55_Life/vbnet/Life.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Life", "Life.vbproj", "{05455AEE-3BE0-4DDD-A59E-89F862EF68AE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {05455AEE-3BE0-4DDD-A59E-89F862EF68AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05455AEE-3BE0-4DDD-A59E-89F862EF68AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05455AEE-3BE0-4DDD-A59E-89F862EF68AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05455AEE-3BE0-4DDD-A59E-89F862EF68AE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/55_Life/vbnet/Life.vbproj b/55_Life/vbnet/Life.vbproj new file mode 100644 index 00000000..5d62487f --- /dev/null +++ b/55_Life/vbnet/Life.vbproj @@ -0,0 +1,8 @@ + + + Exe + Life + net6.0 + 16.9 + + diff --git a/56_Life_for_Two/csharp/LifeforTwo.csproj b/56_Life_for_Two/csharp/LifeforTwo.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/56_Life_for_Two/csharp/LifeforTwo.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/56_Life_for_Two/csharp/LifeforTwo.sln b/56_Life_for_Two/csharp/LifeforTwo.sln new file mode 100644 index 00000000..7a5585cb --- /dev/null +++ b/56_Life_for_Two/csharp/LifeforTwo.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LifeforTwo", "LifeforTwo.csproj", "{B2BFE429-A4BC-4CEA-881E-32382182EA32}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B2BFE429-A4BC-4CEA-881E-32382182EA32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2BFE429-A4BC-4CEA-881E-32382182EA32}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2BFE429-A4BC-4CEA-881E-32382182EA32}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2BFE429-A4BC-4CEA-881E-32382182EA32}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/56_Life_for_Two/vbnet/LifeforTwo.sln b/56_Life_for_Two/vbnet/LifeforTwo.sln new file mode 100644 index 00000000..2d5167d3 --- /dev/null +++ b/56_Life_for_Two/vbnet/LifeforTwo.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "LifeforTwo", "LifeforTwo.vbproj", "{571A55BD-86BA-4DD2-9769-B258E7654586}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {571A55BD-86BA-4DD2-9769-B258E7654586}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {571A55BD-86BA-4DD2-9769-B258E7654586}.Debug|Any CPU.Build.0 = Debug|Any CPU + {571A55BD-86BA-4DD2-9769-B258E7654586}.Release|Any CPU.ActiveCfg = Release|Any CPU + {571A55BD-86BA-4DD2-9769-B258E7654586}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/56_Life_for_Two/vbnet/LifeforTwo.vbproj b/56_Life_for_Two/vbnet/LifeforTwo.vbproj new file mode 100644 index 00000000..31087af1 --- /dev/null +++ b/56_Life_for_Two/vbnet/LifeforTwo.vbproj @@ -0,0 +1,8 @@ + + + Exe + LifeforTwo + net6.0 + 16.9 + + diff --git a/57_Literature_Quiz/csharp/LiteratureQuiz.csproj b/57_Literature_Quiz/csharp/LiteratureQuiz.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/57_Literature_Quiz/csharp/LiteratureQuiz.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/57_Literature_Quiz/csharp/LiteratureQuiz.sln b/57_Literature_Quiz/csharp/LiteratureQuiz.sln new file mode 100644 index 00000000..8ba67c92 --- /dev/null +++ b/57_Literature_Quiz/csharp/LiteratureQuiz.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiteratureQuiz", "LiteratureQuiz.csproj", "{1B77EECB-5ECC-41E5-BD12-519CA4C745AE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1B77EECB-5ECC-41E5-BD12-519CA4C745AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B77EECB-5ECC-41E5-BD12-519CA4C745AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B77EECB-5ECC-41E5-BD12-519CA4C745AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B77EECB-5ECC-41E5-BD12-519CA4C745AE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/57_Literature_Quiz/vbnet/LiteratureQuiz.sln b/57_Literature_Quiz/vbnet/LiteratureQuiz.sln new file mode 100644 index 00000000..67ca803d --- /dev/null +++ b/57_Literature_Quiz/vbnet/LiteratureQuiz.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "LiteratureQuiz", "LiteratureQuiz.vbproj", "{7897F5C5-055B-449D-9BD5-1F631DA87D06}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7897F5C5-055B-449D-9BD5-1F631DA87D06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7897F5C5-055B-449D-9BD5-1F631DA87D06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7897F5C5-055B-449D-9BD5-1F631DA87D06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7897F5C5-055B-449D-9BD5-1F631DA87D06}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/57_Literature_Quiz/vbnet/LiteratureQuiz.vbproj b/57_Literature_Quiz/vbnet/LiteratureQuiz.vbproj new file mode 100644 index 00000000..32c35664 --- /dev/null +++ b/57_Literature_Quiz/vbnet/LiteratureQuiz.vbproj @@ -0,0 +1,8 @@ + + + Exe + LiteratureQuiz + net6.0 + 16.9 + + diff --git a/58_Love/vbnet/Love.sln b/58_Love/vbnet/Love.sln new file mode 100644 index 00000000..44ae6e7f --- /dev/null +++ b/58_Love/vbnet/Love.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Love", "Love.vbproj", "{440AD3C3-D842-4717-BB4D-C54463F59ECA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {440AD3C3-D842-4717-BB4D-C54463F59ECA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {440AD3C3-D842-4717-BB4D-C54463F59ECA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {440AD3C3-D842-4717-BB4D-C54463F59ECA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {440AD3C3-D842-4717-BB4D-C54463F59ECA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/58_Love/vbnet/Love.vbproj b/58_Love/vbnet/Love.vbproj new file mode 100644 index 00000000..444df2a3 --- /dev/null +++ b/58_Love/vbnet/Love.vbproj @@ -0,0 +1,8 @@ + + + Exe + Love + net6.0 + 16.9 + + diff --git a/59_Lunar_LEM_Rocket/csharp/LunarLEMRocket.csproj b/59_Lunar_LEM_Rocket/csharp/LunarLEMRocket.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/59_Lunar_LEM_Rocket/csharp/LunarLEMRocket.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/59_Lunar_LEM_Rocket/csharp/LunarLEMRocket.sln b/59_Lunar_LEM_Rocket/csharp/LunarLEMRocket.sln new file mode 100644 index 00000000..4f74244d --- /dev/null +++ b/59_Lunar_LEM_Rocket/csharp/LunarLEMRocket.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LunarLEMRocket", "LunarLEMRocket.csproj", "{12D3D8F6-5468-49BD-BDD6-E9B4D5954496}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {12D3D8F6-5468-49BD-BDD6-E9B4D5954496}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12D3D8F6-5468-49BD-BDD6-E9B4D5954496}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12D3D8F6-5468-49BD-BDD6-E9B4D5954496}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12D3D8F6-5468-49BD-BDD6-E9B4D5954496}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/59_Lunar_LEM_Rocket/vbnet/LunarLEMRocket.sln b/59_Lunar_LEM_Rocket/vbnet/LunarLEMRocket.sln new file mode 100644 index 00000000..a77348e6 --- /dev/null +++ b/59_Lunar_LEM_Rocket/vbnet/LunarLEMRocket.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "LunarLEMRocket", "LunarLEMRocket.vbproj", "{6145C5DF-CFFB-42B8-9025-913D9D4A8B10}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6145C5DF-CFFB-42B8-9025-913D9D4A8B10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6145C5DF-CFFB-42B8-9025-913D9D4A8B10}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6145C5DF-CFFB-42B8-9025-913D9D4A8B10}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6145C5DF-CFFB-42B8-9025-913D9D4A8B10}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/59_Lunar_LEM_Rocket/vbnet/LunarLEMRocket.vbproj b/59_Lunar_LEM_Rocket/vbnet/LunarLEMRocket.vbproj new file mode 100644 index 00000000..553bdcd5 --- /dev/null +++ b/59_Lunar_LEM_Rocket/vbnet/LunarLEMRocket.vbproj @@ -0,0 +1,8 @@ + + + Exe + LunarLEMRocket + net6.0 + 16.9 + + diff --git a/60_Mastermind/vbnet/Mastermind.sln b/60_Mastermind/vbnet/Mastermind.sln new file mode 100644 index 00000000..5ea0a369 --- /dev/null +++ b/60_Mastermind/vbnet/Mastermind.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Mastermind", "Mastermind.vbproj", "{B32A8054-8790-4810-93A8-CD0C740CEBD5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B32A8054-8790-4810-93A8-CD0C740CEBD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B32A8054-8790-4810-93A8-CD0C740CEBD5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B32A8054-8790-4810-93A8-CD0C740CEBD5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B32A8054-8790-4810-93A8-CD0C740CEBD5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/60_Mastermind/vbnet/Mastermind.vbproj b/60_Mastermind/vbnet/Mastermind.vbproj new file mode 100644 index 00000000..dc0b7890 --- /dev/null +++ b/60_Mastermind/vbnet/Mastermind.vbproj @@ -0,0 +1,8 @@ + + + Exe + Mastermind + net6.0 + 16.9 + + diff --git a/61_Math_Dice/vbnet/MathDice.sln b/61_Math_Dice/vbnet/MathDice.sln new file mode 100644 index 00000000..4fe58a59 --- /dev/null +++ b/61_Math_Dice/vbnet/MathDice.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "MathDice", "MathDice.vbproj", "{1341C416-E919-4262-B378-113A6B6317DD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1341C416-E919-4262-B378-113A6B6317DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1341C416-E919-4262-B378-113A6B6317DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1341C416-E919-4262-B378-113A6B6317DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1341C416-E919-4262-B378-113A6B6317DD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/61_Math_Dice/vbnet/MathDice.vbproj b/61_Math_Dice/vbnet/MathDice.vbproj new file mode 100644 index 00000000..dd19501b --- /dev/null +++ b/61_Math_Dice/vbnet/MathDice.vbproj @@ -0,0 +1,8 @@ + + + Exe + MathDice + net6.0 + 16.9 + + diff --git a/62_Mugwump/vbnet/Mugwump.sln b/62_Mugwump/vbnet/Mugwump.sln new file mode 100644 index 00000000..49f0dd09 --- /dev/null +++ b/62_Mugwump/vbnet/Mugwump.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Mugwump", "Mugwump.vbproj", "{5A0B0AE7-4148-42CB-8010-5A0683E3CF3A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5A0B0AE7-4148-42CB-8010-5A0683E3CF3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A0B0AE7-4148-42CB-8010-5A0683E3CF3A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A0B0AE7-4148-42CB-8010-5A0683E3CF3A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A0B0AE7-4148-42CB-8010-5A0683E3CF3A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/62_Mugwump/vbnet/Mugwump.vbproj b/62_Mugwump/vbnet/Mugwump.vbproj new file mode 100644 index 00000000..50f8a0a1 --- /dev/null +++ b/62_Mugwump/vbnet/Mugwump.vbproj @@ -0,0 +1,8 @@ + + + Exe + Mugwump + net6.0 + 16.9 + + diff --git a/63_Name/vbnet/Name.sln b/63_Name/vbnet/Name.sln new file mode 100644 index 00000000..29b92356 --- /dev/null +++ b/63_Name/vbnet/Name.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Name", "Name.vbproj", "{178E4E2F-5264-47A1-9BC6-2B724E7DCC79}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {178E4E2F-5264-47A1-9BC6-2B724E7DCC79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {178E4E2F-5264-47A1-9BC6-2B724E7DCC79}.Debug|Any CPU.Build.0 = Debug|Any CPU + {178E4E2F-5264-47A1-9BC6-2B724E7DCC79}.Release|Any CPU.ActiveCfg = Release|Any CPU + {178E4E2F-5264-47A1-9BC6-2B724E7DCC79}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/63_Name/vbnet/Name.vbproj b/63_Name/vbnet/Name.vbproj new file mode 100644 index 00000000..a06d78f3 --- /dev/null +++ b/63_Name/vbnet/Name.vbproj @@ -0,0 +1,8 @@ + + + Exe + Name + net6.0 + 16.9 + + diff --git a/64_Nicomachus/csharp/Nicomachus.csproj b/64_Nicomachus/csharp/Nicomachus.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/64_Nicomachus/csharp/Nicomachus.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/64_Nicomachus/csharp/Nicomachus.sln b/64_Nicomachus/csharp/Nicomachus.sln new file mode 100644 index 00000000..5287cabf --- /dev/null +++ b/64_Nicomachus/csharp/Nicomachus.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nicomachus", "Nicomachus.csproj", "{AC3B6DDA-13CE-40FC-B9E0-4246390DFC20}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AC3B6DDA-13CE-40FC-B9E0-4246390DFC20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC3B6DDA-13CE-40FC-B9E0-4246390DFC20}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC3B6DDA-13CE-40FC-B9E0-4246390DFC20}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC3B6DDA-13CE-40FC-B9E0-4246390DFC20}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/64_Nicomachus/vbnet/Nicomachus.sln b/64_Nicomachus/vbnet/Nicomachus.sln new file mode 100644 index 00000000..bea341c4 --- /dev/null +++ b/64_Nicomachus/vbnet/Nicomachus.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Nicomachus", "Nicomachus.vbproj", "{B4987617-A235-4CBA-A158-A668B6C36FE1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B4987617-A235-4CBA-A158-A668B6C36FE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4987617-A235-4CBA-A158-A668B6C36FE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4987617-A235-4CBA-A158-A668B6C36FE1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4987617-A235-4CBA-A158-A668B6C36FE1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/64_Nicomachus/vbnet/Nicomachus.vbproj b/64_Nicomachus/vbnet/Nicomachus.vbproj new file mode 100644 index 00000000..404fd9d9 --- /dev/null +++ b/64_Nicomachus/vbnet/Nicomachus.vbproj @@ -0,0 +1,8 @@ + + + Exe + Nicomachus + net6.0 + 16.9 + + diff --git a/65_Nim/csharp/Nim.csproj b/65_Nim/csharp/Nim.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/65_Nim/csharp/Nim.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/65_Nim/csharp/Nim.sln b/65_Nim/csharp/Nim.sln new file mode 100644 index 00000000..dd324894 --- /dev/null +++ b/65_Nim/csharp/Nim.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nim", "Nim.csproj", "{00B15B50-9CB1-46B1-8066-5877F972EE88}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {00B15B50-9CB1-46B1-8066-5877F972EE88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00B15B50-9CB1-46B1-8066-5877F972EE88}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00B15B50-9CB1-46B1-8066-5877F972EE88}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00B15B50-9CB1-46B1-8066-5877F972EE88}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/65_Nim/vbnet/Nim.sln b/65_Nim/vbnet/Nim.sln new file mode 100644 index 00000000..17c6bf86 --- /dev/null +++ b/65_Nim/vbnet/Nim.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Nim", "Nim.vbproj", "{224F08AA-BE60-4B49-877F-36F239C56F6F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {224F08AA-BE60-4B49-877F-36F239C56F6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {224F08AA-BE60-4B49-877F-36F239C56F6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {224F08AA-BE60-4B49-877F-36F239C56F6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {224F08AA-BE60-4B49-877F-36F239C56F6F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/65_Nim/vbnet/Nim.vbproj b/65_Nim/vbnet/Nim.vbproj new file mode 100644 index 00000000..f551edd0 --- /dev/null +++ b/65_Nim/vbnet/Nim.vbproj @@ -0,0 +1,8 @@ + + + Exe + Nim + net6.0 + 16.9 + + diff --git a/66_Number/csharp/Number.csproj b/66_Number/csharp/Number.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/66_Number/csharp/Number.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/66_Number/csharp/Number.sln b/66_Number/csharp/Number.sln new file mode 100644 index 00000000..f42e7e2a --- /dev/null +++ b/66_Number/csharp/Number.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Number", "Number.csproj", "{F39E3DE8-3564-424C-AD89-D47478FD6E47}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F39E3DE8-3564-424C-AD89-D47478FD6E47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F39E3DE8-3564-424C-AD89-D47478FD6E47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F39E3DE8-3564-424C-AD89-D47478FD6E47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F39E3DE8-3564-424C-AD89-D47478FD6E47}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/66_Number/vbnet/Number.sln b/66_Number/vbnet/Number.sln new file mode 100644 index 00000000..d0838e1a --- /dev/null +++ b/66_Number/vbnet/Number.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Number", "Number.vbproj", "{FEF524F1-E940-43AF-A7EF-4D0DEB1E3F1E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FEF524F1-E940-43AF-A7EF-4D0DEB1E3F1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEF524F1-E940-43AF-A7EF-4D0DEB1E3F1E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEF524F1-E940-43AF-A7EF-4D0DEB1E3F1E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEF524F1-E940-43AF-A7EF-4D0DEB1E3F1E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/66_Number/vbnet/Number.vbproj b/66_Number/vbnet/Number.vbproj new file mode 100644 index 00000000..ad922daf --- /dev/null +++ b/66_Number/vbnet/Number.vbproj @@ -0,0 +1,8 @@ + + + Exe + Number + net6.0 + 16.9 + + diff --git a/67_One_Check/csharp/OneCheck.csproj b/67_One_Check/csharp/OneCheck.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/67_One_Check/csharp/OneCheck.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/67_One_Check/csharp/OneCheck.sln b/67_One_Check/csharp/OneCheck.sln new file mode 100644 index 00000000..f6a550c7 --- /dev/null +++ b/67_One_Check/csharp/OneCheck.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneCheck", "OneCheck.csproj", "{3964167F-17D8-44FB-A9F7-EA2DB1C5DA3F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3964167F-17D8-44FB-A9F7-EA2DB1C5DA3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3964167F-17D8-44FB-A9F7-EA2DB1C5DA3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3964167F-17D8-44FB-A9F7-EA2DB1C5DA3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3964167F-17D8-44FB-A9F7-EA2DB1C5DA3F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/67_One_Check/vbnet/OneCheck.sln b/67_One_Check/vbnet/OneCheck.sln new file mode 100644 index 00000000..d641e964 --- /dev/null +++ b/67_One_Check/vbnet/OneCheck.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "OneCheck", "OneCheck.vbproj", "{E19E8AE0-06FE-4EB5-9F24-7FF74D65F55A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E19E8AE0-06FE-4EB5-9F24-7FF74D65F55A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E19E8AE0-06FE-4EB5-9F24-7FF74D65F55A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E19E8AE0-06FE-4EB5-9F24-7FF74D65F55A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E19E8AE0-06FE-4EB5-9F24-7FF74D65F55A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/67_One_Check/vbnet/OneCheck.vbproj b/67_One_Check/vbnet/OneCheck.vbproj new file mode 100644 index 00000000..2b36f16f --- /dev/null +++ b/67_One_Check/vbnet/OneCheck.vbproj @@ -0,0 +1,8 @@ + + + Exe + OneCheck + net6.0 + 16.9 + + diff --git a/68_Orbit/csharp/Orbit.csproj b/68_Orbit/csharp/Orbit.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/68_Orbit/csharp/Orbit.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/68_Orbit/csharp/Orbit.sln b/68_Orbit/csharp/Orbit.sln new file mode 100644 index 00000000..0ca7e270 --- /dev/null +++ b/68_Orbit/csharp/Orbit.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orbit", "Orbit.csproj", "{2912E79E-D9A2-488F-B77E-7C348E3347E7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2912E79E-D9A2-488F-B77E-7C348E3347E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2912E79E-D9A2-488F-B77E-7C348E3347E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2912E79E-D9A2-488F-B77E-7C348E3347E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2912E79E-D9A2-488F-B77E-7C348E3347E7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/68_Orbit/vbnet/Orbit.sln b/68_Orbit/vbnet/Orbit.sln new file mode 100644 index 00000000..b2b021d1 --- /dev/null +++ b/68_Orbit/vbnet/Orbit.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Orbit", "Orbit.vbproj", "{4EC039CE-66F1-46ED-97B1-9DB2A2B8A648}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4EC039CE-66F1-46ED-97B1-9DB2A2B8A648}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4EC039CE-66F1-46ED-97B1-9DB2A2B8A648}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4EC039CE-66F1-46ED-97B1-9DB2A2B8A648}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4EC039CE-66F1-46ED-97B1-9DB2A2B8A648}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/68_Orbit/vbnet/Orbit.vbproj b/68_Orbit/vbnet/Orbit.vbproj new file mode 100644 index 00000000..29be1358 --- /dev/null +++ b/68_Orbit/vbnet/Orbit.vbproj @@ -0,0 +1,8 @@ + + + Exe + Orbit + net6.0 + 16.9 + + diff --git a/69_Pizza/vbnet/Pizza.sln b/69_Pizza/vbnet/Pizza.sln new file mode 100644 index 00000000..8fc145ee --- /dev/null +++ b/69_Pizza/vbnet/Pizza.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Pizza", "Pizza.vbproj", "{395C3162-11F0-459B-9027-45A8ED6E4E8E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {395C3162-11F0-459B-9027-45A8ED6E4E8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {395C3162-11F0-459B-9027-45A8ED6E4E8E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {395C3162-11F0-459B-9027-45A8ED6E4E8E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {395C3162-11F0-459B-9027-45A8ED6E4E8E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/69_Pizza/vbnet/Pizza.vbproj b/69_Pizza/vbnet/Pizza.vbproj new file mode 100644 index 00000000..db16f023 --- /dev/null +++ b/69_Pizza/vbnet/Pizza.vbproj @@ -0,0 +1,8 @@ + + + Exe + Pizza + net6.0 + 16.9 + + diff --git a/70_Poetry/csharp/Poetry.csproj b/70_Poetry/csharp/Poetry.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/70_Poetry/csharp/Poetry.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/70_Poetry/csharp/Poetry.sln b/70_Poetry/csharp/Poetry.sln new file mode 100644 index 00000000..f62c6d2b --- /dev/null +++ b/70_Poetry/csharp/Poetry.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Poetry", "Poetry.csproj", "{965EE29C-4FEC-4A31-92C9-55FBA8FDB0CB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {965EE29C-4FEC-4A31-92C9-55FBA8FDB0CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {965EE29C-4FEC-4A31-92C9-55FBA8FDB0CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {965EE29C-4FEC-4A31-92C9-55FBA8FDB0CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {965EE29C-4FEC-4A31-92C9-55FBA8FDB0CB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/70_Poetry/vbnet/Poetry.sln b/70_Poetry/vbnet/Poetry.sln new file mode 100644 index 00000000..8e235514 --- /dev/null +++ b/70_Poetry/vbnet/Poetry.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Poetry", "Poetry.vbproj", "{422855D5-5841-40E0-AF1E-993FB25DE7B3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {422855D5-5841-40E0-AF1E-993FB25DE7B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {422855D5-5841-40E0-AF1E-993FB25DE7B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {422855D5-5841-40E0-AF1E-993FB25DE7B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {422855D5-5841-40E0-AF1E-993FB25DE7B3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/70_Poetry/vbnet/Poetry.vbproj b/70_Poetry/vbnet/Poetry.vbproj new file mode 100644 index 00000000..fc71a15e --- /dev/null +++ b/70_Poetry/vbnet/Poetry.vbproj @@ -0,0 +1,8 @@ + + + Exe + Poetry + net6.0 + 16.9 + + diff --git a/71_Poker/csharp/Poker.csproj b/71_Poker/csharp/Poker.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/71_Poker/csharp/Poker.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/71_Poker/csharp/Poker.sln b/71_Poker/csharp/Poker.sln new file mode 100644 index 00000000..5dd63fff --- /dev/null +++ b/71_Poker/csharp/Poker.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Poker", "Poker.csproj", "{CAEDA88F-1585-41AA-8213-40012B044FA9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CAEDA88F-1585-41AA-8213-40012B044FA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CAEDA88F-1585-41AA-8213-40012B044FA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CAEDA88F-1585-41AA-8213-40012B044FA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CAEDA88F-1585-41AA-8213-40012B044FA9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/71_Poker/vbnet/Poker.sln b/71_Poker/vbnet/Poker.sln new file mode 100644 index 00000000..f1514e74 --- /dev/null +++ b/71_Poker/vbnet/Poker.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Poker", "Poker.vbproj", "{107C29F8-C499-4E4A-B162-324CA17AA57F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {107C29F8-C499-4E4A-B162-324CA17AA57F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {107C29F8-C499-4E4A-B162-324CA17AA57F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {107C29F8-C499-4E4A-B162-324CA17AA57F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {107C29F8-C499-4E4A-B162-324CA17AA57F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/71_Poker/vbnet/Poker.vbproj b/71_Poker/vbnet/Poker.vbproj new file mode 100644 index 00000000..5e1a61a3 --- /dev/null +++ b/71_Poker/vbnet/Poker.vbproj @@ -0,0 +1,8 @@ + + + Exe + Poker + net6.0 + 16.9 + + diff --git a/72_Queen/csharp/Queen.csproj b/72_Queen/csharp/Queen.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/72_Queen/csharp/Queen.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/72_Queen/csharp/Queen.sln b/72_Queen/csharp/Queen.sln new file mode 100644 index 00000000..b4d865ab --- /dev/null +++ b/72_Queen/csharp/Queen.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Queen", "Queen.csproj", "{34BFC22A-4459-416E-B271-1E276689AC29}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {34BFC22A-4459-416E-B271-1E276689AC29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34BFC22A-4459-416E-B271-1E276689AC29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34BFC22A-4459-416E-B271-1E276689AC29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34BFC22A-4459-416E-B271-1E276689AC29}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/72_Queen/vbnet/Queen.sln b/72_Queen/vbnet/Queen.sln new file mode 100644 index 00000000..33f87b9a --- /dev/null +++ b/72_Queen/vbnet/Queen.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Queen", "Queen.vbproj", "{9FCBF8AB-8E16-4E1A-AA05-D64B475D36FC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9FCBF8AB-8E16-4E1A-AA05-D64B475D36FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FCBF8AB-8E16-4E1A-AA05-D64B475D36FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FCBF8AB-8E16-4E1A-AA05-D64B475D36FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FCBF8AB-8E16-4E1A-AA05-D64B475D36FC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/72_Queen/vbnet/Queen.vbproj b/72_Queen/vbnet/Queen.vbproj new file mode 100644 index 00000000..19b46d90 --- /dev/null +++ b/72_Queen/vbnet/Queen.vbproj @@ -0,0 +1,8 @@ + + + Exe + Queen + net6.0 + 16.9 + + diff --git a/73_Reverse/vbnet/Reverse.sln b/73_Reverse/vbnet/Reverse.sln new file mode 100644 index 00000000..8e8fa1ee --- /dev/null +++ b/73_Reverse/vbnet/Reverse.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Reverse", "Reverse.vbproj", "{8C9839D4-D0FD-47C2-B54D-429C55F1C6D0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8C9839D4-D0FD-47C2-B54D-429C55F1C6D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C9839D4-D0FD-47C2-B54D-429C55F1C6D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C9839D4-D0FD-47C2-B54D-429C55F1C6D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C9839D4-D0FD-47C2-B54D-429C55F1C6D0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/73_Reverse/vbnet/Reverse.vbproj b/73_Reverse/vbnet/Reverse.vbproj new file mode 100644 index 00000000..978b4e56 --- /dev/null +++ b/73_Reverse/vbnet/Reverse.vbproj @@ -0,0 +1,8 @@ + + + Exe + Reverse + net6.0 + 16.9 + + diff --git a/74_Rock_Scissors_Paper/csharp/RockScissorsPaper.sln b/74_Rock_Scissors_Paper/csharp/RockScissorsPaper.sln new file mode 100644 index 00000000..5c563dd8 --- /dev/null +++ b/74_Rock_Scissors_Paper/csharp/RockScissorsPaper.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RockScissorsPaper", "RockScissorsPaper.csproj", "{162F12A7-72D0-44C8-9854-EA50C707690F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {162F12A7-72D0-44C8-9854-EA50C707690F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {162F12A7-72D0-44C8-9854-EA50C707690F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {162F12A7-72D0-44C8-9854-EA50C707690F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {162F12A7-72D0-44C8-9854-EA50C707690F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/74_Rock_Scissors_Paper/vbnet/RockScissorsPaper.sln b/74_Rock_Scissors_Paper/vbnet/RockScissorsPaper.sln new file mode 100644 index 00000000..481f3105 --- /dev/null +++ b/74_Rock_Scissors_Paper/vbnet/RockScissorsPaper.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "RockScissorsPaper", "RockScissorsPaper.vbproj", "{05C592E9-1A74-4812-88CF-3B078A315378}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {05C592E9-1A74-4812-88CF-3B078A315378}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05C592E9-1A74-4812-88CF-3B078A315378}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05C592E9-1A74-4812-88CF-3B078A315378}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05C592E9-1A74-4812-88CF-3B078A315378}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/74_Rock_Scissors_Paper/vbnet/RockScissorsPaper.vbproj b/74_Rock_Scissors_Paper/vbnet/RockScissorsPaper.vbproj new file mode 100644 index 00000000..e6cf95c5 --- /dev/null +++ b/74_Rock_Scissors_Paper/vbnet/RockScissorsPaper.vbproj @@ -0,0 +1,8 @@ + + + Exe + RockScissorsPaper + net6.0 + 16.9 + + diff --git a/75_Roulette/csharp/Roulette.csproj b/75_Roulette/csharp/Roulette.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/75_Roulette/csharp/Roulette.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/75_Roulette/csharp/Roulette.sln b/75_Roulette/csharp/Roulette.sln new file mode 100644 index 00000000..de44173b --- /dev/null +++ b/75_Roulette/csharp/Roulette.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Roulette", "Roulette.csproj", "{9FC3EC1F-2052-4D08-901C-5184E17740FC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9FC3EC1F-2052-4D08-901C-5184E17740FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FC3EC1F-2052-4D08-901C-5184E17740FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FC3EC1F-2052-4D08-901C-5184E17740FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FC3EC1F-2052-4D08-901C-5184E17740FC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/75_Roulette/vbnet/Roulette.sln b/75_Roulette/vbnet/Roulette.sln new file mode 100644 index 00000000..a9db1b6e --- /dev/null +++ b/75_Roulette/vbnet/Roulette.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Roulette", "Roulette.vbproj", "{B2D2B22C-D332-4153-8ACF-E8136283FBC7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B2D2B22C-D332-4153-8ACF-E8136283FBC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2D2B22C-D332-4153-8ACF-E8136283FBC7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2D2B22C-D332-4153-8ACF-E8136283FBC7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2D2B22C-D332-4153-8ACF-E8136283FBC7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/75_Roulette/vbnet/Roulette.vbproj b/75_Roulette/vbnet/Roulette.vbproj new file mode 100644 index 00000000..d5c17f88 --- /dev/null +++ b/75_Roulette/vbnet/Roulette.vbproj @@ -0,0 +1,8 @@ + + + Exe + Roulette + net6.0 + 16.9 + + diff --git a/76_Russian_Roulette/vbnet/RussianRoulette.sln b/76_Russian_Roulette/vbnet/RussianRoulette.sln new file mode 100644 index 00000000..8a87ebbb --- /dev/null +++ b/76_Russian_Roulette/vbnet/RussianRoulette.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "RussianRoulette", "RussianRoulette.vbproj", "{19A2F0DB-9F77-4E3A-9346-4FDDAF0A457F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {19A2F0DB-9F77-4E3A-9346-4FDDAF0A457F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19A2F0DB-9F77-4E3A-9346-4FDDAF0A457F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19A2F0DB-9F77-4E3A-9346-4FDDAF0A457F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19A2F0DB-9F77-4E3A-9346-4FDDAF0A457F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/76_Russian_Roulette/vbnet/RussianRoulette.vbproj b/76_Russian_Roulette/vbnet/RussianRoulette.vbproj new file mode 100644 index 00000000..dbfebdae --- /dev/null +++ b/76_Russian_Roulette/vbnet/RussianRoulette.vbproj @@ -0,0 +1,8 @@ + + + Exe + RussianRoulette + net6.0 + 16.9 + + diff --git a/77_Salvo/csharp/Salvo.csproj b/77_Salvo/csharp/Salvo.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/77_Salvo/csharp/Salvo.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/77_Salvo/csharp/Salvo.sln b/77_Salvo/csharp/Salvo.sln new file mode 100644 index 00000000..290237a3 --- /dev/null +++ b/77_Salvo/csharp/Salvo.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Salvo", "Salvo.csproj", "{F3AFBC83-22A7-4837-9DA3-F3EE854DD8CA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F3AFBC83-22A7-4837-9DA3-F3EE854DD8CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3AFBC83-22A7-4837-9DA3-F3EE854DD8CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3AFBC83-22A7-4837-9DA3-F3EE854DD8CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3AFBC83-22A7-4837-9DA3-F3EE854DD8CA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/77_Salvo/vbnet/Salvo.sln b/77_Salvo/vbnet/Salvo.sln new file mode 100644 index 00000000..3acb9449 --- /dev/null +++ b/77_Salvo/vbnet/Salvo.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Salvo", "Salvo.vbproj", "{849885BF-24BD-4FEB-A224-A9502742D4B0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {849885BF-24BD-4FEB-A224-A9502742D4B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {849885BF-24BD-4FEB-A224-A9502742D4B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {849885BF-24BD-4FEB-A224-A9502742D4B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {849885BF-24BD-4FEB-A224-A9502742D4B0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/77_Salvo/vbnet/Salvo.vbproj b/77_Salvo/vbnet/Salvo.vbproj new file mode 100644 index 00000000..90ec0e38 --- /dev/null +++ b/77_Salvo/vbnet/Salvo.vbproj @@ -0,0 +1,8 @@ + + + Exe + Salvo + net6.0 + 16.9 + + diff --git a/78_Sine_Wave/vbnet/SineWave.sln b/78_Sine_Wave/vbnet/SineWave.sln new file mode 100644 index 00000000..37f4bf7e --- /dev/null +++ b/78_Sine_Wave/vbnet/SineWave.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SineWave", "SineWave.vbproj", "{204DD0CD-1DA5-4B4B-992F-1C3ED089A147}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {204DD0CD-1DA5-4B4B-992F-1C3ED089A147}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {204DD0CD-1DA5-4B4B-992F-1C3ED089A147}.Debug|Any CPU.Build.0 = Debug|Any CPU + {204DD0CD-1DA5-4B4B-992F-1C3ED089A147}.Release|Any CPU.ActiveCfg = Release|Any CPU + {204DD0CD-1DA5-4B4B-992F-1C3ED089A147}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/78_Sine_Wave/vbnet/SineWave.vbproj b/78_Sine_Wave/vbnet/SineWave.vbproj new file mode 100644 index 00000000..610c360f --- /dev/null +++ b/78_Sine_Wave/vbnet/SineWave.vbproj @@ -0,0 +1,8 @@ + + + Exe + SineWave + net6.0 + 16.9 + + diff --git a/79_Slalom/csharp/Slalom.csproj b/79_Slalom/csharp/Slalom.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/79_Slalom/csharp/Slalom.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/79_Slalom/csharp/Slalom.sln b/79_Slalom/csharp/Slalom.sln new file mode 100644 index 00000000..c1621f2e --- /dev/null +++ b/79_Slalom/csharp/Slalom.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Slalom", "Slalom.csproj", "{6D0607CF-B01C-4E17-A4DE-D15514AE5F84}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6D0607CF-B01C-4E17-A4DE-D15514AE5F84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D0607CF-B01C-4E17-A4DE-D15514AE5F84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D0607CF-B01C-4E17-A4DE-D15514AE5F84}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D0607CF-B01C-4E17-A4DE-D15514AE5F84}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/79_Slalom/vbnet/Slalom.sln b/79_Slalom/vbnet/Slalom.sln new file mode 100644 index 00000000..daa61623 --- /dev/null +++ b/79_Slalom/vbnet/Slalom.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Slalom", "Slalom.vbproj", "{9A7FDEAB-071F-404C-BBA4-91D77E797DF1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9A7FDEAB-071F-404C-BBA4-91D77E797DF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A7FDEAB-071F-404C-BBA4-91D77E797DF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A7FDEAB-071F-404C-BBA4-91D77E797DF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A7FDEAB-071F-404C-BBA4-91D77E797DF1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/79_Slalom/vbnet/Slalom.vbproj b/79_Slalom/vbnet/Slalom.vbproj new file mode 100644 index 00000000..0622bcd9 --- /dev/null +++ b/79_Slalom/vbnet/Slalom.vbproj @@ -0,0 +1,8 @@ + + + Exe + Slalom + net6.0 + 16.9 + + diff --git a/80_Slots/csharp/Slots.csproj b/80_Slots/csharp/Slots.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/80_Slots/csharp/Slots.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/80_Slots/csharp/Slots.sln b/80_Slots/csharp/Slots.sln new file mode 100644 index 00000000..60f90046 --- /dev/null +++ b/80_Slots/csharp/Slots.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Slots", "Slots.csproj", "{D855ECF3-DF8C-46DD-8BEF-2ADFF3AE7817}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D855ECF3-DF8C-46DD-8BEF-2ADFF3AE7817}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D855ECF3-DF8C-46DD-8BEF-2ADFF3AE7817}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D855ECF3-DF8C-46DD-8BEF-2ADFF3AE7817}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D855ECF3-DF8C-46DD-8BEF-2ADFF3AE7817}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/80_Slots/vbnet/Slots.sln b/80_Slots/vbnet/Slots.sln new file mode 100644 index 00000000..1f493198 --- /dev/null +++ b/80_Slots/vbnet/Slots.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Slots", "Slots.vbproj", "{F64CB361-215F-4984-B154-304FF663A60C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F64CB361-215F-4984-B154-304FF663A60C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F64CB361-215F-4984-B154-304FF663A60C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F64CB361-215F-4984-B154-304FF663A60C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F64CB361-215F-4984-B154-304FF663A60C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/80_Slots/vbnet/Slots.vbproj b/80_Slots/vbnet/Slots.vbproj new file mode 100644 index 00000000..04f381a3 --- /dev/null +++ b/80_Slots/vbnet/Slots.vbproj @@ -0,0 +1,8 @@ + + + Exe + Slots + net6.0 + 16.9 + + diff --git a/81_Splat/csharp/Splat.csproj b/81_Splat/csharp/Splat.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/81_Splat/csharp/Splat.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/81_Splat/csharp/Splat.sln b/81_Splat/csharp/Splat.sln new file mode 100644 index 00000000..d7184859 --- /dev/null +++ b/81_Splat/csharp/Splat.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Splat", "Splat.csproj", "{95640CEE-A1A6-4824-A2C7-CF72CADA40FB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {95640CEE-A1A6-4824-A2C7-CF72CADA40FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {95640CEE-A1A6-4824-A2C7-CF72CADA40FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {95640CEE-A1A6-4824-A2C7-CF72CADA40FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {95640CEE-A1A6-4824-A2C7-CF72CADA40FB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/81_Splat/vbnet/Splat.sln b/81_Splat/vbnet/Splat.sln new file mode 100644 index 00000000..b132583d --- /dev/null +++ b/81_Splat/vbnet/Splat.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Splat", "Splat.vbproj", "{62FD7167-97B2-4EA7-8BC8-CBC5765DF721}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {62FD7167-97B2-4EA7-8BC8-CBC5765DF721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62FD7167-97B2-4EA7-8BC8-CBC5765DF721}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62FD7167-97B2-4EA7-8BC8-CBC5765DF721}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62FD7167-97B2-4EA7-8BC8-CBC5765DF721}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/81_Splat/vbnet/Splat.vbproj b/81_Splat/vbnet/Splat.vbproj new file mode 100644 index 00000000..daf6de3c --- /dev/null +++ b/81_Splat/vbnet/Splat.vbproj @@ -0,0 +1,8 @@ + + + Exe + Splat + net6.0 + 16.9 + + diff --git a/82_Stars/vbnet/Stars.sln b/82_Stars/vbnet/Stars.sln new file mode 100644 index 00000000..edb5e587 --- /dev/null +++ b/82_Stars/vbnet/Stars.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Stars", "Stars.vbproj", "{181B70F5-C2CB-4A73-9982-30C16DE89240}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {181B70F5-C2CB-4A73-9982-30C16DE89240}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {181B70F5-C2CB-4A73-9982-30C16DE89240}.Debug|Any CPU.Build.0 = Debug|Any CPU + {181B70F5-C2CB-4A73-9982-30C16DE89240}.Release|Any CPU.ActiveCfg = Release|Any CPU + {181B70F5-C2CB-4A73-9982-30C16DE89240}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/82_Stars/vbnet/Stars.vbproj b/82_Stars/vbnet/Stars.vbproj new file mode 100644 index 00000000..caad7d6e --- /dev/null +++ b/82_Stars/vbnet/Stars.vbproj @@ -0,0 +1,8 @@ + + + Exe + Stars + net6.0 + 16.9 + + diff --git a/83_Stock_Market/vbnet/StockMarket.sln b/83_Stock_Market/vbnet/StockMarket.sln new file mode 100644 index 00000000..00c39242 --- /dev/null +++ b/83_Stock_Market/vbnet/StockMarket.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "StockMarket", "StockMarket.vbproj", "{BF9F62B1-4F0E-40F0-AE76-D1055F0A2F31}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BF9F62B1-4F0E-40F0-AE76-D1055F0A2F31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BF9F62B1-4F0E-40F0-AE76-D1055F0A2F31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF9F62B1-4F0E-40F0-AE76-D1055F0A2F31}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BF9F62B1-4F0E-40F0-AE76-D1055F0A2F31}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/83_Stock_Market/vbnet/StockMarket.vbproj b/83_Stock_Market/vbnet/StockMarket.vbproj new file mode 100644 index 00000000..1404eb48 --- /dev/null +++ b/83_Stock_Market/vbnet/StockMarket.vbproj @@ -0,0 +1,8 @@ + + + Exe + StockMarket + net6.0 + 16.9 + + diff --git a/84_Super_Star_Trek/vbnet/SuperStarTrek.sln b/84_Super_Star_Trek/vbnet/SuperStarTrek.sln new file mode 100644 index 00000000..82633753 --- /dev/null +++ b/84_Super_Star_Trek/vbnet/SuperStarTrek.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SuperStarTrek", "SuperStarTrek.vbproj", "{92825C31-5966-4E6A-9CB0-5AEEE3D6A2A4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {92825C31-5966-4E6A-9CB0-5AEEE3D6A2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92825C31-5966-4E6A-9CB0-5AEEE3D6A2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92825C31-5966-4E6A-9CB0-5AEEE3D6A2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92825C31-5966-4E6A-9CB0-5AEEE3D6A2A4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/84_Super_Star_Trek/vbnet/SuperStarTrek.vbproj b/84_Super_Star_Trek/vbnet/SuperStarTrek.vbproj new file mode 100644 index 00000000..1a4afed5 --- /dev/null +++ b/84_Super_Star_Trek/vbnet/SuperStarTrek.vbproj @@ -0,0 +1,8 @@ + + + Exe + SuperStarTrek + net6.0 + 16.9 + + diff --git a/85_Synonym/csharp/Synonym.csproj b/85_Synonym/csharp/Synonym.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/85_Synonym/csharp/Synonym.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/85_Synonym/csharp/Synonym.sln b/85_Synonym/csharp/Synonym.sln new file mode 100644 index 00000000..69614aff --- /dev/null +++ b/85_Synonym/csharp/Synonym.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Synonym", "Synonym.csproj", "{9CCC22AC-EDF3-4137-8EF7-EBB2F8677CE4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9CCC22AC-EDF3-4137-8EF7-EBB2F8677CE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CCC22AC-EDF3-4137-8EF7-EBB2F8677CE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CCC22AC-EDF3-4137-8EF7-EBB2F8677CE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CCC22AC-EDF3-4137-8EF7-EBB2F8677CE4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/85_Synonym/vbnet/Synonym.sln b/85_Synonym/vbnet/Synonym.sln new file mode 100644 index 00000000..8b55f812 --- /dev/null +++ b/85_Synonym/vbnet/Synonym.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Synonym", "Synonym.vbproj", "{E6BEB53F-F6A3-4AA9-8EB9-68D8238DFAA6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E6BEB53F-F6A3-4AA9-8EB9-68D8238DFAA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6BEB53F-F6A3-4AA9-8EB9-68D8238DFAA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6BEB53F-F6A3-4AA9-8EB9-68D8238DFAA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6BEB53F-F6A3-4AA9-8EB9-68D8238DFAA6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/85_Synonym/vbnet/Synonym.vbproj b/85_Synonym/vbnet/Synonym.vbproj new file mode 100644 index 00000000..8c920a56 --- /dev/null +++ b/85_Synonym/vbnet/Synonym.vbproj @@ -0,0 +1,8 @@ + + + Exe + Synonym + net6.0 + 16.9 + + diff --git a/86_Target/vbnet/Target.sln b/86_Target/vbnet/Target.sln new file mode 100644 index 00000000..3b1edd8c --- /dev/null +++ b/86_Target/vbnet/Target.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Target", "Target.vbproj", "{48A62242-16CC-4BFC-B7DB-C2DAE3C13B5A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {48A62242-16CC-4BFC-B7DB-C2DAE3C13B5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48A62242-16CC-4BFC-B7DB-C2DAE3C13B5A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48A62242-16CC-4BFC-B7DB-C2DAE3C13B5A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48A62242-16CC-4BFC-B7DB-C2DAE3C13B5A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/86_Target/vbnet/Target.vbproj b/86_Target/vbnet/Target.vbproj new file mode 100644 index 00000000..21a19379 --- /dev/null +++ b/86_Target/vbnet/Target.vbproj @@ -0,0 +1,8 @@ + + + Exe + Target + net6.0 + 16.9 + + diff --git a/87_3-D_Plot/vbnet/ThreeDPlot.sln b/87_3-D_Plot/vbnet/ThreeDPlot.sln new file mode 100644 index 00000000..b2ea1dbe --- /dev/null +++ b/87_3-D_Plot/vbnet/ThreeDPlot.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ThreeDPlot", "ThreeDPlot.vbproj", "{FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/87_3-D_Plot/vbnet/ThreeDPlot.vbproj b/87_3-D_Plot/vbnet/ThreeDPlot.vbproj new file mode 100644 index 00000000..903ea6aa --- /dev/null +++ b/87_3-D_Plot/vbnet/ThreeDPlot.vbproj @@ -0,0 +1,8 @@ + + + Exe + ThreeDPlot + net6.0 + 16.9 + + diff --git a/88_3-D_Tic-Tac-Toe/csharp/ThreeDTicTacToe.csproj b/88_3-D_Tic-Tac-Toe/csharp/ThreeDTicTacToe.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/88_3-D_Tic-Tac-Toe/csharp/ThreeDTicTacToe.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/88_3-D_Tic-Tac-Toe/csharp/ThreeDTicTacToe.sln b/88_3-D_Tic-Tac-Toe/csharp/ThreeDTicTacToe.sln new file mode 100644 index 00000000..0dcb9034 --- /dev/null +++ b/88_3-D_Tic-Tac-Toe/csharp/ThreeDTicTacToe.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThreeDTicTacToe", "ThreeDTicTacToe.csproj", "{6001B6FB-DF8A-4D59-8E22-BA126C8DA274}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6001B6FB-DF8A-4D59-8E22-BA126C8DA274}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6001B6FB-DF8A-4D59-8E22-BA126C8DA274}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6001B6FB-DF8A-4D59-8E22-BA126C8DA274}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6001B6FB-DF8A-4D59-8E22-BA126C8DA274}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/88_3-D_Tic-Tac-Toe/vbnet/ThreeDTicTacToe.sln b/88_3-D_Tic-Tac-Toe/vbnet/ThreeDTicTacToe.sln new file mode 100644 index 00000000..6479b013 --- /dev/null +++ b/88_3-D_Tic-Tac-Toe/vbnet/ThreeDTicTacToe.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ThreeDTicTacToe", "ThreeDTicTacToe.vbproj", "{AD17E9E0-4795-4533-A215-09DD99F7D696}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AD17E9E0-4795-4533-A215-09DD99F7D696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD17E9E0-4795-4533-A215-09DD99F7D696}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD17E9E0-4795-4533-A215-09DD99F7D696}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD17E9E0-4795-4533-A215-09DD99F7D696}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/88_3-D_Tic-Tac-Toe/vbnet/ThreeDTicTacToe.vbproj b/88_3-D_Tic-Tac-Toe/vbnet/ThreeDTicTacToe.vbproj new file mode 100644 index 00000000..d1cd4c2b --- /dev/null +++ b/88_3-D_Tic-Tac-Toe/vbnet/ThreeDTicTacToe.vbproj @@ -0,0 +1,8 @@ + + + Exe + ThreeDTicTacToe + net6.0 + 16.9 + + diff --git a/89_Tic-Tac-Toe/csharp/TicTacToe.sln b/89_Tic-Tac-Toe/csharp/TicTacToe.sln new file mode 100644 index 00000000..c26bd1b4 --- /dev/null +++ b/89_Tic-Tac-Toe/csharp/TicTacToe.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tictactoe1", "tictactoe1\tictactoe1.csproj", "{FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/89_Tic-Tac-Toe/vbnet/TicTacToe.sln b/89_Tic-Tac-Toe/vbnet/TicTacToe.sln new file mode 100644 index 00000000..47935624 --- /dev/null +++ b/89_Tic-Tac-Toe/vbnet/TicTacToe.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TicTacToe", "TicTacToe.vbproj", "{5B43817F-EEF6-4298-BADF-69203BE7D088}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5B43817F-EEF6-4298-BADF-69203BE7D088}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B43817F-EEF6-4298-BADF-69203BE7D088}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B43817F-EEF6-4298-BADF-69203BE7D088}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B43817F-EEF6-4298-BADF-69203BE7D088}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/89_Tic-Tac-Toe/vbnet/TicTacToe.vbproj b/89_Tic-Tac-Toe/vbnet/TicTacToe.vbproj new file mode 100644 index 00000000..5bac9e9e --- /dev/null +++ b/89_Tic-Tac-Toe/vbnet/TicTacToe.vbproj @@ -0,0 +1,8 @@ + + + Exe + TicTacToe + net6.0 + 16.9 + + diff --git a/90_Tower/vbnet/Tower.sln b/90_Tower/vbnet/Tower.sln new file mode 100644 index 00000000..059a8d70 --- /dev/null +++ b/90_Tower/vbnet/Tower.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Tower", "Tower.vbproj", "{9B62545A-F076-4390-864B-ABE6FC20CC62}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B62545A-F076-4390-864B-ABE6FC20CC62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B62545A-F076-4390-864B-ABE6FC20CC62}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B62545A-F076-4390-864B-ABE6FC20CC62}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B62545A-F076-4390-864B-ABE6FC20CC62}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/90_Tower/vbnet/Tower.vbproj b/90_Tower/vbnet/Tower.vbproj new file mode 100644 index 00000000..d5d8396b --- /dev/null +++ b/90_Tower/vbnet/Tower.vbproj @@ -0,0 +1,8 @@ + + + Exe + Tower + net6.0 + 16.9 + + diff --git a/91_Train/vbnet/Train.sln b/91_Train/vbnet/Train.sln new file mode 100644 index 00000000..ea959481 --- /dev/null +++ b/91_Train/vbnet/Train.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Train", "Train.vbproj", "{05F1229A-9138-4B1D-9781-CE8C4F7A6151}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {05F1229A-9138-4B1D-9781-CE8C4F7A6151}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05F1229A-9138-4B1D-9781-CE8C4F7A6151}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05F1229A-9138-4B1D-9781-CE8C4F7A6151}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05F1229A-9138-4B1D-9781-CE8C4F7A6151}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/91_Train/vbnet/Train.vbproj b/91_Train/vbnet/Train.vbproj new file mode 100644 index 00000000..84f03013 --- /dev/null +++ b/91_Train/vbnet/Train.vbproj @@ -0,0 +1,8 @@ + + + Exe + Train + net6.0 + 16.9 + + diff --git a/92_Trap/csharp/Trap.csproj b/92_Trap/csharp/Trap.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/92_Trap/csharp/Trap.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/92_Trap/csharp/Trap.sln b/92_Trap/csharp/Trap.sln new file mode 100644 index 00000000..6226bef3 --- /dev/null +++ b/92_Trap/csharp/Trap.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Trap", "Trap.csproj", "{4386B4A0-16A9-48E7-8FBA-E35D4C9FEDAA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4386B4A0-16A9-48E7-8FBA-E35D4C9FEDAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4386B4A0-16A9-48E7-8FBA-E35D4C9FEDAA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4386B4A0-16A9-48E7-8FBA-E35D4C9FEDAA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4386B4A0-16A9-48E7-8FBA-E35D4C9FEDAA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/92_Trap/vbnet/Trap.sln b/92_Trap/vbnet/Trap.sln new file mode 100644 index 00000000..65f0a10d --- /dev/null +++ b/92_Trap/vbnet/Trap.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Trap", "Trap.vbproj", "{BAA7B27D-D52D-4C34-972B-2F357F60B8AB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BAA7B27D-D52D-4C34-972B-2F357F60B8AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BAA7B27D-D52D-4C34-972B-2F357F60B8AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BAA7B27D-D52D-4C34-972B-2F357F60B8AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAA7B27D-D52D-4C34-972B-2F357F60B8AB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/92_Trap/vbnet/Trap.vbproj b/92_Trap/vbnet/Trap.vbproj new file mode 100644 index 00000000..f9d5a790 --- /dev/null +++ b/92_Trap/vbnet/Trap.vbproj @@ -0,0 +1,8 @@ + + + Exe + Trap + net6.0 + 16.9 + + diff --git a/93_23_Matches/vbnet/TwentyThreeMatches.sln b/93_23_Matches/vbnet/TwentyThreeMatches.sln new file mode 100644 index 00000000..a378cf3f --- /dev/null +++ b/93_23_Matches/vbnet/TwentyThreeMatches.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TwentyThreeMatches", "TwentyThreeMatches.vbproj", "{DEAA537A-6F73-4C2E-A85C-4B797B3D1900}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DEAA537A-6F73-4C2E-A85C-4B797B3D1900}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEAA537A-6F73-4C2E-A85C-4B797B3D1900}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEAA537A-6F73-4C2E-A85C-4B797B3D1900}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEAA537A-6F73-4C2E-A85C-4B797B3D1900}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/93_23_Matches/vbnet/TwentyThreeMatches.vbproj b/93_23_Matches/vbnet/TwentyThreeMatches.vbproj new file mode 100644 index 00000000..cf8620c9 --- /dev/null +++ b/93_23_Matches/vbnet/TwentyThreeMatches.vbproj @@ -0,0 +1,8 @@ + + + Exe + TwentyThreeMatches + net6.0 + 16.9 + + diff --git a/94_War/vbnet/War.sln b/94_War/vbnet/War.sln new file mode 100644 index 00000000..3c0895ad --- /dev/null +++ b/94_War/vbnet/War.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "War", "War.vbproj", "{36D070A1-08CB-424E-AB8E-E782B0A6654B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {36D070A1-08CB-424E-AB8E-E782B0A6654B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36D070A1-08CB-424E-AB8E-E782B0A6654B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36D070A1-08CB-424E-AB8E-E782B0A6654B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36D070A1-08CB-424E-AB8E-E782B0A6654B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/94_War/vbnet/War.vbproj b/94_War/vbnet/War.vbproj new file mode 100644 index 00000000..e62cda47 --- /dev/null +++ b/94_War/vbnet/War.vbproj @@ -0,0 +1,8 @@ + + + Exe + War + net6.0 + 16.9 + + diff --git a/95_Weekday/csharp/Weekday.csproj b/95_Weekday/csharp/Weekday.csproj new file mode 100644 index 00000000..d3fe4757 --- /dev/null +++ b/95_Weekday/csharp/Weekday.csproj @@ -0,0 +1,9 @@ + + + Exe + net6.0 + 10 + enable + enable + + diff --git a/95_Weekday/csharp/Weekday.sln b/95_Weekday/csharp/Weekday.sln new file mode 100644 index 00000000..4aad7c31 --- /dev/null +++ b/95_Weekday/csharp/Weekday.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Weekday", "Weekday.csproj", "{6E93B1EC-5E19-47DB-821A-D19F1D0DA982}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6E93B1EC-5E19-47DB-821A-D19F1D0DA982}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E93B1EC-5E19-47DB-821A-D19F1D0DA982}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E93B1EC-5E19-47DB-821A-D19F1D0DA982}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E93B1EC-5E19-47DB-821A-D19F1D0DA982}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/95_Weekday/vbnet/Weekday.sln b/95_Weekday/vbnet/Weekday.sln new file mode 100644 index 00000000..7bbbb17a --- /dev/null +++ b/95_Weekday/vbnet/Weekday.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Weekday", "Weekday.vbproj", "{3BE031BE-D032-477A-A419-48FA7D3C2DD2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3BE031BE-D032-477A-A419-48FA7D3C2DD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3BE031BE-D032-477A-A419-48FA7D3C2DD2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3BE031BE-D032-477A-A419-48FA7D3C2DD2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3BE031BE-D032-477A-A419-48FA7D3C2DD2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/95_Weekday/vbnet/Weekday.vbproj b/95_Weekday/vbnet/Weekday.vbproj new file mode 100644 index 00000000..dfa9996c --- /dev/null +++ b/95_Weekday/vbnet/Weekday.vbproj @@ -0,0 +1,8 @@ + + + Exe + Weekday + net6.0 + 16.9 + + From 694367ec19b803b7495662db227a9bc9e3558036 Mon Sep 17 00:00:00 2001 From: Bastiaan Veelo Date: Sun, 16 Jan 2022 13:47:43 +0100 Subject: [PATCH 21/82] Add D version of War (94). --- 94_War/d/.gitignore | 2 + 94_War/d/README.md | 125 ++++++++++++++++++++++++++++++++++++++++++++ 94_War/d/war.d | 80 ++++++++++++++++++++++++++++ 3 files changed, 207 insertions(+) create mode 100644 94_War/d/.gitignore create mode 100644 94_War/d/README.md create mode 100644 94_War/d/war.d diff --git a/94_War/d/.gitignore b/94_War/d/.gitignore new file mode 100644 index 00000000..d969f6b2 --- /dev/null +++ b/94_War/d/.gitignore @@ -0,0 +1,2 @@ +*.exe +*.obj diff --git a/94_War/d/README.md b/94_War/d/README.md new file mode 100644 index 00000000..2bc48a12 --- /dev/null +++ b/94_War/d/README.md @@ -0,0 +1,125 @@ +Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html) + +Converted to [D](https://dlang.org/) by [Bastiaan Veelo](https://github.com/veelo). + +## Running the code + +Assuming the reference [dmd](https://dlang.org/download.html#dmd) compiler: +```shell +dmd -preview=dip1000 -run war.d +``` + +[Other compilers](https://dlang.org/download.html) also exist. + +## Specialties explained + +This game code contains some specialties that you might want to know more about. Here goes. + +### Suits + +Most modern consoles are capable of displaying more than just ASCII, and so I have chosen to display the actual ♠, ♥, ♦ +and ♣ instead of substituting them by letters like the BASIC original did. Only the Windows console needs a nudge in +the right direction with these instructions: +```d +SetConsoleOutputCP(CP_UTF8); // Set code page +SetConsoleOutputCP(GetACP); // Restore the default +``` +Instead of cluttering the `main()` function with these lesser important details, we can move them into a +[module constructor and module destructor](https://dlang.org/spec/module.html#staticorder), which run before and after +`main()` respectively. And because order of declaration is irrelevant in a D module, we can push those all the way +down to the bottom of the file. This is of course only necessary on Windows (and won't even work anywhere else) so +we'll need to wrap this in a `version (Windows)` conditional code block: +```d +version (Windows) +{ + import core.sys.windows.windows; + + shared static this() @trusted + { + SetConsoleOutputCP(CP_UTF8); + } + + shared static ~this() @trusted + { + SetConsoleOutputCP(GetACP); + } +} +``` +Although it doesn't matter much in this single-threaded program, the `shared` attribute makes that these +constructors/destructors are run once per program invocation; non-shared module constructors and module destructors are +run for every thread. The `@trusted` annotation is necessary because these are system API calls; The compiler cannot +check these for memory-safety, and so we must indicate that we have reviewed the safety manually. + +### Uniform Function Call Syntax + +In case you wonder why this line works: +```d +if ("Do you want instructions?".yes) + // ... +``` +then it is because this is equivalent to +```d +if (yes("Do you want instructions?")) + // ... +``` +where `yes()` is a Boolean function that is defined below `main()`. This is made possible by the language feature that +is called [uniform function call syntax (UFCS)](https://dlang.org/spec/function.html#pseudo-member). UFCS works by +passing what is in front of the dot as the first parameter to the function, and it was invented to make it possible to +call free functions on objects as if they were member functions. UFCS can also be used to obtain a more natural order +of function calls, such as this line inside `yes()`: +```d +return trustedReadln.strip.toLower.startsWith("y"); +``` +which reads easier than the equivalent +```d +return startsWith(toLower(strip(trustedReadln())), "y"); +``` + +### Type a lot or not? + +It would have been straight forward to define the `cards` array explicitly like so: +```d +const cards = ["2♠", "2♥", "2♦", "2♣", "3♠", "3♥", "3♦", "3♣", + "4♠", "4♥", "4♦", "4♣", "5♠", "5♥", "5♦", "5♣", + "6♠", "6♥", "6♦", "6♣", "7♠", "7♥", "7♦", "7♣", + "8♠", "8♥", "8♦", "8♣", "9♠", "9♥", "9♦", "9♣", + "10♠", "10♥", "10♦", "10♣", "J♥", "J♦", "J♣", "J♣", + "Q♠", "Q♥", "Q♦", "Q♣", "K♠", "K♥", "K♦", "K♣", + "A♠", "A♥", "A♦", "A♣"]; +``` +but that's tedious, difficult to spot errors in (*can you?*) and looks like something a computer can automate. Indeed +it can: +```d +static const cards = cartesianProduct(["2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"], + ["♠", "♥", "♦", "♣"]).map!(a => a.expand.only.join).array; +``` +The function [`cartesianProduct`](https://dlang.org/phobos/std_algorithm_setops.html#cartesianProduct) takes two +ranges, like the horizontal and vertical headers of a spreadsheet, and fills the table with the combinations that form +the coordinates of the cells. But the output of that function is in the form of an array of +[`Tuple`](https://dlang.org/phobos/std_typecons.html#Tuple)s, which looks like `[Tuple!(string, string)("2", "♠"), +Tuple!(string, string)("2", "♥"), ... etc]`. [`map`](https://dlang.org/phobos/std_algorithm_iteration.html#map) +comes to the rescue, converting each Tuple to a string, by calling +[`expand`](https://dlang.org/phobos/std_typecons.html#.Tuple.expand), then +[`only`](https://dlang.org/phobos/std_range.html#only) and then [`join`](https://dlang.org/phobos/std_array.html#join) +on them. The result is a lazily evaluated range of strings. Finally, +[`array`](https://dlang.org/phobos/std_array.html#array) turns the range into a random access array. The `static` +attribute makes that all this is performed at compile-time, so the result is exactly the same as the manually entered +data, but without the typo's. + +### Shuffle the cards or not? + +The original BASIC code works with a constant array of cards, ordered by increasing numerical value, and indexing it +with indices that have been shuffled. This is efficient because in comparing who wins, the indices can be compared +directly, since a higher index correlates to a card with a higher numerical value (when divided by the number of suits, +4). Some of the other reimplementations in other languages have been written in a lesser efficient way by shuffling the +array of cards itself. This then requires the use of a lookup table or searching for equality in an auxiliary array +when comparing cards. + +I find the original more elegant, so that's what you see here: +```d +const indices = iota(0, cards.length).array.randomShuffle; +``` +[`iota`](https://dlang.org/phobos/std_range.html#iota) produces a range of integers, in this case starting at 0 and +increasing up to the number of cards in the deck (exclusive). [`array`](https://dlang.org/phobos/std_array.html#array) +turns the range into an array, so that [`randomShuffle`](https://dlang.org/phobos/std_random.html#randomShuffle) can +do its work. diff --git a/94_War/d/war.d b/94_War/d/war.d new file mode 100644 index 00000000..d5a453fa --- /dev/null +++ b/94_War/d/war.d @@ -0,0 +1,80 @@ +@safe: // Make @safe the default for this file, enforcing memory-safety. +import std; + +void main() +{ + enum width = 50; + writeln(center("War", width)); + writeln(center("(After Creative Computing Morristown, New Jersey)\n\n", width)); + writeln(wrap("This is the card game of war. Each card is given by suit-# " ~ + "as 7♠ for seven of spades. ", width)); + + if ("Do you want instructions?".yes) + writeln("\n", wrap("The computer gives you and it a 'card'. The higher card " ~ + "(numerically) wins. The game ends when you choose not to " ~ + "continue or when you have finished the pack.\n", width)); + + static const cards = cartesianProduct(["2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"], + ["♠", "♥", "♦", "♣"]).map!(a => a.expand.only.join).array; + const indices = iota(0, cards.length).array.randomShuffle; + int yourScore = 0, compScore = 0, i = 0; + while (i < indices.length) + { + size_t your = indices[i++], comp = indices[i++]; + writeln("\nYou: ", cards[your].leftJustify(9), "Computer: ", cards[comp]); + your /= 4; comp /= 4; + if (your == comp) + writeln("Tie. No score change."); + else if (your < comp) + writeln("The computer wins!!! You have ", yourScore, + " and the computer has ", ++compScore, "."); + else + writeln("You win. You have ", ++yourScore, + " and the computer has ", compScore, "."); + if (i == indices.length) + writeln("\nWe have run out of cards. Final score: You: ", yourScore, + ", the computer: ", compScore, "."); + else if (!"Do you want to continue?".yes) + break; + } + writeln("\nThanks for playing. It was fun."); +} + +/// Returns whether question was answered positively. +bool yes(string question) +{ + writef!"%s "(question); + try + return trustedReadln.strip.toLower.startsWith("y"); + catch (Exception) // readln throws on I/O and Unicode errors, which we handle here. + return false; +} + +/** An @trusted wrapper around readln. +* +* This is the only function that formally requires manual review for memory-safety. +* [Arguably readln should be safe already](https://forum.dlang.org/post/rab398$1up$1@digitalmars.com) +* which would remove the need to have any @trusted code in this program. +*/ +string trustedReadln() @trusted +{ + return readln; +} + +version (Windows) +{ + // Make the Windows console do a better job at printing UTF-8 strings, + // and restore the default upon termination. + + import core.sys.windows.windows; + + shared static this() @trusted + { + SetConsoleOutputCP(CP_UTF8); + } + + shared static ~this() @trusted + { + SetConsoleOutputCP(GetACP); + } +} From f6095ee950ae0ecc851f06c57f87b4941f494068 Mon Sep 17 00:00:00 2001 From: Aldrin Misquitta Date: Sun, 16 Jan 2022 14:21:17 +0000 Subject: [PATCH 22/82] Use a tree structure instead of a list (Fix for issue #369) --- 03_Animal/java/Animal.java | 343 +++++++++++++++++++++++-------------- 1 file changed, 214 insertions(+), 129 deletions(-) diff --git a/03_Animal/java/Animal.java b/03_Animal/java/Animal.java index 11e9e889..681425c1 100644 --- a/03_Animal/java/Animal.java +++ b/03_Animal/java/Animal.java @@ -2,159 +2,244 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Scanner; +import java.util.stream.Collectors; /** * ANIMAL *

* Converted from BASIC to Java by Aldrin Misquitta (@aldrinm) + * The original BASIC program uses an array to maintain the questions and answers and to decide which question to + * ask next. Updated this Java implementation to use a tree instead of the earlier faulty one based on a list (thanks @patimen). */ public class Animal { - public static void main(String[] args) { - printIntro(); - Scanner scan = new Scanner(System.in); + public static void main(String[] args) { + printIntro(); + Scanner scan = new Scanner(System.in); - List questions = new ArrayList<>(); - questions.add(new Question("DOES IT SWIM", "FISH", "BIRD")); + Node root = new QuestionNode("DOES IT SWIM", + new AnimalNode("FISH"), new AnimalNode("BIRD")); - boolean stopGame = false; - while (!stopGame) { - String choice = readMainChoice(scan); - switch (choice) { - case "LIST": - printKnownAnimals(questions); - break; - case "Q": - case "QUIT": - stopGame = true; - break; - default: - if (choice.toUpperCase(Locale.ROOT).startsWith("Y")) { - int k = 0; - boolean correctGuess = false; - while (questions.size() > k && !correctGuess) { - Question question = questions.get(k); - correctGuess = askQuestion(question, scan); - if (correctGuess) { - System.out.println("WHY NOT TRY ANOTHER ANIMAL?"); - } else { - k++; - } - } + boolean stopGame = false; + while (!stopGame) { + String choice = readMainChoice(scan); + switch (choice) { + case "TREE": + printTree(root); + break; + case "LIST": + printKnownAnimals(root); + break; + case "Q": + case "QUIT": + stopGame = true; + break; + default: + if (choice.toUpperCase(Locale.ROOT).startsWith("Y")) { + Node current = root; //where we are in the question tree + Node previous; //keep track of parent of current in order to place new questions later on. - if (!correctGuess) { - askForInformationAndSave(scan, questions); - } - } - } - } + while (current instanceof QuestionNode) { + var currentQuestion = (QuestionNode) current; + var reply = askQuestionAndGetReply(currentQuestion, scan); - } + previous = current; + current = reply ? currentQuestion.getTrueAnswer() : currentQuestion.getFalseAnswer(); + if (current instanceof AnimalNode) { + //We have reached a animal node, so offer it as the guess + var currentAnimal = (AnimalNode) current; + System.out.printf("IS IT A %s ? ", currentAnimal.getAnimal()); + var animalGuessResponse = readYesOrNo(scan); + if (animalGuessResponse) { + //we guessed right! end this round + System.out.println("WHY NOT TRY ANOTHER ANIMAL?"); + } else { + //we guessed wrong :(, ask for feedback + //cast previous to QuestionNode since we know at this point that it is not a leaf node + askForInformationAndSave(scan, currentAnimal, (QuestionNode) previous, reply); + } + } + } + } + } + } + } - private static void askForInformationAndSave(Scanner scan, List questions) { - //Failed to get it right and ran out of questions - //Let's ask the user for the new information - System.out.print("THE ANIMAL YOU WERE THINKING OF WAS A "); - String animal = scan.nextLine(); - System.out.printf("PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A %s FROM A %s ", animal, questions.get( - questions.size() - 1).falseAnswer); - String newQuestion = scan.nextLine(); - System.out.printf("FOR A %s THE ANSWER WOULD BE ", animal); - boolean newAnswer = readYesOrNo(scan); - //Add it to our list - addNewAnimal(questions, animal, newQuestion, newAnswer); - } + /** + * Prompt for information about the animal we got wrong + * @param current The animal that we guessed wrong + * @param previous The root of current + * @param previousToCurrentDecisionChoice Whether it was a Y or N answer that got us here. true = Y, false = N + */ + private static void askForInformationAndSave(Scanner scan, AnimalNode current, QuestionNode previous, boolean previousToCurrentDecisionChoice) { + //Failed to get it right and ran out of questions + //Let's ask the user for the new information + System.out.print("THE ANIMAL YOU WERE THINKING OF WAS A "); + String animal = scan.nextLine(); + System.out.printf("PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A %s FROM A %s ", animal, current.getAnimal()); + String newQuestion = scan.nextLine(); + System.out.printf("FOR A %s THE ANSWER WOULD BE ", animal); + boolean newAnswer = readYesOrNo(scan); + //Add it to our question store + addNewAnimal(current, previous, animal, newQuestion, newAnswer, previousToCurrentDecisionChoice); + } - private static void addNewAnimal(List questions, String animal, String newQuestion, boolean newAnswer) { - Question lastQuestion = questions.get(questions.size() - 1); - String lastAnimal = lastQuestion.falseAnswer; - lastQuestion.falseAnswer = null; //remove the false option to indicate that there is a next question + private static void addNewAnimal(Node current, + QuestionNode previous, + String animal, + String newQuestion, + boolean newAnswer, + boolean previousToCurrentDecisionChoice) { + var animalNode = new AnimalNode(animal); + var questionNode = new QuestionNode(newQuestion, + newAnswer ? animalNode : current, + !newAnswer ? animalNode : current); - Question newOption; - if (newAnswer) { - newOption = new Question(newQuestion, animal, lastAnimal); - } else { - newOption = new Question(newQuestion, lastAnimal, animal); - } - questions.add(newOption); - } + if (previous != null) { + if (previousToCurrentDecisionChoice) { + previous.setTrueAnswer(questionNode); + } else { + previous.setFalseAnswer(questionNode); + } + } + } - private static boolean askQuestion(Question question, Scanner scanner) { - System.out.printf("%s ? ", question.question); + private static boolean askQuestionAndGetReply(QuestionNode questionNode, Scanner scanner) { + System.out.printf("%s ? ", questionNode.question); + return readYesOrNo(scanner); + } - boolean chosenAnswer = readYesOrNo(scanner); - if (chosenAnswer) { - if (question.trueAnswer != null) { - System.out.printf("IS IT A %s ? ", question.trueAnswer); - return readYesOrNo(scanner); - } - //else go to the next question - } else { - if (question.falseAnswer != null) { - System.out.printf("IS IT A %s ? ", question.falseAnswer); - return readYesOrNo(scanner); - } - //else go to the next question - } - return false; - } + private static boolean readYesOrNo(Scanner scanner) { + boolean validAnswer = false; + Boolean choseAnswer = null; + while (!validAnswer) { + String answer = scanner.nextLine(); + if (answer.toUpperCase(Locale.ROOT).startsWith("Y")) { + validAnswer = true; + choseAnswer = true; + } else if (answer.toUpperCase(Locale.ROOT).startsWith("N")) { + validAnswer = true; + choseAnswer = false; + } + } + return choseAnswer; + } - private static boolean readYesOrNo(Scanner scanner) { - boolean validAnswer = false; - Boolean choseAnswer = null; - while (!validAnswer) { - String answer = scanner.nextLine(); - if (answer.toUpperCase(Locale.ROOT).startsWith("Y")) { - validAnswer = true; - choseAnswer = true; - } else if (answer.toUpperCase(Locale.ROOT).startsWith("N")) { - validAnswer = true; - choseAnswer = false; - } - } - return choseAnswer; - } + private static void printKnownAnimals(Node root) { + System.out.println("\nANIMALS I ALREADY KNOW ARE:"); - private static void printKnownAnimals(List questions) { - System.out.println("\nANIMALS I ALREADY KNOW ARE:"); - List animals = new ArrayList<>(); - questions.forEach(q -> { - if (q.trueAnswer != null) { - animals.add(q.trueAnswer); - } - if (q.falseAnswer != null) { - animals.add(q.falseAnswer); - } - }); - System.out.println(String.join("\t\t", animals)); - } + List leafNodes = collectLeafNodes(root); + String allAnimalsString = leafNodes.stream().map(AnimalNode::getAnimal).collect(Collectors.joining("\t\t")); - private static String readMainChoice(Scanner scan) { - System.out.print("ARE YOU THINKING OF AN ANIMAL ? "); - return scan.nextLine(); - } + System.out.println(allAnimalsString); + } - private static void printIntro() { - System.out.println(" ANIMAL"); - System.out.println(" CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"); - System.out.println("\n\n"); - System.out.println("PLAY 'GUESS THE ANIMAL'"); - System.out.println("\n"); - System.out.println("THINK OF AN ANIMAL AND THE COMPUTER WILL TRY TO GUESS IT."); - } + //Traverse the tree and collect all the leaf nodes, which basically have all the animals. + private static List collectLeafNodes(Node root) { + List collectedNodes = new ArrayList<>(); + if (root instanceof AnimalNode) { + collectedNodes.add((AnimalNode) root); + } else { + var q = (QuestionNode) root; + collectedNodes.addAll(collectLeafNodes(q.getTrueAnswer())); + collectedNodes.addAll(collectLeafNodes(q.getFalseAnswer())); + } + return collectedNodes; + } + + private static String readMainChoice(Scanner scan) { + System.out.print("ARE YOU THINKING OF AN ANIMAL ? "); + return scan.nextLine(); + } + + private static void printIntro() { + System.out.println(" ANIMAL"); + System.out.println(" CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"); + System.out.println("\n\n"); + System.out.println("PLAY 'GUESS THE ANIMAL'"); + System.out.println("\n"); + System.out.println("THINK OF AN ANIMAL AND THE COMPUTER WILL TRY TO GUESS IT."); + } + + //Based on https://stackoverflow.com/a/8948691/74057 + private static void printTree(Node root) { + StringBuilder buffer = new StringBuilder(50); + print(root, buffer, "", ""); + System.out.println(buffer); + } + + private static void print(Node root, StringBuilder buffer, String prefix, String childrenPrefix) { + buffer.append(prefix); + buffer.append(root.toString()); + buffer.append('\n'); + + if (root instanceof QuestionNode) { + var questionNode = (QuestionNode) root; + print(questionNode.getTrueAnswer(), buffer, childrenPrefix + "├─Y─ ", childrenPrefix + "│ "); + print(questionNode.getFalseAnswer(), buffer, childrenPrefix + "└─N─ ", childrenPrefix + " "); + } + } - public static class Question { - String question; - String trueAnswer; - String falseAnswer; + /** + * Base interface for all nodes in our question tree + */ + private interface Node { + } - public Question(String question, String trueAnswer, String falseAnswer) { - this.question = question; - this.trueAnswer = trueAnswer; - this.falseAnswer = falseAnswer; - } - } + private static class QuestionNode implements Node { + private final String question; + private Node trueAnswer; + private Node falseAnswer; + + public QuestionNode(String question, Node trueAnswer, Node falseAnswer) { + this.question = question; + this.trueAnswer = trueAnswer; + this.falseAnswer = falseAnswer; + } + + public String getQuestion() { + return question; + } + + public Node getTrueAnswer() { + return trueAnswer; + } + + public void setTrueAnswer(Node trueAnswer) { + this.trueAnswer = trueAnswer; + } + + public Node getFalseAnswer() { + return falseAnswer; + } + + public void setFalseAnswer(Node falseAnswer) { + this.falseAnswer = falseAnswer; + } + + @Override + public String toString() { + return "Question{'" + question + "'}"; + } + } + + private static class AnimalNode implements Node { + private final String animal; + + public AnimalNode(String animal) { + this.animal = animal; + } + + public String getAnimal() { + return animal; + } + + @Override + public String toString() { + return "Animal{'" + animal + "'}"; + } + } } From 89799518add96a8a494f542e30adf3b7b84a05d5 Mon Sep 17 00:00:00 2001 From: ribtips Date: Sun, 16 Jan 2022 11:18:43 -0500 Subject: [PATCH 23/82] Ruby implementation of game 61 math_dice --- 61_Math_Dice/ruby/mathdice.rb | 115 ++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 61_Math_Dice/ruby/mathdice.rb diff --git a/61_Math_Dice/ruby/mathdice.rb b/61_Math_Dice/ruby/mathdice.rb new file mode 100644 index 00000000..60853d45 --- /dev/null +++ b/61_Math_Dice/ruby/mathdice.rb @@ -0,0 +1,115 @@ +def intro + puts " MATH DICE + CREATIVE COMPUTING MORRISTOWN, NEW JERSEY + +THIS PROGRAM GENERATES SUCCESSIVE PICTURES OF TWO DICE. +WHEN TWO DICE AND AN EQUAL SIGN FOLLOWED BY A QUESTION +MARK HAVE BEEN PRINTED, TYPE YOUR ANSWER AND THE RETURN KEY. +TO CONCLUDE THE LESSON, TYPE '0' AS YOUR ANSWER. +" +end + +def game_play + num = 0 + sum = 0 + tries = 0 + until num == 2 do + num+=1 + roll = rand(6) + 1 + print_dice(roll) + sum = sum + roll + if num == 1 + print "\n +\n\n" + end + if num == 2 + print "\n =? " + ans = gets.chomp + if ans.to_i == 0 + #END GAME + exit(0) + elsif ans.to_i == sum + puts "RIGHT!" + puts "THE DICE ROLL AGAIN" + else + puts "NO, COUNT THE SPOTS AND GIVE ANOTHER ANSWER" + print "\n =? " + ans = gets.chomp + if ans.to_i == sum + puts "RIGHT!" + puts "THE DICE ROLL AGAIN" + elsif ans.to_i == 0 + exit(0) + else + puts "NO, THE ANSWER IS #{sum}" + end + end + end + end +end + + + +def print_dice(roll) + puts " -----" + if roll == 1 + print_blank + print_one_mid + print_blank + elsif roll == 2 + print_one_left + print_blank + print_one_right + elsif roll == 3 + print_one_left + print_one_mid + print_one_right + elsif roll == 4 + print_two + print_blank + print_two + elsif roll == 5 + print_two + print_one_mid + print_two + elsif roll == 6 + print_two + print_two + print_two + else + puts "not a legit dice roll" + end + puts " -----" +end + + +def print_one_left + puts "I * I" +end + +def print_one_mid + puts "I * I" +end + +def print_one_right + puts "I * I" +end + +def print_two + puts "I * * I" +end + +def print_blank + puts "I I" +end + + + +def main + intro + #Continue playing forever until it terminates with exit in game_play + while 1 == 1 do + game_play + end +end + +main From eeef2451c60879596404b6e1ba0bf939f935c72d Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sun, 16 Jan 2022 18:44:43 +0000 Subject: [PATCH 24/82] Deminify --- 84_Super_Star_Trek/superstartrek.bas | 438 +++++++++++++-------------- 1 file changed, 219 insertions(+), 219 deletions(-) diff --git a/84_Super_Star_Trek/superstartrek.bas b/84_Super_Star_Trek/superstartrek.bas index 74300763..72fb4f5d 100644 --- a/84_Super_Star_Trek/superstartrek.bas +++ b/84_Super_Star_Trek/superstartrek.bas @@ -37,23 +37,23 @@ 475 DEF FNR(R)=INT(RND(R)*7.98+1.01) 480 REM INITIALIZE ENTERPRIZE'S POSITION 490 Q1=FNR(1):Q2=FNR(1):S1=FNR(1):S2=FNR(1) -530 FORI=1TO9:C(I,1)=0:C(I,2)=0:NEXTI +530 FOR I=1 TO 9:C(I,1)=0:C(I,2)=0:NEXT I 540 C(3,1)=-1:C(2,1)=-1:C(4,1)=-1:C(4,2)=-1:C(5,2)=-1:C(6,2)=-1 600 C(1,2)=1:C(2,2)=1:C(6,1)=1:C(7,1)=1:C(8,1)=1:C(8,2)=1:C(9,2)=1 -670 FORI=1TO8:D(I)=0:NEXTI +670 FOR I=1 TO 8:D(I)=0:NEXT I 710 A1$="NAVSRSLRSPHATORSHEDAMCOMXXX" 810 REM SETUP WHAT EXHISTS IN GALAXY . . . 815 REM K3= # KLINGONS B3= # STARBASES S3 = # STARS -820 FORI=1TO8:FORJ=1TO8:K3=0:Z(I,J)=0:R1=RND(1) -850 IFR1>.98THENK3=3:K9=K9+3:GOTO980 -860 IFR1>.95THENK3=2:K9=K9+2:GOTO980 -870 IFR1>.80THENK3=1:K9=K9+1 -980 B3=0:IFRND(1)>.96THENB3=1:B9=B9+1 -1040 G(I,J)=K3*100+B3*10+FNR(1):NEXTJ:NEXTI:IFK9>T9THENT9=K9+1 -1100 IFB9<>0THEN1200 -1150 IFG(Q1,Q2)<200THENG(Q1,Q2)=G(Q1,Q2)+120:K9=K9+1 +820 FOR I=1 TO 8:FOR J=1 TO 8:K3=0:Z(I,J)=0:R1=RND(1) +850 IF R1>.98 THEN K3=3:K9=K9+3:GOTO 980 +860 IF R1>.95 THEN K3=2:K9=K9+2:GOTO 980 +870 IF R1>.80 THEN K3=1:K9=K9+1 +980 B3=0:IF RND(1)>.96 THEN B3=1:B9=B9+1 +1040 G(I,J)=K3*100+B3*10+FNR(1):NEXT J:NEXT I:IF K9>T9 THEN T9=K9+1 +1100 IF B9<>0 THEN 1200 +1150 IF G(Q1,Q2)<200 THEN G(Q1,Q2)=G(Q1,Q2)+120:K9=K9+1 1160 B9=1:G(Q1,Q2)=G(Q1,Q2)+10:Q1=FNR(1):Q2=FNR(1) -1200 K7=K9:IFB9<>1THENX$="S":X0$=" ARE " +1200 K7=K9:IF B9<>1 THEN X$="S":X0$=" ARE " 1230 PRINT"YOUR ORDERS ARE AS FOLLOWS:" 1240 PRINT" DESTROY THE";K9;"KLINGON WARSHIPS WHICH HAVE INVADED" 1252 PRINT" THE GALAXY BEFORE THEY CAN ATTACK FEDERATION HEADQUARTERS" @@ -63,35 +63,35 @@ 1300 I=RND(1):REM IF INP(1)=13 THEN 1300 1310 REM HERE ANY TIME NEW QUADRANT ENTERED 1320 Z4=Q1:Z5=Q2:K3=0:B3=0:S3=0:G5=0:D4=.5*RND(1):Z(Q1,Q2)=G(Q1,Q2) -1390 IFQ1<1ORQ1>8ORQ2<1ORQ2>8THEN1600 +1390 IF Q1<1 OR Q1>8 OR Q2<1 OR Q2>8 THEN 1600 1430 GOSUB 9030:PRINT:IF T0<>T THEN 1490 1460 PRINT"YOUR MISSION BEGINS WITH YOUR STARSHIP LOCATED" 1470 PRINT"IN THE GALACTIC QUADRANT, '";G2$;"'.":GOTO 1500 1490 PRINT"NOW ENTERING ";G2$;" QUADRANT . . ." 1500 PRINT:K3=INT(G(Q1,Q2)*.01):B3=INT(G(Q1,Q2)*.1)-10*K3 -1540 S3=G(Q1,Q2)-100*K3-10*B3:IFK3=0THEN1590 -1560 PRINT"COMBAT AREA CONDITION RED":IFS>200THEN1590 +1540 S3=G(Q1,Q2)-100*K3-10*B3:IF K3=0 THEN 1590 +1560 PRINT"COMBAT AREA CONDITION RED":IF S>200 THEN 1590 1580 PRINT" SHIELDS DANGEROUSLY LOW" -1590 FORI=1TO3:K(I,1)=0:K(I,2)=0:NEXTI -1600 FORI=1TO3:K(I,3)=0:NEXTI:Q$=Z$+Z$+Z$+Z$+Z$+Z$+Z$+LEFT$(Z$,17) +1590 FOR I=1 TO 3:K(I,1)=0:K(I,2)=0:NEXT I +1600 FOR I=1 TO 3:K(I,3)=0:NEXT I:Q$=Z$+Z$+Z$+Z$+Z$+Z$+Z$+LEFT$(Z$,17) 1660 REM POSITION ENTERPRISE IN QUADRANT, THEN PLACE "K3" KLINGONS, & 1670 REM "B3" STARBASES, & "S3" STARS ELSEWHERE. -1680 A$="<*>":Z1=S1:Z2=S2:GOSUB8670:IFK3<1THEN1820 -1720 FORI=1TOK3:GOSUB8590:A$="+K+":Z1=R1:Z2=R2 -1780 GOSUB8670:K(I,1)=R1:K(I,2)=R2:K(I,3)=S9*(0.5+RND(1)):NEXTI -1820 IFB3<1THEN1910 -1880 GOSUB8590:A$=">!<":Z1=R1:B4=R1:Z2=R2:B5=R2:GOSUB8670 -1910 FORI=1TOS3:GOSUB8590:A$=" * ":Z1=R1:Z2=R2:GOSUB8670:NEXTI -1980 GOSUB6430 -1990 IFS+E>10THENIFE>10ORD(7)=0THEN2060 +1680 A$="<*>":Z1=S1:Z2=S2:GOSUB 8670:IF K3<1 THEN 1820 +1720 FOR I=1 TO K3:GOSUB 8590:A$="+K+":Z1=R1:Z2=R2 +1780 GOSUB 8670:K(I,1)=R1:K(I,2)=R2:K(I,3)=S9*(0.5+RND(1)):NEXT I +1820 IF B3<1 THEN 1910 +1880 GOSUB 8590:A$=">!<":Z1=R1:B4=R1:Z2=R2:B5=R2:GOSUB 8670 +1910 FOR I=1 TO S3:GOSUB 8590:A$=" * ":Z1=R1:Z2=R2:GOSUB 8670:NEXT I +1980 GOSUB 6430 +1990 IF S+E>10 THEN IF E>10 OR D(7)=0 THEN 2060 2020 PRINT:PRINT"** FATAL ERROR ** YOU'VE JUST STRANDED YOUR SHIP IN " 2030 PRINT"SPACE":PRINT"YOU HAVE INSUFFICIENT MANEUVERING ENERGY,"; 2040 PRINT" AND SHIELD CONTROL":PRINT"IS PRESENTLY INCAPABLE OF CROSS"; -2050 PRINT"-CIRCUITING TO ENGINE ROOM!!":GOTO6220 +2050 PRINT"-CIRCUITING TO ENGINE ROOM!!":GOTO 6220 2060 INPUT"COMMAND";A$ -2080 FORI=1TO9:IFLEFT$(A$,3)<>MID$(A1$,3*I-2,3)THEN2160 -2140 ONIGOTO2300,1980,4000,4260,4700,5530,5690,7290,6270 -2160 NEXTI:PRINT"ENTER ONE OF THE FOLLOWING:" +2080 FOR I=1 TO 9:IF LEFT$(A$,3)<>MID$(A1$,3*I-2,3) THEN 2160 +2140 ONIGOTO 2300,1980,4000,4260,4700,5530,5690,7290,6270 +2160 NEXT I:PRINT"ENTER ONE OF THE FOLLOWING:" 2180 PRINT" NAV (TO SET COURSE)" 2190 PRINT" SRS (FOR SHORT RANGE SENSOR SCAN)" 2200 PRINT" LRS (FOR LONG RANGE SENSOR SCAN)" @@ -102,288 +102,288 @@ 2250 PRINT" COM (TO CALL ON LIBRARY-COMPUTER)" 2260 PRINT" XXX (TO RESIGN YOUR COMMAND)":PRINT:GOTO 1990 2290 REM COURSE CONTROL BEGINS HERE -2300 INPUT"COURSE (0-9)";C1:IFC1=9THENC1=1 -2310 IFC1>=1ANDC1<9THEN2350 -2330 PRINT" LT. SULU REPORTS, 'INCORRECT COURSE DATA, SIR!'":GOTO1990 -2350 X$="8":IFD(1)<0THENX$="0.2" -2360 PRINT"WARP FACTOR (0-";X$;")";:INPUTW1:IFD(1)<0ANDW1>.2THEN2470 -2380 IFW1>0ANDW1<=8THEN2490 -2390 IFW1=0THEN1990 +2300 INPUT"COURSE (0-9)";C1:IF C1=9 THEN C1=1 +2310 IF C1>=1 AND C1<9 THEN 2350 +2330 PRINT" LT. SULU REPORTS, 'INCORRECT COURSE DATA, SIR!'":GOTO 1990 +2350 X$="8":IF D(1)<0 THEN X$="0.2" +2360 PRINT"WARP FACTOR (0-";X$;")";:INPUT W1:IF D(1)<0 AND W1>.2 THEN 2470 +2380 IF W1>0 AND W1<=8 THEN 2490 +2390 IF W1=0 THEN 1990 2420 PRINT" CHIEF ENGINEER SCOTT REPORTS 'THE ENGINES WON'T TAKE"; -2430 PRINT" WARP ";W1;"!'":GOTO1990 -2470 PRINT"WARP ENGINES ARE DAMAGED. MAXIUM SPEED = WARP 0.2":GOTO1990 -2490 N=INT(W1*8+.5):IFE-N>=0THEN2590 +2430 PRINT" WARP ";W1;"!'":GOTO 1990 +2470 PRINT"WARP ENGINES ARE DAMAGED. MAXIUM SPEED = WARP 0.2":GOTO 1990 +2490 N=INT(W1*8+.5):IF E-N>=0 THEN 2590 2500 PRINT"ENGINEERING REPORTS 'INSUFFICIENT ENERGY AVAILABLE" 2510 PRINT" FOR MANEUVERING AT WARP";W1;"!'" -2530 IFS=1THEND6=1 -2770 FORI=1TO8:IFD(I)>=0THEN2880 -2790 D(I)=D(I)+D6:IFD(I)>-.1ANDD(I)<0THEND(I)=-.1:GOTO2880 -2800 IFD(I)<0THEN2880 -2810 IFD1<>1THEND1=1:PRINT"DAMAGE CONTROL REPORT: "; -2840 PRINTTAB(8);:R1=I:GOSUB8790:PRINTG2$;" REPAIR COMPLETED." -2880 NEXTI:IFRND(1)>.2THEN3070 -2910 R1=FNR(1):IFRND(1)>=.6THEN3000 +2590 FOR I=1 TO K3:IF K(I,3)=0 THEN 2700 +2610 A$=" ":Z1=K(I,1):Z2=K(I,2):GOSUB 8670:GOSUB 8590 +2660 K(I,1)=Z1:K(I,2)=Z2:A$="+K+":GOSUB 8670 +2700 NEXT I:GOSUB 6000:D1=0:D6=W1:IF W1>=1 THEN D6=1 +2770 FOR I=1 TO 8:IF D(I)>=0 THEN 2880 +2790 D(I)=D(I)+D6:IF D(I)>-.1 AND D(I)<0 THEN D(I)=-.1:GOTO 2880 +2800 IF D(I)<0 THEN 2880 +2810 IF D1<>1 THEN D1=1:PRINT"DAMAGE CONTROL REPORT: "; +2840 PRINTTAB(8);:R1=I:GOSUB 8790:PRINT G2$;" REPAIR COMPLETED." +2880 NEXT I:IF RND(1)>.2 THEN 3070 +2910 R1=FNR(1):IF RND(1)>=.6 THEN 3000 2930 D(R1)=D(R1)-(RND(1)*5+1):PRINT"DAMAGE CONTROL REPORT: "; -2960 GOSUB8790:PRINTG2$;" DAMAGED":PRINT:GOTO3070 +2960 GOSUB 8790:PRINTG2$;" DAMAGED":PRINT:GOTO 3070 3000 D(R1)=D(R1)+RND(1)*3+1:PRINT"DAMAGE CONTROL REPORT: "; -3030 GOSUB8790:PRINTG2$;" STATE OF REPAIR IMPROVED":PRINT +3030 GOSUB 8790:PRINTG2$;" STATE OF REPAIR IMPROVED":PRINT 3060 REM BEGIN MOVING STARSHIP -3070 A$=" ":Z1=INT(S1):Z2=INT(S2):GOSUB8670 +3070 A$=" ":Z1=INT(S1):Z2=INT(S2):GOSUB 8670 3110 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1)):X=S1:Y=S2 3140 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):Q4=Q1:Q5=Q2 -3170 FORI=1TON:S1=S1+X1:S2=S2+X2:IFS1<1ORS1>=9ORS2<1ORS2>=9THEN3500 -3240 S8=INT(S1)*24+INT(S2)*3-26:IFMID$(Q$,S8,2)=" "THEN3360 +3170 FOR I=1 TO N:S1=S1+X1:S2=S2+X2:IF S1<1ORS1>=9 OR S2<1 OR S2>=9 THEN 3500 +3240 S8=INT(S1)*24+INT(S2)*3-26:IF MID$(Q$,S8,2)=" " THEN 3360 3320 S1=INT(S1-X1):S2=INT(S2-X2):PRINT"WARP ENGINES SHUT DOWN AT "; -3350 PRINT"SECTOR";S1;",";S2;"DUE TO BAD NAVAGATION":GOTO3370 -3360 NEXTI:S1=INT(S1):S2=INT(S2) -3370 A$="<*>":Z1=INT(S1):Z2=INT(S2):GOSUB8670:GOSUB3910:T8=1 -3430 IFW1<1THENT8=.1*INT(10*W1) -3450 T=T+T8:IFT>T0+T9THEN6220 +3350 PRINT"SECTOR";S1;",";S2;"DUE TO BAD NAVAGATION":GOTO 3370 +3360 NEXT I:S1=INT(S1):S2=INT(S2) +3370 A$="<*>":Z1=INT(S1):Z2=INT(S2):GOSUB 8670:GOSUB 3910:T8=1 +3430 IF W1<1 THEN T8=.1*INT(10*W1) +3450 T=T+T8:IF T>T0+T9 THEN 6220 3470 REM SEE IF DOCKED, THEN GET COMMAND -3480 GOTO1980 +3480 GOTO 1980 3490 REM EXCEEDED QUADRANT LIMITS 3500 X=8*Q1+X+N*X1:Y=8*Q2+Y+N*X2:Q1=INT(X/8):Q2=INT(Y/8):S1=INT(X-Q1*8) -3550 S2=INT(Y-Q2*8):IFS1=0THENQ1=Q1-1:S1=8 -3590 IFS2=0THENQ2=Q2-1:S2=8 -3620 X5=0:IFQ1<1THENX5=1:Q1=1:S1=1 -3670 IFQ1>8THENX5=1:Q1=8:S1=8 -3710 IFQ2<1THENX5=1:Q2=1:S2=1 -3750 IFQ2>8THENX5=1:Q2=8:S2=8 -3790 IFX5=0THEN3860 +3550 S2=INT(Y-Q2*8):IF S1=0 THEN Q1=Q1-1:S1=8 +3590 IF S2=0 THEN Q2=Q2-1:S2=8 +3620 X5=0:IF Q1<1 THEN X5=1:Q1=1:S1=1 +3670 IF Q1>8 THEN X5=1:Q1=8:S1=8 +3710 IF Q2<1 THEN X5=1:Q2=1:S2=1 +3750 IF Q2>8 THEN X5=1:Q2=8:S2=8 +3790 IF X5=0 THEN 3860 3800 PRINT"LT. UHURA REPORTS MESSAGE FROM STARFLEET COMMAND:" 3810 PRINT" 'PERMISSION TO ATTEMPT CROSSING OF GALACTIC PERIMETER" 3820 PRINT" IS HEREBY *DENIED*. SHUT DOWN YOUR ENGINES.'" 3830 PRINT"CHIEF ENGINEER SCOTT REPORTS 'WARP ENGINES SHUT DOWN" 3840 PRINT" AT SECTOR";S1;",";S2;"OF QUADRANT";Q1;",";Q2;".'" -3850 IFT>T0+T9THEN6220 -3860 IF8*Q1+Q2=8*Q4+Q5THEN3370 -3870 T=T+1:GOSUB3910:GOTO1320 +3850 IF T>T0+T9 THEN 6220 +3860 IF 8*Q1+Q2=8*Q4+Q5 THEN 3370 +3870 T=T+1:GOSUB 3910:GOTO 1320 3900 REM MANEUVER ENERGY S/R ** -3910 E=E-N-10:IFE>=0THENRETURN +3910 E=E-N-10:IF E>=0THEN RETURN 3930 PRINT"SHIELD CONTROL SUPPLIES ENERGY TO COMPLETE THE MANEUVER." -3940 S=S+E:E=0:IFS<=0THENS=0 +3940 S=S+E:E=0:IF S<=0 THEN S=0 3980 RETURN 3990 REM LONG RANGE SENSOR SCAN CODE -4000 IFD(3)<0THENPRINT"LONG RANGE SENSORS ARE INOPERABLE":GOTO1990 +4000 IF D(3)<0 THEN PRINT"LONG RANGE SENSORS ARE INOPERABLE":GOTO 1990 4030 PRINT"LONG RANGE SCAN FOR QUADRANT";Q1;",";Q2 -4040 O1$="-------------------":PRINTO1$ -4060 FORI=Q1-1TOQ1+1:N(1)=-1:N(2)=-2:N(3)=-3:FORJ=Q2-1TOQ2+1 -4120 IFI>0ANDI<9ANDJ>0ANDJ<9THENN(J-Q2+2)=G(I,J):Z(I,J)=G(I,J) -4180 NEXTJ:FORL=1TO3:PRINT": ";:IFN(L)<0THENPRINT"*** ";:GOTO4230 +4040 O1$="-------------------":PRINT O1$ +4060 FOR I=Q1-1TOQ1+1:N(1)=-1:N(2)=-2:N(3)=-3:FOR J=Q2-1TOQ2+1 +4120 IF I>0ANDI<9ANDJ>0ANDJ<9 THEN N(J-Q2+2)=G(I,J):Z(I,J)=G(I,J) +4180 NEXT J:FOR L=1TO3:PRINT": ";:IF N(L)<0 THEN PRINT"*** ";:GOTO 4230 4210 PRINTRIGHT$(STR$(N(L)+1000),3);" "; -4230 NEXTL:PRINT":":PRINTO1$:NEXTI:GOTO1990 +4230 NEXT L:PRINT":":PRINTO1$:NEXT I:GOTO 1990 4250 REM PHASER CONTROL CODE BEGINS HERE -4260 IFD(4)<0THENPRINT"PHASERS INOPERATIVE":GOTO1990 -4265 IFK3>0THEN4330 +4260 IF D(4)<0 THEN PRINT"PHASERS INOPERATIVE":GOTO 1990 +4265 IF K3>0 THEN 4330 4270 PRINT"SCIENCE OFFICER SPOCK REPORTS 'SENSORS SHOW NO ENEMY SHIPS" -4280 PRINT" IN THIS QUADRANT'":GOTO1990 -4330 IFD(8)<0THENPRINT"COMPUTER FAILURE HAMPERS ACCURACY" +4280 PRINT" IN THIS QUADRANT'":GOTO 1990 +4330 IF D(8)<0 THEN PRINT"COMPUTER FAILURE HAMPERS ACCURACY" 4350 PRINT"PHASERS LOCKED ON TARGET; "; 4360 PRINT"ENERGY AVAILABLE =";E;"UNITS" -4370 INPUT"NUMBER OF UNITS TO FIRE";X:IFX<=0THEN1990 -4400 IFE-X<0THEN4360 -4410 E=E-X:IFD(7)<0THENX=X*RND(1) -4450 H1=INT(X/K3):FORI=1TO3:IFK(I,3)<=0THEN4670 -4480 H=INT((H1/FND(0))*(RND(1)+2)):IFH>.15*K(I,3)THEN4530 -4500 PRINT"SENSORS SHOW NO DAMAGE TO ENEMY AT ";K(I,1);",";K(I,2):GOTO4670 +4370 INPUT"NUMBER OF UNITS TO FIRE";X:IF X<=0 THEN 1990 +4400 IF E-X<0 THEN 4360 +4410 E=E-X:IF D(7)<0 THEN X=X*RND(1) +4450 H1=INT(X/K3):FOR I=1TO3:IF K(I,3)<=0 THEN 4670 +4480 H=INT((H1/FND(0))*(RND(1)+2)):IF H>.15*K(I,3) THEN 4530 +4500 PRINT"SENSORS SHOW NO DAMAGE TO ENEMY AT ";K(I,1);",";K(I,2):GOTO 4670 4530 K(I,3)=K(I,3)-H:PRINTH;"UNIT HIT ON KLINGON AT SECTOR";K(I,1);","; -4550 PRINTK(I,2):IFK(I,3)<=0THENPRINT"*** KLINGON DESTROYED ***":GOTO4580 -4560 PRINT" (SENSORS SHOW";K(I,3);"UNITS REMAINING)":GOTO4670 -4580 K3=K3-1:K9=K9-1:Z1=K(I,1):Z2=K(I,2):A$=" ":GOSUB8670 -4650 K(I,3)=0:G(Q1,Q2)=G(Q1,Q2)-100:Z(Q1,Q2)=G(Q1,Q2):IFK9<=0THEN6370 -4670 NEXTI:GOSUB6000:GOTO1990 +4550 PRINTK(I,2):IF K(I,3)<=0 THEN PRINT"*** KLINGON DESTROYED ***":GOTO 4580 +4560 PRINT" (SENSORS SHOW";K(I,3);"UNITS REMAINING)":GOTO 4670 +4580 K3=K3-1:K9=K9-1:Z1=K(I,1):Z2=K(I,2):A$=" ":GOSUB 8670 +4650 K(I,3)=0:G(Q1,Q2)=G(Q1,Q2)-100:Z(Q1,Q2)=G(Q1,Q2):IF K9<=0 THEN 6370 +4670 NEXT I:GOSUB 6000:GOTO 1990 4690 REM PHOTON TORPEDO CODE BEGINS HERE -4700 IFP<=0THENPRINT"ALL PHOTON TORPEDOES EXPENDED":GOTO 1990 -4730 IFD(5)<0THENPRINT"PHOTON TUBES ARE NOT OPERATIONAL":GOTO1990 -4760 INPUT"PHOTON TORPEDO COURSE (1-9)";C1:IFC1=9THENC1=1 -4780 IFC1>=1ANDC1<9THEN4850 +4700 IF P<=0 THEN PRINT"ALL PHOTON TORPEDOES EXPENDED":GOTO 1990 +4730 IF D(5)<0 THEN PRINT"PHOTON TUBES ARE NOT OPERATIONAL":GOTO 1990 +4760 INPUT"PHOTON TORPEDO COURSE (1-9)";C1:IF C1=9 THEN C1=1 +4780 IF C1>=1ANDC1<9 THEN 4850 4790 PRINT"ENSIGN CHEKOV REPORTS, 'INCORRECT COURSE DATA, SIR!'" -4800 GOTO1990 +4800 GOTO 1990 4850 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1)):E=E-2:P=P-1 4860 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):X=S1:Y=S2 4910 PRINT"TORPEDO TRACK:" 4920 X=X+X1:Y=Y+X2:X3=INT(X+.5):Y3=INT(Y+.5) -4960 IFX3<1ORX3>8ORY3<1ORY3>8THEN5490 -5000 PRINT" ";X3;",";Y3:A$=" ":Z1=X:Z2=Y:GOSUB8830 -5050 IFZ3<>0THEN4920 -5060 A$="+K+":Z1=X:Z2=Y:GOSUB8830:IFZ3=0THEN5210 -5110 PRINT"*** KLINGON DESTROYED ***":K3=K3-1:K9=K9-1:IFK9<=0THEN6370 -5150 FORI=1TO3:IFX3=K(I,1)ANDY3=K(I,2)THEN5190 -5180 NEXTI:I=3 -5190 K(I,3)=0:GOTO5430 -5210 A$=" * ":Z1=X:Z2=Y:GOSUB8830:IFZ3=0THEN5280 -5260 PRINT"STAR AT";X3;",";Y3;"ABSORBED TORPEDO ENERGY.":GOSUB6000:GOTO1990 -5280 A$=">!<":Z1=X:Z2=Y:GOSUB8830:IFZ3=0THEN4760 +4960 IF X3<1ORX3>8ORY3<1ORY3>8 THEN 5490 +5000 PRINT" ";X3;",";Y3:A$=" ":Z1=X:Z2=Y:GOSUB 8830 +5050 IF Z3<>0 THEN 4920 +5060 A$="+K+":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 5210 +5110 PRINT"*** KLINGON DESTROYED ***":K3=K3-1:K9=K9-1:IF K9<=0 THEN 6370 +5150 FOR I=1TO3:IF X3=K(I,1)ANDY3=K(I,2) THEN 5190 +5180 NEXT I:I=3 +5190 K(I,3)=0:GOTO 5430 +5210 A$=" * ":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 5280 +5260 PRINT"STAR AT";X3;",";Y3;"ABSORBED TORPEDO ENERGY.":GOSUB 6000:GOTO 1990 +5280 A$=">!<":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 4760 5330 PRINT"*** STARBASE DESTROYED ***":B3=B3-1:B9=B9-1 -5360 IFB9>0ORK9>T-T0-T9THEN5400 +5360 IF B9>0ORK9>T-T0-T9 THEN 5400 5370 PRINT"THAT DOES IT, CAPTAIN!! YOU ARE HEREBY RELIEVED OF COMMAND" 5380 PRINT"AND SENTENCED TO 99 STARDATES AT HARD LABOR ON CYGNUS 12!!" 5390 GOTO 6270 5400 PRINT"STARFLEET COMMAND REVIEWING YOUR RECORD TO CONSIDER" 5410 PRINT"COURT MARTIAL!":D0=0 -5430 Z1=X:Z2=Y:A$=" ":GOSUB8670 -5470 G(Q1,Q2)=K3*100+B3*10+S3:Z(Q1,Q2)=G(Q1,Q2):GOSUB6000:GOTO1990 -5490 PRINT"TORPEDO MISSED":GOSUB6000:GOTO1990 +5430 Z1=X:Z2=Y:A$=" ":GOSUB 8670 +5470 G(Q1,Q2)=K3*100+B3*10+S3:Z(Q1,Q2)=G(Q1,Q2):GOSUB 6000:GOTO 1990 +5490 PRINT"TORPEDO MISSED":GOSUB 6000:GOTO 1990 5520 REM SHIELD CONTROL -5530 IFD(7)<0THENPRINT"SHIELD CONTROL INOPERABLE":GOTO1990 +5530 IF D(7)<0 THEN PRINT"SHIELD CONTROL INOPERABLE":GOTO 1990 5560 PRINT"ENERGY AVAILABLE =";E+S;:INPUT"NUMBER OF UNITS TO SHIELDS";X -5580 IFX<0ORS=XTHENPRINT"":GOTO1990 -5590 IFX<=E+STHEN5630 +5580 IF X<0ORS=X THEN PRINT"":GOTO 1990 +5590 IF X<=E+S THEN 5630 5600 PRINT"SHIELD CONTROL REPORTS 'THIS IS NOT THE FEDERATION TREASURY.'" -5610 PRINT"":GOTO1990 +5610 PRINT"":GOTO 1990 5630 E=E+S-X:S=X:PRINT"DEFLECTOR CONTROL ROOM REPORT:" -5660 PRINT" 'SHIELDS NOW AT";INT(S);"UNITS PER YOUR COMMAND.'":GOTO1990 +5660 PRINT" 'SHIELDS NOW AT";INT(S);"UNITS PER YOUR COMMAND.'":GOTO 1990 5680 REM DAMAGE CONTROL -5690 IFD(6)>=0THEN5910 -5700 PRINT"DAMAGE CONTROL REPORT NOT AVAILABLE":IFD0=0THEN1990 -5720 D3=0:FORI=1TO8:IFD(I)<0THEND3=D3+.1 -5760 NEXTI:IFD3=0THEN1990 -5780 PRINT:D3=D3+D4:IFD3>=1THEND3=.9 +5690 IF D(6)>=0 THEN 5910 +5700 PRINT"DAMAGE CONTROL REPORT NOT AVAILABLE":IF D0=0 THEN 1990 +5720 D3=0:FOR I=1TO8:IF D(I)<0 THEN D3=D3+.1 +5760 NEXT I:IF D3=0 THEN 1990 +5780 PRINT:D3=D3+D4:IF D3>=1 THEN D3=.9 5810 PRINT"TECHNICIANS STANDING BY TO EFFECT REPAIRS TO YOUR SHIP;" 5820 PRINT"ESTIMATED TIME TO REPAIR:";.01*INT(100*D3);"STARDATES" 5840 INPUT "WILL YOU AUTHORIZE THE REPAIR ORDER (Y/N)";A$ -5860 IFA$<>"Y"THEN 1990 -5870 FORI=1TO8:IFD(I)<0THEND(I)=0 -5890 NEXTI:T=T+D3+.1 -5910 PRINT:PRINT"DEVICE STATE OF REPAIR":FORR1=1TO8 -5920 GOSUB8790:PRINTG2$;LEFT$(Z$,25-LEN(G2$));INT(D(R1)*100)*.01 -5950 NEXTR1:PRINT:IFD0<>0THEN5720 +5860 IF A$<>"Y"THEN 1990 +5870 FOR I=1TO8:IF D(I)<0 THEN D(I)=0 +5890 NEXT I:T=T+D3+.1 +5910 PRINT:PRINT"DEVICE STATE OF REPAIR":FOR R1=1TO8 +5920 GOSUB 8790:PRINTG2$;LEFT$(Z$,25-LEN(G2$));INT(D(R1)*100)*.01 +5950 NEXT R1:PRINT:IF D0<>0 THEN 5720 5980 GOTO 1990 5990 REM KLINGONS SHOOTING -6000 IFK3<=0THENRETURN -6010 IFD0<>0THENPRINT"STARBASE SHIELDS PROTECT THE ENTERPRISE":RETURN -6040 FORI=1TO3:IFK(I,3)<=0THEN6200 +6000 IF K3<=0THEN RETURN +6010 IF D0<>0 THEN PRINT"STARBASE SHIELDS PROTECT THE ENTERPRISE":RETURN +6040 FOR I=1TO3:IF K(I,3)<=0 THEN 6200 6060 H=INT((K(I,3)/FND(1))*(2+RND(1))):S=S-H:K(I,3)=K(I,3)/(3+RND(0)) 6080 PRINTH;"UNIT HIT ON ENTERPRISE FROM SECTOR";K(I,1);",";K(I,2) -6090 IFS<=0THEN6240 -6100 PRINT" ":IFH<20THEN6200 -6120 IFRND(1)>.6ORH/S<=.02THEN6200 -6140 R1=FNR(1):D(R1)=D(R1)-H/S-.5*RND(1):GOSUB8790 +6090 IF S<=0 THEN 6240 +6100 PRINT" ":IF H<20 THEN 6200 +6120 IF RND(1)>.6ORH/S<=.02 THEN 6200 +6140 R1=FNR(1):D(R1)=D(R1)-H/S-.5*RND(1):GOSUB 8790 6170 PRINT"DAMAGE CONTROL REPORTS ";G2$;" DAMAGED BY THE HIT'" -6200 NEXTI:RETURN +6200 NEXT I:RETURN 6210 REM END OF GAME 6220 PRINT"IT IS STARDATE";T:GOTO 6270 6240 PRINT:PRINT"THE ENTERPRISE HAS BEEN DESTROYED. THEN FEDERATION "; 6250 PRINT"WILL BE CONQUERED":GOTO 6220 6270 PRINT"THERE WERE";K9;"KLINGON BATTLE CRUISERS LEFT AT" 6280 PRINT"THE END OF YOUR MISSION." -6290 PRINT:PRINT:IFB9=0THEN6360 +6290 PRINT:PRINT:IF B9=0 THEN 6360 6310 PRINT"THE FEDERATION IS IN NEED OF A NEW STARSHIP COMMANDER" 6320 PRINT"FOR A SIMILAR MISSION -- IF THERE IS A VOLUNTEER," -6330 INPUT"LET HIM STEP FORWARD AND ENTER 'AYE'";A$:IFA$="AYE"THEN10 +6330 INPUT"LET HIM STEP FORWARD AND ENTER 'AYE'";A$:IF A$="AYE" THEN 10 6360 END 6370 PRINT"CONGRULATION, CAPTAIN! THEN LAST KLINGON BATTLE CRUISER" 6380 PRINT"MENACING THE FDERATION HAS BEEN DESTROYED.":PRINT -6400 PRINT"YOUR EFFICIENCY RATING IS";1000*(K7/(T-T0))^2:GOTO6290 +6400 PRINT"YOUR EFFICIENCY RATING IS";1000*(K7/(T-T0))^2:GOTO 6290 6420 REM SHORT RANGE SENSOR SCAN & STARTUP SUBROUTINE -6430 FORI=S1-1TOS1+1:FORJ=S2-1TOS2+1 -6450 IFINT(I+.5)<1ORINT(I+.5)>8ORINT(J+.5)<1ORINT(J+.5)>8THEN6540 -6490 A$=">!<":Z1=I:Z2=J:GOSUB8830:IFZ3=1THEN6580 -6540 NEXTJ:NEXTI:D0=0:GOTO6650 +6430 FOR I=S1-1TOS1+1:FOR J=S2-1 TO S2+1 +6450 IF INT(I+.5)<1ORINT(I+.5)>8ORINT(J+.5)<1ORINT(J+.5)>8 THEN 6540 +6490 A$=">!<":Z1=I:Z2=J:GOSUB 8830:IF Z3=1 THEN 6580 +6540 NEXT J:NEXT I:D0=0:GOTO 6650 6580 D0=1:C$="DOCKED":E=E0:P=P0 -6620 PRINT"SHIELDS DROPPED FOR DOCKING PURPOSES":S=0:GOTO6720 -6650 IFK3>0THENC$="*RED*":GOTO6720 -6660 C$="GREEN":IFE=0THEN6770 +6620 PRINT"SHIELDS DROPPED FOR DOCKING PURPOSES":S=0:GOTO 6720 +6650 IF K3>0 THEN C$="*RED*":GOTO 6720 +6660 C$="GREEN":IF E=0 THEN 6770 6730 PRINT:PRINT"*** SHORT RANGE SENSORS ARE OUT ***":PRINT:RETURN -6770 O1$="---------------------------------":PRINTO1$:FORI=1TO8 -6820 FORJ=(I-1)*24+1TO(I-1)*24+22STEP3:PRINT" ";MID$(Q$,J,3);:NEXTJ -6830 ONIGOTO6850,6900,6960,7020,7070,7120,7180,7240 -6850 PRINT" STARDATE ";INT(T*10)*.1:GOTO7260 -6900 PRINT" CONDITION ";C$:GOTO7260 -6960 PRINT" QUADRANT ";Q1;",";Q2:GOTO7260 -7020 PRINT" SECTOR ";S1;",";S2:GOTO7260 -7070 PRINT" PHOTON TORPEDOES ";INT(P):GOTO7260 -7120 PRINT" TOTAL ENERGY ";INT(E+S):GOTO7260 -7180 PRINT" SHIELDS ";INT(S):GOTO7260 +6770 O1$="---------------------------------":PRINTO1$:FOR I=1 TO 8 +6820 FOR J=(I-1)*24+1 TO (I-1)*24+22STEP3:PRINT" ";MID$(Q$,J,3);:NEXT J +6830 ONIGOTO 6850,6900,6960,7020,7070,7120,7180,7240 +6850 PRINT" STARDATE ";INT(T*10)*.1:GOTO 7260 +6900 PRINT" CONDITION ";C$:GOTO 7260 +6960 PRINT" QUADRANT ";Q1;",";Q2:GOTO 7260 +7020 PRINT" SECTOR ";S1;",";S2:GOTO 7260 +7070 PRINT" PHOTON TORPEDOES ";INT(P):GOTO 7260 +7120 PRINT" TOTAL ENERGY ";INT(E+S):GOTO 7260 +7180 PRINT" SHIELDS ";INT(S):GOTO 7260 7240 PRINT" KLINGONS REMAINING";INT(K9) -7260 NEXTI:PRINTO1$:RETURN +7260 NEXT I:PRINT O1$:RETURN 7280 REM LIBRARY COMPUTER CODE -7290 IFD(8)<0THENPRINT"COMPUTER DISABLED":GOTO1990 -7320 INPUT"COMPUTER ACTIVE AND AWAITING COMMAND";A:IFA<0THEN1990 -7350 PRINT:H8=1:ONA+1GOTO7540,7900,8070,8500,8150,7400 +7290 IF D(8)<0 THEN PRINT"COMPUTER DISABLED":GOTO 1990 +7320 INPUT"COMPUTER ACTIVE AND AWAITING COMMAND";A:IF A<0 THEN 1990 +7350 PRINT:H8=1:ONA+1GOTO 7540,7900,8070,8500,8150,7400 7360 PRINT"FUNCTIONS AVAILABLE FROM LIBRARY-COMPUTER:" 7370 PRINT" 0 = CUMULATIVE GALACTIC RECORD" 7372 PRINT" 1 = STATUS REPORT" 7374 PRINT" 2 = PHOTON TORPEDO DATA" 7376 PRINT" 3 = STARBASE NAV DATA" 7378 PRINT" 4 = DIRECTION/DISTANCE CALCULATOR" -7380 PRINT" 5 = GALAXY 'REGION NAME' MAP":PRINT:GOTO7320 +7380 PRINT" 5 = GALAXY 'REGION NAME' MAP":PRINT:GOTO 7320 7390 REM SETUP TO CHANGE CUM GAL RECORD TO GALAXY MAP -7400 H8=0:G5=1:PRINT" THE GALAXY":GOTO7550 +7400 H8=0:G5=1:PRINT" THE GALAXY":GOTO 7550 7530 REM CUM GALACTIC RECORD 7540 REM INPUT"DO YOU WANT A HARDCOPY? IS THE TTY ON (Y/N)";A$ -7542 REM IFA$="Y"THENPOKE1229,2:POKE1237,3:NULL1 +7542 REM IF A$="Y" THEN POKE1229,2:POKE1237,3:NULL1 7543 PRINT:PRINT" "; 7544 PRINT"COMPUTER RECORD OF GALAXY FOR QUADRANT";Q1;",";Q2 7546 PRINT 7550 PRINT" 1 2 3 4 5 6 7 8" 7560 O1$=" ----- ----- ----- ----- ----- ----- ----- -----" -7570 PRINTO1$:FORI=1TO8:PRINTI;:IFH8=0THEN7740 -7630 FORJ=1TO8:PRINT" ";:IFZ(I,J)=0THENPRINT"***";:GOTO7720 +7570 PRINT O1$:FOR I=1 TO 8:PRINTI;:IF H8=0 THEN 7740 +7630 FOR J=1 TO 8:PRINT" ";:IF Z(I,J)=0 THEN PRINT"***";:GOTO 7720 7700 PRINTRIGHT$(STR$(Z(I,J)+1000),3); -7720 NEXTJ:GOTO7850 -7740 Z4=I:Z5=1:GOSUB9030:J0=INT(15-.5*LEN(G2$)):PRINTTAB(J0);G2$; +7720 NEXT J:GOTO 7850 +7740 Z4=I:Z5=1:GOSUB 9030:J0=INT(15-.5*LEN(G2$)):PRINTTAB(J0);G2$; 7800 Z5=5:GOSUB 9030:J0=INT(39-.5*LEN(G2$)):PRINTTAB(J0);G2$; -7850 PRINT:PRINTO1$:NEXTI:PRINT:GOTO1990 +7850 PRINT:PRINT O1$:NEXT I:PRINT:GOTO 1990 7890 REM STATUS REPORT -7900 PRINT " STATUS REPORT:":X$="":IFK9>1THENX$="S" +7900 PRINT " STATUS REPORT:":X$="":IF K9>1 THEN X$="S" 7940 PRINT"KLINGON";X$;" LEFT: ";K9 7960 PRINT"MISSION MUST BE COMPLETED IN";.1*INT((T0+T9-T)*10);"STARDATES" -7970 X$="S":IFB9<2THENX$="":IFB9<1THEN8010 +7970 X$="S":IF B9<2 THEN X$="":IF B9<1 THEN 8010 7980 PRINT"THE FEDERATION IS MAINTAINING";B9;"STARBASE";X$;" IN THE GALAXY" -7990 GOTO5690 +7990 GOTO 5690 8010 PRINT"YOUR STUPIDITY HAS LEFT YOU ON YOUR ON IN" -8020 PRINT" THE GALAXY -- YOU HAVE NO STARBASES LEFT!":GOTO5690 +8020 PRINT" THE GALAXY -- YOU HAVE NO STARBASES LEFT!":GOTO 5690 8060 REM TORPEDO, BASE NAV, D/D CALCULATOR -8070 IFK3<=0THEN4270 -8080 X$="":IFK3>1THENX$="S" +8070 IF K3<=0 THEN 4270 +8080 X$="":IF K3>1 THEN X$="S" 8090 PRINT"FROM ENTERPRISE TO KLINGON BATTLE CRUSER";X$ -8100 H8=0:FORI=1TO3:IFK(I,3)<=0THEN8480 +8100 H8=0:FOR I=1 TO 3:IF K(I,3)<=0 THEN 8480 8110 W1=K(I,1):X=K(I,2) -8120 C1=S1:A=S2:GOTO8220 +8120 C1=S1:A=S2:GOTO 8220 8150 PRINT"DIRECTION/DISTANCE CALCULATOR:" 8160 PRINT"YOU ARE AT QUADRANT ";Q1;",";Q2;" SECTOR ";S1;",";S2 8170 PRINT"PLEASE ENTER":INPUT" INITIAL COORDINATES (X,Y)";C1,A 8200 INPUT" FINAL COORDINATES (X,Y)";W1,X -8220 X=X-A:A=C1-W1:IFX<0THEN8350 -8250 IFA<0THEN8410 -8260 IFX>0THEN8280 -8270 IFA=0THENC1=5:GOTO8290 +8220 X=X-A:A=C1-W1:IF X<0 THEN 8350 +8250 IF A<0 THEN 8410 +8260 IF X>0 THEN 8280 +8270 IF A=0 THEN C1=5:GOTO 8290 8280 C1=1 -8290 IFABS(A)<=ABS(X)THEN8330 -8310 PRINT"DIRECTION =";C1+(((ABS(A)-ABS(X))+ABS(A))/ABS(A)):GOTO8460 -8330 PRINT"DIRECTION =";C1+(ABS(A)/ABS(X)):GOTO8460 -8350 IFA>0THENC1=3:GOTO8420 -8360 IFX<>0THENC1=5:GOTO8290 +8290 IF ABS(A)<=ABS(X) THEN 8330 +8310 PRINT"DIRECTION =";C1+(((ABS(A)-ABS(X))+ABS(A))/ABS(A)):GOTO 8460 +8330 PRINT"DIRECTION =";C1+(ABS(A)/ABS(X)):GOTO 8460 +8350 IF A>0 THEN C1=3:GOTO 8420 +8360 IF X<>0 THEN C1=5:GOTO 8290 8410 C1=7 -8420 IFABS(A)>=ABS(X)THEN8450 -8430 PRINT"DIRECTION =";C1+(((ABS(X)-ABS(A))+ABS(X))/ABS(X)):GOTO8460 +8420 IF ABS(A)>=ABS(X) THEN 8450 +8430 PRINT"DIRECTION =";C1+(((ABS(X)-ABS(A))+ABS(X))/ABS(X)):GOTO 8460 8450 PRINT"DIRECTION =";C1+(ABS(X)/ABS(A)) -8460 PRINT"DISTANCE =";SQR(X^2+A^2):IFH8=1THEN1990 -8480 NEXTI:GOTO1990 -8500 IFB3<>0THENPRINT"FROM ENTERPRISE TO STARBASE:":W1=B4:X=B5:GOTO8120 +8460 PRINT"DISTANCE =";SQR(X^2+A^2):IF H8=1 THEN 1990 +8480 NEXT I:GOTO 1990 +8500 IF B3<>0 THEN PRINT"FROM ENTERPRISE TO STARBASE:":W1=B4:X=B5:GOTO 8120 8510 PRINT"MR. SPOCK REPORTS, 'SENSORS SHOW NO STARBASES IN THIS"; -8520 PRINT" QUADRANT.'":GOTO1990 +8520 PRINT" QUADRANT.'":GOTO 1990 8580 REM FIND EMPTY PLACE IN QUADRANT (FOR THINGS) -8590 R1=FNR(1):R2=FNR(1):A$=" ":Z1=R1:Z2=R2:GOSUB8830:IFZ3=0THEN8590 +8590 R1=FNR(1):R2=FNR(1):A$=" ":Z1=R1:Z2=R2:GOSUB 8830:IF Z3=0 THEN 8590 8600 RETURN 8660 REM INSERT IN STRING ARRAY FOR QUADRANT 8670 S8=INT(Z2-.5)*3+INT(Z1-.5)*24+1 8675 IF LEN(A$)<>3THEN PRINT"ERROR":STOP -8680 IFS8=1THENQ$=A$+RIGHT$(Q$,189):RETURN -8690 IFS8=190THENQ$=LEFT$(Q$,189)+A$:RETURN +8680 IF S8=1 THEN Q$=A$+RIGHT$(Q$,189):RETURN +8690 IF S8=190 THEN Q$=LEFT$(Q$,189)+A$:RETURN 8700 Q$=LEFT$(Q$,S8-1)+A$+RIGHT$(Q$,190-S8):RETURN 8780 REM PRINTS DEVICE NAME -8790 ONR1GOTO8792,8794,8796,8798,8800,8802,8804,8806 +8790 ON R1 GOTO 8792,8794,8796,8798,8800,8802,8804,8806 8792 G2$="WARP ENGINES":RETURN 8794 G2$="SHORT RANGE SENSORS":RETURN 8796 G2$="LONG RANGE SENSORS":RETURN @@ -394,30 +394,30 @@ 8806 G2$="LIBRARY-COMPUTER":RETURN 8820 REM STRING COMPARISON IN QUADRANT ARRAY 8830 Z1=INT(Z1+.5):Z2=INT(Z2+.5):S8=(Z2-1)*3+(Z1-1)*24+1:Z3=0 -8890 IFMID$(Q$,S8,3)<>A$THENRETURN +8890 IF MID$(Q$,S8,3)<>A$ THEN RETURN 8900 Z3=1:RETURN 9010 REM QUADRANT NAME IN G2$ FROM Z4,Z5 (=Q1,Q2) 9020 REM CALL WITH G5=1 TO GET REGION NAME ONLY -9030 IFZ5<=4THENONZ4GOTO9040,9050,9060,9070,9080,9090,9100,9110 -9035 GOTO9120 -9040 G2$="ANTARES":GOTO9210 -9050 G2$="RIGEL":GOTO9210 -9060 G2$="PROCYON":GOTO9210 -9070 G2$="VEGA":GOTO9210 -9080 G2$="CANOPUS":GOTO9210 -9090 G2$="ALTAIR":GOTO9210 -9100 G2$="SAGITTARIUS":GOTO9210 -9110 G2$="POLLUX":GOTO9210 -9120 ONZ4GOTO9130,9140,9150,9160,9170,9180,9190,9200 -9130 G2$="SIRIUS":GOTO9210 -9140 G2$="DENEB":GOTO9210 -9150 G2$="CAPELLA":GOTO9210 -9160 G2$="BETELGEUSE":GOTO9210 -9170 G2$="ALDEBARAN":GOTO9210 -9180 G2$="REGULUS":GOTO9210 -9190 G2$="ARCTURUS":GOTO9210 +9030 IF Z5<=4 THEN ON Z4 GOTO 9040,9050,9060,9070,9080,9090,9100,9110 +9035 GOTO 9120 +9040 G2$="ANTARES":GOTO 9210 +9050 G2$="RIGEL":GOTO 9210 +9060 G2$="PROCYON":GOTO 9210 +9070 G2$="VEGA":GOTO 9210 +9080 G2$="CANOPUS":GOTO 9210 +9090 G2$="ALTAIR":GOTO 9210 +9100 G2$="SAGITTARIUS":GOTO 9210 +9110 G2$="POLLUX":GOTO 9210 +9120 ON Z4 GOTO 9130,9140,9150,9160,9170,9180,9190,9200 +9130 G2$="SIRIUS":GOTO 9210 +9140 G2$="DENEB":GOTO 9210 +9150 G2$="CAPELLA":GOTO 9210 +9160 G2$="BETELGEUSE":GOTO 9210 +9170 G2$="ALDEBARAN":GOTO 9210 +9180 G2$="REGULUS":GOTO 9210 +9190 G2$="ARCTURUS":GOTO 9210 9200 G2$="SPICA" -9210 IFG5<>1THENONZ5GOTO9230,9240,9250,9260,9230,9240,9250,9260 +9210 IF G5<>1 THEN ON Z5 GOTO 9230,9240,9250,9260,9230,9240,9250,9260 9220 RETURN 9230 G2$=G2$+" I":RETURN 9240 G2$=G2$+" II":RETURN From d66e772cbc725cb54addecbe7f253a7f496edbc5 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sun, 16 Jan 2022 18:48:01 +0000 Subject: [PATCH 25/82] Clean up PRINT commands --- 84_Super_Star_Trek/superstartrek.bas | 322 +++++++++++++-------------- 1 file changed, 161 insertions(+), 161 deletions(-) diff --git a/84_Super_Star_Trek/superstartrek.bas b/84_Super_Star_Trek/superstartrek.bas index 72fb4f5d..cddc6dd8 100644 --- a/84_Super_Star_Trek/superstartrek.bas +++ b/84_Super_Star_Trek/superstartrek.bas @@ -18,15 +18,15 @@ 190 REM *** LINE NUMBERS FROM VERSION STREK7 OF 1/12/75 PRESERVED AS 200 REM *** MUCH AS POSSIBLE WHILE USING MULTIPLE STATEMENTS PER LINE 205 REM *** SOME LINES ARE LONGER THAN 72 CHARACTERS; THIS WAS DONE -210 REM *** BY USING "?" INSTEAD OF "PRINT" WHEN ENTERING LINES +210 REM *** BY USING "?" INSTEAD OF "PRINT " WHEN ENTERING LINES 215 REM *** 220 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT -221 PRINT" ,------*------," -222 PRINT" ,------------- '--- ------'" -223 PRINT" '-------- --' / /" -224 PRINT" ,---' '-------/ /--," -225 PRINT" '----------------'":PRINT -226 PRINT" THE USS ENTERPRISE --- NCC-1701" +221 PRINT " ,------*------," +222 PRINT " ,------------- '--- ------'" +223 PRINT " '-------- --' / /" +224 PRINT " ,---' '-------/ /--," +225 PRINT " '----------------'":PRINT +226 PRINT " THE USS ENTERPRISE --- NCC-1701" 227 PRINT:PRINT:PRINT:PRINT:PRINT 260 REM CLEAR 600 270 Z$=" " @@ -54,24 +54,24 @@ 1150 IF G(Q1,Q2)<200 THEN G(Q1,Q2)=G(Q1,Q2)+120:K9=K9+1 1160 B9=1:G(Q1,Q2)=G(Q1,Q2)+10:Q1=FNR(1):Q2=FNR(1) 1200 K7=K9:IF B9<>1 THEN X$="S":X0$=" ARE " -1230 PRINT"YOUR ORDERS ARE AS FOLLOWS:" -1240 PRINT" DESTROY THE";K9;"KLINGON WARSHIPS WHICH HAVE INVADED" -1252 PRINT" THE GALAXY BEFORE THEY CAN ATTACK FEDERATION HEADQUARTERS" -1260 PRINT" ON STARDATE";T0+T9;" THIS GIVES YOU";T9;"DAYS. THERE";X0$ -1272 PRINT" ";B9;"STARBASE";X$;" IN THE GALAXY FOR RESUPPLYING YOUR SHIP" -1280 PRINT:REM PRINT"HIT ANY KEY EXCEPT RETURN WHEN READY TO ACCEPT COMMAND" +1230 PRINT "YOUR ORDERS ARE AS FOLLOWS:" +1240 PRINT " DESTROY THE";K9;"KLINGON WARSHIPS WHICH HAVE INVADED" +1252 PRINT " THE GALAXY BEFORE THEY CAN ATTACK FEDERATION HEADQUARTERS" +1260 PRINT " ON STARDATE";T0+T9;" THIS GIVES YOU";T9;"DAYS. THERE";X0$ +1272 PRINT " ";B9;"STARBASE";X$;" IN THE GALAXY FOR RESUPPLYING YOUR SHIP" +1280 PRINT:REM PRINT "HIT ANY KEY EXCEPT RETURN WHEN READY TO ACCEPT COMMAND" 1300 I=RND(1):REM IF INP(1)=13 THEN 1300 1310 REM HERE ANY TIME NEW QUADRANT ENTERED 1320 Z4=Q1:Z5=Q2:K3=0:B3=0:S3=0:G5=0:D4=.5*RND(1):Z(Q1,Q2)=G(Q1,Q2) 1390 IF Q1<1 OR Q1>8 OR Q2<1 OR Q2>8 THEN 1600 1430 GOSUB 9030:PRINT:IF T0<>T THEN 1490 -1460 PRINT"YOUR MISSION BEGINS WITH YOUR STARSHIP LOCATED" -1470 PRINT"IN THE GALACTIC QUADRANT, '";G2$;"'.":GOTO 1500 -1490 PRINT"NOW ENTERING ";G2$;" QUADRANT . . ." +1460 PRINT "YOUR MISSION BEGINS WITH YOUR STARSHIP LOCATED" +1470 PRINT "IN THE GALACTIC QUADRANT, '";G2$;"'.":GOTO 1500 +1490 PRINT "NOW ENTERING ";G2$;" QUADRANT . . ." 1500 PRINT:K3=INT(G(Q1,Q2)*.01):B3=INT(G(Q1,Q2)*.1)-10*K3 1540 S3=G(Q1,Q2)-100*K3-10*B3:IF K3=0 THEN 1590 -1560 PRINT"COMBAT AREA CONDITION RED":IF S>200 THEN 1590 -1580 PRINT" SHIELDS DANGEROUSLY LOW" +1560 PRINT "COMBAT AREA CONDITION RED":IF S>200 THEN 1590 +1580 PRINT " SHIELDS DANGEROUSLY LOW" 1590 FOR I=1 TO 3:K(I,1)=0:K(I,2)=0:NEXT I 1600 FOR I=1 TO 3:K(I,3)=0:NEXT I:Q$=Z$+Z$+Z$+Z$+Z$+Z$+Z$+LEFT$(Z$,17) 1660 REM POSITION ENTERPRISE IN QUADRANT, THEN PLACE "K3" KLINGONS, & @@ -84,40 +84,40 @@ 1910 FOR I=1 TO S3:GOSUB 8590:A$=" * ":Z1=R1:Z2=R2:GOSUB 8670:NEXT I 1980 GOSUB 6430 1990 IF S+E>10 THEN IF E>10 OR D(7)=0 THEN 2060 -2020 PRINT:PRINT"** FATAL ERROR ** YOU'VE JUST STRANDED YOUR SHIP IN " -2030 PRINT"SPACE":PRINT"YOU HAVE INSUFFICIENT MANEUVERING ENERGY,"; -2040 PRINT" AND SHIELD CONTROL":PRINT"IS PRESENTLY INCAPABLE OF CROSS"; -2050 PRINT"-CIRCUITING TO ENGINE ROOM!!":GOTO 6220 +2020 PRINT:PRINT "** FATAL ERROR ** YOU'VE JUST STRANDED YOUR SHIP IN " +2030 PRINT "SPACE":PRINT "YOU HAVE INSUFFICIENT MANEUVERING ENERGY,"; +2040 PRINT " AND SHIELD CONTROL":PRINT "IS PRESENTLY INCAPABLE OF CROSS"; +2050 PRINT "-CIRCUITING TO ENGINE ROOM!!":GOTO 6220 2060 INPUT"COMMAND";A$ 2080 FOR I=1 TO 9:IF LEFT$(A$,3)<>MID$(A1$,3*I-2,3) THEN 2160 2140 ONIGOTO 2300,1980,4000,4260,4700,5530,5690,7290,6270 -2160 NEXT I:PRINT"ENTER ONE OF THE FOLLOWING:" -2180 PRINT" NAV (TO SET COURSE)" -2190 PRINT" SRS (FOR SHORT RANGE SENSOR SCAN)" -2200 PRINT" LRS (FOR LONG RANGE SENSOR SCAN)" -2210 PRINT" PHA (TO FIRE PHASERS)" -2220 PRINT" TOR (TO FIRE PHOTON TORPEDOES)" -2230 PRINT" SHE (TO RAISE OR LOWER SHIELDS)" -2240 PRINT" DAM (FOR DAMAGE CONTROL REPORTS)" -2250 PRINT" COM (TO CALL ON LIBRARY-COMPUTER)" -2260 PRINT" XXX (TO RESIGN YOUR COMMAND)":PRINT:GOTO 1990 +2160 NEXT I:PRINT "ENTER ONE OF THE FOLLOWING:" +2180 PRINT " NAV (TO SET COURSE)" +2190 PRINT " SRS (FOR SHORT RANGE SENSOR SCAN)" +2200 PRINT " LRS (FOR LONG RANGE SENSOR SCAN)" +2210 PRINT " PHA (TO FIRE PHASERS)" +2220 PRINT " TOR (TO FIRE PHOTON TORPEDOES)" +2230 PRINT " SHE (TO RAISE OR LOWER SHIELDS)" +2240 PRINT " DAM (FOR DAMAGE CONTROL REPORTS)" +2250 PRINT " COM (TO CALL ON LIBRARY-COMPUTER)" +2260 PRINT " XXX (TO RESIGN YOUR COMMAND)":PRINT:GOTO 1990 2290 REM COURSE CONTROL BEGINS HERE 2300 INPUT"COURSE (0-9)";C1:IF C1=9 THEN C1=1 2310 IF C1>=1 AND C1<9 THEN 2350 -2330 PRINT" LT. SULU REPORTS, 'INCORRECT COURSE DATA, SIR!'":GOTO 1990 +2330 PRINT " LT. SULU REPORTS, 'INCORRECT COURSE DATA, SIR!'":GOTO 1990 2350 X$="8":IF D(1)<0 THEN X$="0.2" -2360 PRINT"WARP FACTOR (0-";X$;")";:INPUT W1:IF D(1)<0 AND W1>.2 THEN 2470 +2360 PRINT "WARP FACTOR (0-";X$;")";:INPUT W1:IF D(1)<0 AND W1>.2 THEN 2470 2380 IF W1>0 AND W1<=8 THEN 2490 2390 IF W1=0 THEN 1990 -2420 PRINT" CHIEF ENGINEER SCOTT REPORTS 'THE ENGINES WON'T TAKE"; -2430 PRINT" WARP ";W1;"!'":GOTO 1990 -2470 PRINT"WARP ENGINES ARE DAMAGED. MAXIUM SPEED = WARP 0.2":GOTO 1990 +2420 PRINT " CHIEF ENGINEER SCOTT REPORTS 'THE ENGINES WON'T TAKE"; +2430 PRINT " WARP ";W1;"!'":GOTO 1990 +2470 PRINT "WARP ENGINES ARE DAMAGED. MAXIUM SPEED = WARP 0.2":GOTO 1990 2490 N=INT(W1*8+.5):IF E-N>=0 THEN 2590 -2500 PRINT"ENGINEERING REPORTS 'INSUFFICIENT ENERGY AVAILABLE" -2510 PRINT" FOR MANEUVERING AT WARP";W1;"!'" +2500 PRINT "ENGINEERING REPORTS 'INSUFFICIENT ENERGY AVAILABLE" +2510 PRINT " FOR MANEUVERING AT WARP";W1;"!'" 2530 IF S=0 THEN 2880 2790 D(I)=D(I)+D6:IF D(I)>-.1 AND D(I)<0 THEN D(I)=-.1:GOTO 2880 2800 IF D(I)<0 THEN 2880 -2810 IF D1<>1 THEN D1=1:PRINT"DAMAGE CONTROL REPORT: "; -2840 PRINTTAB(8);:R1=I:GOSUB 8790:PRINT G2$;" REPAIR COMPLETED." +2810 IF D1<>1 THEN D1=1:PRINT "DAMAGE CONTROL REPORT: "; +2840 PRINT TAB(8);:R1=I:GOSUB 8790:PRINT G2$;" REPAIR COMPLETED." 2880 NEXT I:IF RND(1)>.2 THEN 3070 2910 R1=FNR(1):IF RND(1)>=.6 THEN 3000 -2930 D(R1)=D(R1)-(RND(1)*5+1):PRINT"DAMAGE CONTROL REPORT: "; -2960 GOSUB 8790:PRINTG2$;" DAMAGED":PRINT:GOTO 3070 -3000 D(R1)=D(R1)+RND(1)*3+1:PRINT"DAMAGE CONTROL REPORT: "; -3030 GOSUB 8790:PRINTG2$;" STATE OF REPAIR IMPROVED":PRINT +2930 D(R1)=D(R1)-(RND(1)*5+1):PRINT "DAMAGE CONTROL REPORT: "; +2960 GOSUB 8790:PRINT G2$;" DAMAGED":PRINT:GOTO 3070 +3000 D(R1)=D(R1)+RND(1)*3+1:PRINT "DAMAGE CONTROL REPORT: "; +3030 GOSUB 8790:PRINT G2$;" STATE OF REPAIR IMPROVED":PRINT 3060 REM BEGIN MOVING STARSHIP 3070 A$=" ":Z1=INT(S1):Z2=INT(S2):GOSUB 8670 3110 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1)):X=S1:Y=S2 3140 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):Q4=Q1:Q5=Q2 3170 FOR I=1 TO N:S1=S1+X1:S2=S2+X2:IF S1<1ORS1>=9 OR S2<1 OR S2>=9 THEN 3500 3240 S8=INT(S1)*24+INT(S2)*3-26:IF MID$(Q$,S8,2)=" " THEN 3360 -3320 S1=INT(S1-X1):S2=INT(S2-X2):PRINT"WARP ENGINES SHUT DOWN AT "; -3350 PRINT"SECTOR";S1;",";S2;"DUE TO BAD NAVAGATION":GOTO 3370 +3320 S1=INT(S1-X1):S2=INT(S2-X2):PRINT "WARP ENGINES SHUT DOWN AT "; +3350 PRINT "SECTOR";S1;",";S2;"DUE TO BAD NAVAGATION":GOTO 3370 3360 NEXT I:S1=INT(S1):S2=INT(S2) 3370 A$="<*>":Z1=INT(S1):Z2=INT(S2):GOSUB 8670:GOSUB 3910:T8=1 3430 IF W1<1 THEN T8=.1*INT(10*W1) @@ -158,201 +158,201 @@ 3710 IF Q2<1 THEN X5=1:Q2=1:S2=1 3750 IF Q2>8 THEN X5=1:Q2=8:S2=8 3790 IF X5=0 THEN 3860 -3800 PRINT"LT. UHURA REPORTS MESSAGE FROM STARFLEET COMMAND:" -3810 PRINT" 'PERMISSION TO ATTEMPT CROSSING OF GALACTIC PERIMETER" -3820 PRINT" IS HEREBY *DENIED*. SHUT DOWN YOUR ENGINES.'" -3830 PRINT"CHIEF ENGINEER SCOTT REPORTS 'WARP ENGINES SHUT DOWN" -3840 PRINT" AT SECTOR";S1;",";S2;"OF QUADRANT";Q1;",";Q2;".'" +3800 PRINT "LT. UHURA REPORTS MESSAGE FROM STARFLEET COMMAND:" +3810 PRINT " 'PERMISSION TO ATTEMPT CROSSING OF GALACTIC PERIMETER" +3820 PRINT " IS HEREBY *DENIED*. SHUT DOWN YOUR ENGINES.'" +3830 PRINT "CHIEF ENGINEER SCOTT REPORTS 'WARP ENGINES SHUT DOWN" +3840 PRINT " AT SECTOR";S1;",";S2;"OF QUADRANT";Q1;",";Q2;".'" 3850 IF T>T0+T9 THEN 6220 3860 IF 8*Q1+Q2=8*Q4+Q5 THEN 3370 3870 T=T+1:GOSUB 3910:GOTO 1320 3900 REM MANEUVER ENERGY S/R ** -3910 E=E-N-10:IF E>=0THEN RETURN -3930 PRINT"SHIELD CONTROL SUPPLIES ENERGY TO COMPLETE THE MANEUVER." +3910 E=E-N-10:IF E>=0 THEN RETURN +3930 PRINT "SHIELD CONTROL SUPPLIES ENERGY TO COMPLETE THE MANEUVER." 3940 S=S+E:E=0:IF S<=0 THEN S=0 3980 RETURN 3990 REM LONG RANGE SENSOR SCAN CODE -4000 IF D(3)<0 THEN PRINT"LONG RANGE SENSORS ARE INOPERABLE":GOTO 1990 -4030 PRINT"LONG RANGE SCAN FOR QUADRANT";Q1;",";Q2 +4000 IF D(3)<0 THEN PRINT "LONG RANGE SENSORS ARE INOPERABLE":GOTO 1990 +4030 PRINT "LONG RANGE SCAN FOR QUADRANT";Q1;",";Q2 4040 O1$="-------------------":PRINT O1$ 4060 FOR I=Q1-1TOQ1+1:N(1)=-1:N(2)=-2:N(3)=-3:FOR J=Q2-1TOQ2+1 -4120 IF I>0ANDI<9ANDJ>0ANDJ<9 THEN N(J-Q2+2)=G(I,J):Z(I,J)=G(I,J) -4180 NEXT J:FOR L=1TO3:PRINT": ";:IF N(L)<0 THEN PRINT"*** ";:GOTO 4230 -4210 PRINTRIGHT$(STR$(N(L)+1000),3);" "; -4230 NEXT L:PRINT":":PRINTO1$:NEXT I:GOTO 1990 +4120 IF I>0 AND I<9 AND J>0 AND J<9 THEN N(J-Q2+2)=G(I,J):Z(I,J)=G(I,J) +4180 NEXT J:FOR L=1 TO 3:PRINT ": ";:IF N(L)<0 THEN PRINT "*** ";:GOTO 4230 +4210 PRINT RIGHT$(STR$(N(L)+1000),3);" "; +4230 NEXT L:PRINT ":":PRINT O1$:NEXT I:GOTO 1990 4250 REM PHASER CONTROL CODE BEGINS HERE -4260 IF D(4)<0 THEN PRINT"PHASERS INOPERATIVE":GOTO 1990 +4260 IF D(4)<0 THEN PRINT "PHASERS INOPERATIVE":GOTO 1990 4265 IF K3>0 THEN 4330 -4270 PRINT"SCIENCE OFFICER SPOCK REPORTS 'SENSORS SHOW NO ENEMY SHIPS" -4280 PRINT" IN THIS QUADRANT'":GOTO 1990 -4330 IF D(8)<0 THEN PRINT"COMPUTER FAILURE HAMPERS ACCURACY" -4350 PRINT"PHASERS LOCKED ON TARGET; "; -4360 PRINT"ENERGY AVAILABLE =";E;"UNITS" +4270 PRINT "SCIENCE OFFICER SPOCK REPORTS 'SENSORS SHOW NO ENEMY SHIPS" +4280 PRINT " IN THIS QUADRANT'":GOTO 1990 +4330 IF D(8)<0 THEN PRINT "COMPUTER FAILURE HAMPERS ACCURACY" +4350 PRINT "PHASERS LOCKED ON TARGET; "; +4360 PRINT "ENERGY AVAILABLE =";E;"UNITS" 4370 INPUT"NUMBER OF UNITS TO FIRE";X:IF X<=0 THEN 1990 4400 IF E-X<0 THEN 4360 4410 E=E-X:IF D(7)<0 THEN X=X*RND(1) 4450 H1=INT(X/K3):FOR I=1TO3:IF K(I,3)<=0 THEN 4670 4480 H=INT((H1/FND(0))*(RND(1)+2)):IF H>.15*K(I,3) THEN 4530 -4500 PRINT"SENSORS SHOW NO DAMAGE TO ENEMY AT ";K(I,1);",";K(I,2):GOTO 4670 -4530 K(I,3)=K(I,3)-H:PRINTH;"UNIT HIT ON KLINGON AT SECTOR";K(I,1);","; -4550 PRINTK(I,2):IF K(I,3)<=0 THEN PRINT"*** KLINGON DESTROYED ***":GOTO 4580 -4560 PRINT" (SENSORS SHOW";K(I,3);"UNITS REMAINING)":GOTO 4670 +4500 PRINT "SENSORS SHOW NO DAMAGE TO ENEMY AT ";K(I,1);",";K(I,2):GOTO 4670 +4530 K(I,3)=K(I,3)-H:PRINT H;"UNIT HIT ON KLINGON AT SECTOR";K(I,1);","; +4550 PRINT K(I,2):IF K(I,3)<=0 THEN PRINT "*** KLINGON DESTROYED ***":GOTO 4580 +4560 PRINT " (SENSORS SHOW";K(I,3);"UNITS REMAINING)":GOTO 4670 4580 K3=K3-1:K9=K9-1:Z1=K(I,1):Z2=K(I,2):A$=" ":GOSUB 8670 4650 K(I,3)=0:G(Q1,Q2)=G(Q1,Q2)-100:Z(Q1,Q2)=G(Q1,Q2):IF K9<=0 THEN 6370 4670 NEXT I:GOSUB 6000:GOTO 1990 4690 REM PHOTON TORPEDO CODE BEGINS HERE -4700 IF P<=0 THEN PRINT"ALL PHOTON TORPEDOES EXPENDED":GOTO 1990 -4730 IF D(5)<0 THEN PRINT"PHOTON TUBES ARE NOT OPERATIONAL":GOTO 1990 +4700 IF P<=0 THEN PRINT "ALL PHOTON TORPEDOES EXPENDED":GOTO 1990 +4730 IF D(5)<0 THEN PRINT "PHOTON TUBES ARE NOT OPERATIONAL":GOTO 1990 4760 INPUT"PHOTON TORPEDO COURSE (1-9)";C1:IF C1=9 THEN C1=1 4780 IF C1>=1ANDC1<9 THEN 4850 -4790 PRINT"ENSIGN CHEKOV REPORTS, 'INCORRECT COURSE DATA, SIR!'" +4790 PRINT "ENSIGN CHEKOV REPORTS, 'INCORRECT COURSE DATA, SIR!'" 4800 GOTO 1990 4850 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1)):E=E-2:P=P-1 4860 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):X=S1:Y=S2 -4910 PRINT"TORPEDO TRACK:" +4910 PRINT "TORPEDO TRACK:" 4920 X=X+X1:Y=Y+X2:X3=INT(X+.5):Y3=INT(Y+.5) 4960 IF X3<1ORX3>8ORY3<1ORY3>8 THEN 5490 -5000 PRINT" ";X3;",";Y3:A$=" ":Z1=X:Z2=Y:GOSUB 8830 +5000 PRINT " ";X3;",";Y3:A$=" ":Z1=X:Z2=Y:GOSUB 8830 5050 IF Z3<>0 THEN 4920 5060 A$="+K+":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 5210 -5110 PRINT"*** KLINGON DESTROYED ***":K3=K3-1:K9=K9-1:IF K9<=0 THEN 6370 -5150 FOR I=1TO3:IF X3=K(I,1)ANDY3=K(I,2) THEN 5190 +5110 PRINT "*** KLINGON DESTROYED ***":K3=K3-1:K9=K9-1:IF K9<=0 THEN 6370 +5150 FOR I=1TO3:IF X3=K(I,1) AND Y3=K(I,2) THEN 5190 5180 NEXT I:I=3 5190 K(I,3)=0:GOTO 5430 5210 A$=" * ":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 5280 -5260 PRINT"STAR AT";X3;",";Y3;"ABSORBED TORPEDO ENERGY.":GOSUB 6000:GOTO 1990 +5260 PRINT "STAR AT";X3;",";Y3;"ABSORBED TORPEDO ENERGY.":GOSUB 6000:GOTO 1990 5280 A$=">!<":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 4760 -5330 PRINT"*** STARBASE DESTROYED ***":B3=B3-1:B9=B9-1 +5330 PRINT "*** STARBASE DESTROYED ***":B3=B3-1:B9=B9-1 5360 IF B9>0ORK9>T-T0-T9 THEN 5400 -5370 PRINT"THAT DOES IT, CAPTAIN!! YOU ARE HEREBY RELIEVED OF COMMAND" -5380 PRINT"AND SENTENCED TO 99 STARDATES AT HARD LABOR ON CYGNUS 12!!" +5370 PRINT "THAT DOES IT, CAPTAIN!! YOU ARE HEREBY RELIEVED OF COMMAND" +5380 PRINT "AND SENTENCED TO 99 STARDATES AT HARD LABOR ON CYGNUS 12!!" 5390 GOTO 6270 -5400 PRINT"STARFLEET COMMAND REVIEWING YOUR RECORD TO CONSIDER" -5410 PRINT"COURT MARTIAL!":D0=0 +5400 PRINT "STARFLEET COMMAND REVIEWING YOUR RECORD TO CONSIDER" +5410 PRINT "COURT MARTIAL!":D0=0 5430 Z1=X:Z2=Y:A$=" ":GOSUB 8670 5470 G(Q1,Q2)=K3*100+B3*10+S3:Z(Q1,Q2)=G(Q1,Q2):GOSUB 6000:GOTO 1990 -5490 PRINT"TORPEDO MISSED":GOSUB 6000:GOTO 1990 +5490 PRINT "TORPEDO MISSED":GOSUB 6000:GOTO 1990 5520 REM SHIELD CONTROL -5530 IF D(7)<0 THEN PRINT"SHIELD CONTROL INOPERABLE":GOTO 1990 -5560 PRINT"ENERGY AVAILABLE =";E+S;:INPUT"NUMBER OF UNITS TO SHIELDS";X -5580 IF X<0ORS=X THEN PRINT"":GOTO 1990 +5530 IF D(7)<0 THEN PRINT "SHIELD CONTROL INOPERABLE":GOTO 1990 +5560 PRINT "ENERGY AVAILABLE =";E+S;:INPUT"NUMBER OF UNITS TO SHIELDS";X +5580 IF X<0ORS=X THEN PRINT "":GOTO 1990 5590 IF X<=E+S THEN 5630 -5600 PRINT"SHIELD CONTROL REPORTS 'THIS IS NOT THE FEDERATION TREASURY.'" -5610 PRINT"":GOTO 1990 -5630 E=E+S-X:S=X:PRINT"DEFLECTOR CONTROL ROOM REPORT:" -5660 PRINT" 'SHIELDS NOW AT";INT(S);"UNITS PER YOUR COMMAND.'":GOTO 1990 +5600 PRINT "SHIELD CONTROL REPORTS 'THIS IS NOT THE FEDERATION TREASURY.'" +5610 PRINT "":GOTO 1990 +5630 E=E+S-X:S=X:PRINT "DEFLECTOR CONTROL ROOM REPORT:" +5660 PRINT " 'SHIELDS NOW AT";INT(S);"UNITS PER YOUR COMMAND.'":GOTO 1990 5680 REM DAMAGE CONTROL 5690 IF D(6)>=0 THEN 5910 -5700 PRINT"DAMAGE CONTROL REPORT NOT AVAILABLE":IF D0=0 THEN 1990 +5700 PRINT "DAMAGE CONTROL REPORT NOT AVAILABLE":IF D0=0 THEN 1990 5720 D3=0:FOR I=1TO8:IF D(I)<0 THEN D3=D3+.1 5760 NEXT I:IF D3=0 THEN 1990 5780 PRINT:D3=D3+D4:IF D3>=1 THEN D3=.9 -5810 PRINT"TECHNICIANS STANDING BY TO EFFECT REPAIRS TO YOUR SHIP;" -5820 PRINT"ESTIMATED TIME TO REPAIR:";.01*INT(100*D3);"STARDATES" +5810 PRINT "TECHNICIANS STANDING BY TO EFFECT REPAIRS TO YOUR SHIP;" +5820 PRINT "ESTIMATED TIME TO REPAIR:";.01*INT(100*D3);"STARDATES" 5840 INPUT "WILL YOU AUTHORIZE THE REPAIR ORDER (Y/N)";A$ -5860 IF A$<>"Y"THEN 1990 +5860 IF A$<>"Y" THEN 1990 5870 FOR I=1TO8:IF D(I)<0 THEN D(I)=0 5890 NEXT I:T=T+D3+.1 -5910 PRINT:PRINT"DEVICE STATE OF REPAIR":FOR R1=1TO8 -5920 GOSUB 8790:PRINTG2$;LEFT$(Z$,25-LEN(G2$));INT(D(R1)*100)*.01 +5910 PRINT:PRINT "DEVICE STATE OF REPAIR":FOR R1=1TO8 +5920 GOSUB 8790:PRINT G2$;LEFT$(Z$,25-LEN(G2$));INT(D(R1)*100)*.01 5950 NEXT R1:PRINT:IF D0<>0 THEN 5720 5980 GOTO 1990 5990 REM KLINGONS SHOOTING -6000 IF K3<=0THEN RETURN -6010 IF D0<>0 THEN PRINT"STARBASE SHIELDS PROTECT THE ENTERPRISE":RETURN +6000 IF K3<=0 THEN RETURN +6010 IF D0<>0 THEN PRINT "STARBASE SHIELDS PROTECT THE ENTERPRISE":RETURN 6040 FOR I=1TO3:IF K(I,3)<=0 THEN 6200 6060 H=INT((K(I,3)/FND(1))*(2+RND(1))):S=S-H:K(I,3)=K(I,3)/(3+RND(0)) -6080 PRINTH;"UNIT HIT ON ENTERPRISE FROM SECTOR";K(I,1);",";K(I,2) +6080 PRINT H;"UNIT HIT ON ENTERPRISE FROM SECTOR";K(I,1);",";K(I,2) 6090 IF S<=0 THEN 6240 -6100 PRINT" ":IF H<20 THEN 6200 +6100 PRINT " ":IF H<20 THEN 6200 6120 IF RND(1)>.6ORH/S<=.02 THEN 6200 6140 R1=FNR(1):D(R1)=D(R1)-H/S-.5*RND(1):GOSUB 8790 -6170 PRINT"DAMAGE CONTROL REPORTS ";G2$;" DAMAGED BY THE HIT'" +6170 PRINT "DAMAGE CONTROL REPORTS ";G2$;" DAMAGED BY THE HIT'" 6200 NEXT I:RETURN 6210 REM END OF GAME -6220 PRINT"IT IS STARDATE";T:GOTO 6270 -6240 PRINT:PRINT"THE ENTERPRISE HAS BEEN DESTROYED. THEN FEDERATION "; -6250 PRINT"WILL BE CONQUERED":GOTO 6220 -6270 PRINT"THERE WERE";K9;"KLINGON BATTLE CRUISERS LEFT AT" -6280 PRINT"THE END OF YOUR MISSION." +6220 PRINT "IT IS STARDATE";T:GOTO 6270 +6240 PRINT:PRINT "THE ENTERPRISE HAS BEEN DESTROYED. THEN FEDERATION "; +6250 PRINT "WILL BE CONQUERED":GOTO 6220 +6270 PRINT "THERE WERE";K9;"KLINGON BATTLE CRUISERS LEFT AT" +6280 PRINT "THE END OF YOUR MISSION." 6290 PRINT:PRINT:IF B9=0 THEN 6360 -6310 PRINT"THE FEDERATION IS IN NEED OF A NEW STARSHIP COMMANDER" -6320 PRINT"FOR A SIMILAR MISSION -- IF THERE IS A VOLUNTEER," +6310 PRINT "THE FEDERATION IS IN NEED OF A NEW STARSHIP COMMANDER" +6320 PRINT "FOR A SIMILAR MISSION -- IF THERE IS A VOLUNTEER," 6330 INPUT"LET HIM STEP FORWARD AND ENTER 'AYE'";A$:IF A$="AYE" THEN 10 6360 END -6370 PRINT"CONGRULATION, CAPTAIN! THEN LAST KLINGON BATTLE CRUISER" -6380 PRINT"MENACING THE FDERATION HAS BEEN DESTROYED.":PRINT -6400 PRINT"YOUR EFFICIENCY RATING IS";1000*(K7/(T-T0))^2:GOTO 6290 +6370 PRINT "CONGRULATION, CAPTAIN! THEN LAST KLINGON BATTLE CRUISER" +6380 PRINT "MENACING THE FDERATION HAS BEEN DESTROYED.":PRINT +6400 PRINT "YOUR EFFICIENCY RATING IS";1000*(K7/(T-T0))^2:GOTO 6290 6420 REM SHORT RANGE SENSOR SCAN & STARTUP SUBROUTINE 6430 FOR I=S1-1TOS1+1:FOR J=S2-1 TO S2+1 6450 IF INT(I+.5)<1ORINT(I+.5)>8ORINT(J+.5)<1ORINT(J+.5)>8 THEN 6540 6490 A$=">!<":Z1=I:Z2=J:GOSUB 8830:IF Z3=1 THEN 6580 6540 NEXT J:NEXT I:D0=0:GOTO 6650 6580 D0=1:C$="DOCKED":E=E0:P=P0 -6620 PRINT"SHIELDS DROPPED FOR DOCKING PURPOSES":S=0:GOTO 6720 +6620 PRINT "SHIELDS DROPPED FOR DOCKING PURPOSES":S=0:GOTO 6720 6650 IF K3>0 THEN C$="*RED*":GOTO 6720 6660 C$="GREEN":IF E=0 THEN 6770 -6730 PRINT:PRINT"*** SHORT RANGE SENSORS ARE OUT ***":PRINT:RETURN -6770 O1$="---------------------------------":PRINTO1$:FOR I=1 TO 8 -6820 FOR J=(I-1)*24+1 TO (I-1)*24+22STEP3:PRINT" ";MID$(Q$,J,3);:NEXT J +6730 PRINT:PRINT "*** SHORT RANGE SENSORS ARE OUT ***":PRINT:RETURN +6770 O1$="---------------------------------":PRINT O1$:FOR I=1 TO 8 +6820 FOR J=(I-1)*24+1 TO (I-1)*24+22STEP3:PRINT " ";MID$(Q$,J,3);:NEXT J 6830 ONIGOTO 6850,6900,6960,7020,7070,7120,7180,7240 -6850 PRINT" STARDATE ";INT(T*10)*.1:GOTO 7260 -6900 PRINT" CONDITION ";C$:GOTO 7260 -6960 PRINT" QUADRANT ";Q1;",";Q2:GOTO 7260 -7020 PRINT" SECTOR ";S1;",";S2:GOTO 7260 -7070 PRINT" PHOTON TORPEDOES ";INT(P):GOTO 7260 -7120 PRINT" TOTAL ENERGY ";INT(E+S):GOTO 7260 -7180 PRINT" SHIELDS ";INT(S):GOTO 7260 -7240 PRINT" KLINGONS REMAINING";INT(K9) +6850 PRINT " STARDATE ";INT(T*10)*.1:GOTO 7260 +6900 PRINT " CONDITION ";C$:GOTO 7260 +6960 PRINT " QUADRANT ";Q1;",";Q2:GOTO 7260 +7020 PRINT " SECTOR ";S1;",";S2:GOTO 7260 +7070 PRINT " PHOTON TORPEDOES ";INT(P):GOTO 7260 +7120 PRINT " TOTAL ENERGY ";INT(E+S):GOTO 7260 +7180 PRINT " SHIELDS ";INT(S):GOTO 7260 +7240 PRINT " KLINGONS REMAINING";INT(K9) 7260 NEXT I:PRINT O1$:RETURN 7280 REM LIBRARY COMPUTER CODE -7290 IF D(8)<0 THEN PRINT"COMPUTER DISABLED":GOTO 1990 +7290 IF D(8)<0 THEN PRINT "COMPUTER DISABLED":GOTO 1990 7320 INPUT"COMPUTER ACTIVE AND AWAITING COMMAND";A:IF A<0 THEN 1990 7350 PRINT:H8=1:ONA+1GOTO 7540,7900,8070,8500,8150,7400 -7360 PRINT"FUNCTIONS AVAILABLE FROM LIBRARY-COMPUTER:" -7370 PRINT" 0 = CUMULATIVE GALACTIC RECORD" -7372 PRINT" 1 = STATUS REPORT" -7374 PRINT" 2 = PHOTON TORPEDO DATA" -7376 PRINT" 3 = STARBASE NAV DATA" -7378 PRINT" 4 = DIRECTION/DISTANCE CALCULATOR" -7380 PRINT" 5 = GALAXY 'REGION NAME' MAP":PRINT:GOTO 7320 +7360 PRINT "FUNCTIONS AVAILABLE FROM LIBRARY-COMPUTER:" +7370 PRINT " 0 = CUMULATIVE GALACTIC RECORD" +7372 PRINT " 1 = STATUS REPORT" +7374 PRINT " 2 = PHOTON TORPEDO DATA" +7376 PRINT " 3 = STARBASE NAV DATA" +7378 PRINT " 4 = DIRECTION/DISTANCE CALCULATOR" +7380 PRINT " 5 = GALAXY 'REGION NAME' MAP":PRINT:GOTO 7320 7390 REM SETUP TO CHANGE CUM GAL RECORD TO GALAXY MAP -7400 H8=0:G5=1:PRINT" THE GALAXY":GOTO 7550 +7400 H8=0:G5=1:PRINT " THE GALAXY":GOTO 7550 7530 REM CUM GALACTIC RECORD 7540 REM INPUT"DO YOU WANT A HARDCOPY? IS THE TTY ON (Y/N)";A$ 7542 REM IF A$="Y" THEN POKE1229,2:POKE1237,3:NULL1 -7543 PRINT:PRINT" "; -7544 PRINT"COMPUTER RECORD OF GALAXY FOR QUADRANT";Q1;",";Q2 +7543 PRINT:PRINT " "; +7544 PRINT "COMPUTER RECORD OF GALAXY FOR QUADRANT";Q1;",";Q2 7546 PRINT -7550 PRINT" 1 2 3 4 5 6 7 8" +7550 PRINT " 1 2 3 4 5 6 7 8" 7560 O1$=" ----- ----- ----- ----- ----- ----- ----- -----" -7570 PRINT O1$:FOR I=1 TO 8:PRINTI;:IF H8=0 THEN 7740 -7630 FOR J=1 TO 8:PRINT" ";:IF Z(I,J)=0 THEN PRINT"***";:GOTO 7720 -7700 PRINTRIGHT$(STR$(Z(I,J)+1000),3); +7570 PRINT O1$:FOR I=1 TO 8:PRINT I;:IF H8=0 THEN 7740 +7630 FOR J=1 TO 8:PRINT " ";:IF Z(I,J)=0 THEN PRINT "***";:GOTO 7720 +7700 PRINT RIGHT$(STR$(Z(I,J)+1000),3); 7720 NEXT J:GOTO 7850 -7740 Z4=I:Z5=1:GOSUB 9030:J0=INT(15-.5*LEN(G2$)):PRINTTAB(J0);G2$; -7800 Z5=5:GOSUB 9030:J0=INT(39-.5*LEN(G2$)):PRINTTAB(J0);G2$; +7740 Z4=I:Z5=1:GOSUB 9030:J0=INT(15-.5*LEN(G2$)):PRINT TAB(J0);G2$; +7800 Z5=5:GOSUB 9030:J0=INT(39-.5*LEN(G2$)):PRINT TAB(J0);G2$; 7850 PRINT:PRINT O1$:NEXT I:PRINT:GOTO 1990 7890 REM STATUS REPORT 7900 PRINT " STATUS REPORT:":X$="":IF K9>1 THEN X$="S" -7940 PRINT"KLINGON";X$;" LEFT: ";K9 -7960 PRINT"MISSION MUST BE COMPLETED IN";.1*INT((T0+T9-T)*10);"STARDATES" +7940 PRINT "KLINGON";X$;" LEFT: ";K9 +7960 PRINT "MISSION MUST BE COMPLETED IN";.1*INT((T0+T9-T)*10);"STARDATES" 7970 X$="S":IF B9<2 THEN X$="":IF B9<1 THEN 8010 -7980 PRINT"THE FEDERATION IS MAINTAINING";B9;"STARBASE";X$;" IN THE GALAXY" +7980 PRINT "THE FEDERATION IS MAINTAINING";B9;"STARBASE";X$;" IN THE GALAXY" 7990 GOTO 5690 -8010 PRINT"YOUR STUPIDITY HAS LEFT YOU ON YOUR ON IN" -8020 PRINT" THE GALAXY -- YOU HAVE NO STARBASES LEFT!":GOTO 5690 +8010 PRINT "YOUR STUPIDITY HAS LEFT YOU ON YOUR ON IN" +8020 PRINT " THE GALAXY -- YOU HAVE NO STARBASES LEFT!":GOTO 5690 8060 REM TORPEDO, BASE NAV, D/D CALCULATOR 8070 IF K3<=0 THEN 4270 8080 X$="":IF K3>1 THEN X$="S" -8090 PRINT"FROM ENTERPRISE TO KLINGON BATTLE CRUSER";X$ +8090 PRINT "FROM ENTERPRISE TO KLINGON BATTLE CRUSER";X$ 8100 H8=0:FOR I=1 TO 3:IF K(I,3)<=0 THEN 8480 8110 W1=K(I,1):X=K(I,2) 8120 C1=S1:A=S2:GOTO 8220 -8150 PRINT"DIRECTION/DISTANCE CALCULATOR:" -8160 PRINT"YOU ARE AT QUADRANT ";Q1;",";Q2;" SECTOR ";S1;",";S2 -8170 PRINT"PLEASE ENTER":INPUT" INITIAL COORDINATES (X,Y)";C1,A +8150 PRINT "DIRECTION/DISTANCE CALCULATOR:" +8160 PRINT "YOU ARE AT QUADRANT ";Q1;",";Q2;" SECTOR ";S1;",";S2 +8170 PRINT "PLEASE ENTER":INPUT" INITIAL COORDINATES (X,Y)";C1,A 8200 INPUT" FINAL COORDINATES (X,Y)";W1,X 8220 X=X-A:A=C1-W1:IF X<0 THEN 8350 8250 IF A<0 THEN 8410 @@ -360,25 +360,25 @@ 8270 IF A=0 THEN C1=5:GOTO 8290 8280 C1=1 8290 IF ABS(A)<=ABS(X) THEN 8330 -8310 PRINT"DIRECTION =";C1+(((ABS(A)-ABS(X))+ABS(A))/ABS(A)):GOTO 8460 -8330 PRINT"DIRECTION =";C1+(ABS(A)/ABS(X)):GOTO 8460 +8310 PRINT "DIRECTION =";C1+(((ABS(A)-ABS(X))+ABS(A))/ABS(A)):GOTO 8460 +8330 PRINT "DIRECTION =";C1+(ABS(A)/ABS(X)):GOTO 8460 8350 IF A>0 THEN C1=3:GOTO 8420 8360 IF X<>0 THEN C1=5:GOTO 8290 8410 C1=7 8420 IF ABS(A)>=ABS(X) THEN 8450 -8430 PRINT"DIRECTION =";C1+(((ABS(X)-ABS(A))+ABS(X))/ABS(X)):GOTO 8460 -8450 PRINT"DIRECTION =";C1+(ABS(X)/ABS(A)) -8460 PRINT"DISTANCE =";SQR(X^2+A^2):IF H8=1 THEN 1990 +8430 PRINT "DIRECTION =";C1+(((ABS(X)-ABS(A))+ABS(X))/ABS(X)):GOTO 8460 +8450 PRINT "DIRECTION =";C1+(ABS(X)/ABS(A)) +8460 PRINT "DISTANCE =";SQR(X^2+A^2):IF H8=1 THEN 1990 8480 NEXT I:GOTO 1990 -8500 IF B3<>0 THEN PRINT"FROM ENTERPRISE TO STARBASE:":W1=B4:X=B5:GOTO 8120 -8510 PRINT"MR. SPOCK REPORTS, 'SENSORS SHOW NO STARBASES IN THIS"; -8520 PRINT" QUADRANT.'":GOTO 1990 +8500 IF B3<>0 THEN PRINT "FROM ENTERPRISE TO STARBASE:":W1=B4:X=B5:GOTO 8120 +8510 PRINT "MR. SPOCK REPORTS, 'SENSORS SHOW NO STARBASES IN THIS"; +8520 PRINT " QUADRANT.'":GOTO 1990 8580 REM FIND EMPTY PLACE IN QUADRANT (FOR THINGS) 8590 R1=FNR(1):R2=FNR(1):A$=" ":Z1=R1:Z2=R2:GOSUB 8830:IF Z3=0 THEN 8590 8600 RETURN 8660 REM INSERT IN STRING ARRAY FOR QUADRANT 8670 S8=INT(Z2-.5)*3+INT(Z1-.5)*24+1 -8675 IF LEN(A$)<>3THEN PRINT"ERROR":STOP +8675 IF LEN(A$)<>3 THEN PRINT "ERROR":STOP 8680 IF S8=1 THEN Q$=A$+RIGHT$(Q$,189):RETURN 8690 IF S8=190 THEN Q$=LEFT$(Q$,189)+A$:RETURN 8700 Q$=LEFT$(Q$,S8-1)+A$+RIGHT$(Q$,190-S8):RETURN From 936b710e5552a92b047986e2fb29958d8cc05f0e Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sun, 16 Jan 2022 18:51:00 +0000 Subject: [PATCH 26/82] Clean up ON --- 84_Super_Star_Trek/superstartrek.bas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/84_Super_Star_Trek/superstartrek.bas b/84_Super_Star_Trek/superstartrek.bas index cddc6dd8..53892159 100644 --- a/84_Super_Star_Trek/superstartrek.bas +++ b/84_Super_Star_Trek/superstartrek.bas @@ -90,7 +90,7 @@ 2050 PRINT "-CIRCUITING TO ENGINE ROOM!!":GOTO 6220 2060 INPUT"COMMAND";A$ 2080 FOR I=1 TO 9:IF LEFT$(A$,3)<>MID$(A1$,3*I-2,3) THEN 2160 -2140 ONIGOTO 2300,1980,4000,4260,4700,5530,5690,7290,6270 +2140 ON I GOTO 2300,1980,4000,4260,4700,5530,5690,7290,6270 2160 NEXT I:PRINT "ENTER ONE OF THE FOLLOWING:" 2180 PRINT " NAV (TO SET COURSE)" 2190 PRINT " SRS (FOR SHORT RANGE SENSOR SCAN)" @@ -296,7 +296,7 @@ 6730 PRINT:PRINT "*** SHORT RANGE SENSORS ARE OUT ***":PRINT:RETURN 6770 O1$="---------------------------------":PRINT O1$:FOR I=1 TO 8 6820 FOR J=(I-1)*24+1 TO (I-1)*24+22STEP3:PRINT " ";MID$(Q$,J,3);:NEXT J -6830 ONIGOTO 6850,6900,6960,7020,7070,7120,7180,7240 +6830 ON I GOTO 6850,6900,6960,7020,7070,7120,7180,7240 6850 PRINT " STARDATE ";INT(T*10)*.1:GOTO 7260 6900 PRINT " CONDITION ";C$:GOTO 7260 6960 PRINT " QUADRANT ";Q1;",";Q2:GOTO 7260 @@ -309,7 +309,7 @@ 7280 REM LIBRARY COMPUTER CODE 7290 IF D(8)<0 THEN PRINT "COMPUTER DISABLED":GOTO 1990 7320 INPUT"COMPUTER ACTIVE AND AWAITING COMMAND";A:IF A<0 THEN 1990 -7350 PRINT:H8=1:ONA+1GOTO 7540,7900,8070,8500,8150,7400 +7350 PRINT:H8=1:ON A+1 GOTO 7540,7900,8070,8500,8150,7400 7360 PRINT "FUNCTIONS AVAILABLE FROM LIBRARY-COMPUTER:" 7370 PRINT " 0 = CUMULATIVE GALACTIC RECORD" 7372 PRINT " 1 = STATUS REPORT" From c23233f918147023b38eea2576496b13c1adb23b Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sun, 16 Jan 2022 18:53:55 +0000 Subject: [PATCH 27/82] Fix some ORs --- 84_Super_Star_Trek/superstartrek.bas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/84_Super_Star_Trek/superstartrek.bas b/84_Super_Star_Trek/superstartrek.bas index 53892159..084f0919 100644 --- a/84_Super_Star_Trek/superstartrek.bas +++ b/84_Super_Star_Trek/superstartrek.bas @@ -139,7 +139,7 @@ 3070 A$=" ":Z1=INT(S1):Z2=INT(S2):GOSUB 8670 3110 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1)):X=S1:Y=S2 3140 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):Q4=Q1:Q5=Q2 -3170 FOR I=1 TO N:S1=S1+X1:S2=S2+X2:IF S1<1ORS1>=9 OR S2<1 OR S2>=9 THEN 3500 +3170 FOR I=1 TO N:S1=S1+X1:S2=S2+X2:IF S1<1 OR S1>=9 OR S2<1 OR S2>=9 THEN 3500 3240 S8=INT(S1)*24+INT(S2)*3-26:IF MID$(Q$,S8,2)=" " THEN 3360 3320 S1=INT(S1-X1):S2=INT(S2-X2):PRINT "WARP ENGINES SHUT DOWN AT "; 3350 PRINT "SECTOR";S1;",";S2;"DUE TO BAD NAVAGATION":GOTO 3370 @@ -211,7 +211,7 @@ 4860 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):X=S1:Y=S2 4910 PRINT "TORPEDO TRACK:" 4920 X=X+X1:Y=Y+X2:X3=INT(X+.5):Y3=INT(Y+.5) -4960 IF X3<1ORX3>8ORY3<1ORY3>8 THEN 5490 +4960 IF X3<1 OR X3>8 OR Y3<1 OR Y3>8 THEN 5490 5000 PRINT " ";X3;",";Y3:A$=" ":Z1=X:Z2=Y:GOSUB 8830 5050 IF Z3<>0 THEN 4920 5060 A$="+K+":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 5210 @@ -223,7 +223,7 @@ 5260 PRINT "STAR AT";X3;",";Y3;"ABSORBED TORPEDO ENERGY.":GOSUB 6000:GOTO 1990 5280 A$=">!<":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 4760 5330 PRINT "*** STARBASE DESTROYED ***":B3=B3-1:B9=B9-1 -5360 IF B9>0ORK9>T-T0-T9 THEN 5400 +5360 IF B9>0 OR K9>T-T0-T9 THEN 5400 5370 PRINT "THAT DOES IT, CAPTAIN!! YOU ARE HEREBY RELIEVED OF COMMAND" 5380 PRINT "AND SENTENCED TO 99 STARDATES AT HARD LABOR ON CYGNUS 12!!" 5390 GOTO 6270 @@ -235,7 +235,7 @@ 5520 REM SHIELD CONTROL 5530 IF D(7)<0 THEN PRINT "SHIELD CONTROL INOPERABLE":GOTO 1990 5560 PRINT "ENERGY AVAILABLE =";E+S;:INPUT"NUMBER OF UNITS TO SHIELDS";X -5580 IF X<0ORS=X THEN PRINT "":GOTO 1990 +5580 IF X<0 OR S=X THEN PRINT "":GOTO 1990 5590 IF X<=E+S THEN 5630 5600 PRINT "SHIELD CONTROL REPORTS 'THIS IS NOT THE FEDERATION TREASURY.'" 5610 PRINT "":GOTO 1990 @@ -265,7 +265,7 @@ 6080 PRINT H;"UNIT HIT ON ENTERPRISE FROM SECTOR";K(I,1);",";K(I,2) 6090 IF S<=0 THEN 6240 6100 PRINT " ":IF H<20 THEN 6200 -6120 IF RND(1)>.6ORH/S<=.02 THEN 6200 +6120 IF RND(1)>.6 OR H/S<=.02 THEN 6200 6140 R1=FNR(1):D(R1)=D(R1)-H/S-.5*RND(1):GOSUB 8790 6170 PRINT "DAMAGE CONTROL REPORTS ";G2$;" DAMAGED BY THE HIT'" 6200 NEXT I:RETURN @@ -285,7 +285,7 @@ 6400 PRINT "YOUR EFFICIENCY RATING IS";1000*(K7/(T-T0))^2:GOTO 6290 6420 REM SHORT RANGE SENSOR SCAN & STARTUP SUBROUTINE 6430 FOR I=S1-1TOS1+1:FOR J=S2-1 TO S2+1 -6450 IF INT(I+.5)<1ORINT(I+.5)>8ORINT(J+.5)<1ORINT(J+.5)>8 THEN 6540 +6450 IF INT(I+.5)<1 OR INT(I+.5)>8 OR INT(J+.5)<1 OR INT(J+.5)>8 THEN 6540 6490 A$=">!<":Z1=I:Z2=J:GOSUB 8830:IF Z3=1 THEN 6580 6540 NEXT J:NEXT I:D0=0:GOTO 6650 6580 D0=1:C$="DOCKED":E=E0:P=P0 From aba00e33ed5c1d722595ae5fdd32119c49bd7ee0 Mon Sep 17 00:00:00 2001 From: Andrew Regan Date: Sun, 16 Jan 2022 19:06:45 +0000 Subject: [PATCH 28/82] Update superstartrek.bas --- 84_Super_Star_Trek/superstartrek.bas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/84_Super_Star_Trek/superstartrek.bas b/84_Super_Star_Trek/superstartrek.bas index 084f0919..efd74cb0 100644 --- a/84_Super_Star_Trek/superstartrek.bas +++ b/84_Super_Star_Trek/superstartrek.bas @@ -18,7 +18,7 @@ 190 REM *** LINE NUMBERS FROM VERSION STREK7 OF 1/12/75 PRESERVED AS 200 REM *** MUCH AS POSSIBLE WHILE USING MULTIPLE STATEMENTS PER LINE 205 REM *** SOME LINES ARE LONGER THAN 72 CHARACTERS; THIS WAS DONE -210 REM *** BY USING "?" INSTEAD OF "PRINT " WHEN ENTERING LINES +210 REM *** BY USING "?" INSTEAD OF "PRINT" WHEN ENTERING LINES 215 REM *** 220 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT 221 PRINT " ,------*------," From ce671cc8d9ab5c165a7c8f8eb675b221978dadf1 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 00:03:14 +0200 Subject: [PATCH 29/82] Check that .NET ports have at least one executable project; and some project properties --- .../DotnetUtils/DotnetUtils/Functions.cs | 21 ++++++ .../DotnetUtils/DotnetUtils/Methods.cs | 32 +++++++++ .../DotnetUtils/DotnetUtils/Program.cs | 72 +++++++++++++++++-- 3 files changed, 118 insertions(+), 7 deletions(-) create mode 100644 00_Utilities/DotnetUtils/DotnetUtils/Functions.cs diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Functions.cs b/00_Utilities/DotnetUtils/DotnetUtils/Functions.cs new file mode 100644 index 00000000..7fa3115c --- /dev/null +++ b/00_Utilities/DotnetUtils/DotnetUtils/Functions.cs @@ -0,0 +1,21 @@ +using System.Xml.Linq; + +namespace DotnetUtils; + +public static class Functions { + public static string? getValue(string path, params string[] names) { + if (names.Length == 0) { throw new InvalidOperationException(); } + var parent = XDocument.Load(path).Element("Project")?.Element("PropertyGroup"); + return getValue(parent, names); + } + + public static string? getValue(XElement? parent, params string[] names) { + if (names.Length == 0) { throw new InvalidOperationException(); } + XElement? elem = null; + foreach (var name in names) { + elem = parent?.Element(name); + if (elem != null) { break; } + } + return elem?.Value; + } +} diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs b/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs index 2aafa800..a8d3532b 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Methods.cs @@ -44,6 +44,38 @@ public static class Methods { process.WaitForExit(); return new ProcessResult(process.ExitCode, output, error); } + + public static Task RunProcessAsync(Process process, string input = "") { + var tcs = new TaskCompletionSource(); + var (output, error) = ("", ""); + var (redirectOut, redirectErr) = ( + process.StartInfo.RedirectStandardOutput, + process.StartInfo.RedirectStandardError + ); + + process.Exited += (s, e) => tcs.SetResult(new ProcessResult(process.ExitCode, output, error)); + + if (redirectOut) { + process.OutputDataReceived += (s, ea) => output += ea.Data + "\n"; + } + if (redirectErr) { + process.ErrorDataReceived += (s, ea) => error += ea.Data + "\n"; + } + + if (!process.Start()) { + // what happens to the Exited event if process doesn't start successfully? + throw new InvalidOperationException(); + } + + if (redirectOut) { process.BeginOutputReadLine(); } + if (redirectErr) { process.BeginErrorReadLine(); } + if (!string.IsNullOrEmpty(input)) { + process.StandardInput.WriteLine(input); + process.StandardInput.Close(); + } + + return tcs.Task; + } } public sealed record ProcessResult(int ExitCode, string StdOut, string StdErr) { diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index e8ea235e..6121d131 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -1,7 +1,9 @@ -using DotnetUtils; +using System.Xml.Linq; +using DotnetUtils; using static System.Console; using static System.IO.Path; using static DotnetUtils.Methods; +using static DotnetUtils.Functions; var infos = PortInfos.Get; @@ -13,6 +15,8 @@ var actions = new (Action action, string description)[] { (missingProj, "Output missing project file"), (unexpectedProjName, "Output misnamed project files"), (multipleProjs, "Output multiple project files"), + (checkProjects, "Check .csproj/.vbproj files for target framework, nullability etc."), + (checkExecutableProject, "Check that there is at least one executable project per port"), (generateMissingSlns, "Generate solution files when missing"), (generateMissingProjs, "Generate project files when missing") @@ -220,12 +224,66 @@ void generateMissingProjs() { } void checkProjects() { - // warn if project files do not: - // target .NET 6 - // implicit using - // nullable enable - // warn if none og the projects have: - // output type exe + foreach (var (proj,item) in infos.SelectMany(item => item.Projs.Select(proj => (proj,item)))) { + var warnings = new List(); + var parent = XDocument.Load(proj).Element("Project")?.Element("PropertyGroup"); + + var ( + framework, + nullable, + implicitUsing, + rootNamespace, + langVersion + ) = ( + getValue(parent, "TargetFramework", "TargetFrameworks"), + getValue(parent, "Nullable"), + getValue(parent, "ImplicitUsings"), + getValue(parent, "RootNamespace"), + getValue(parent, "LangVersion") + ); + + if (framework != "net6.0") { + warnings.Add($"Target: {framework}"); + } + + if (item.Lang == "csharp") { + if (nullable != "enable") { + warnings.Add($"Nullable: {nullable}"); + } + if (implicitUsing != "enable") { + warnings.Add($"ImplicitUsings: {implicitUsing}"); + } + if (rootNamespace != null && rootNamespace != item.GameName) { + warnings.Add($"RootNamespace: {rootNamespace}"); + } + if (langVersion != "10") { + warnings.Add($"LangVersion: {langVersion}"); + } + } + + if (item.Lang == "vbnet") { + if (rootNamespace != item.GameName) { + warnings.Add($"RootNamespace: {rootNamespace}"); + } + if (langVersion != "16.9") { + warnings.Add($"LangVersion: {langVersion}"); + } + } + + if (warnings.Any()) { + WriteLine(proj); + WriteLine(string.Join("\n", warnings)); + WriteLine(); + } + } +} + +void checkExecutableProject() { + foreach (var item in infos) { + if (item.Projs.All(proj => getValue(proj,"OutputType") != "Exe")) { + WriteLine($"{item.LangPath}"); + } + } } void tryBuild() { From ced05abe6bccfd13116b0717e538f88dca40b9f8 Mon Sep 17 00:00:00 2001 From: Mark Wieder Date: Sun, 16 Jan 2022 14:15:59 -0800 Subject: [PATCH 30/82] craps game in ruby --- 29_Craps/ruby/craps.rb | 125 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 29_Craps/ruby/craps.rb diff --git a/29_Craps/ruby/craps.rb b/29_Craps/ruby/craps.rb new file mode 100644 index 00000000..dc53813b --- /dev/null +++ b/29_Craps/ruby/craps.rb @@ -0,0 +1,125 @@ +class CRAPSGAME + + # class variables start with a double "@" + @@standings = 0 + + def displayHeading + puts "CRAPS".center(80) + puts "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY".center(80) + puts "\n\n\n" + puts "2,3,12 are losers" + puts "4,5,6,8,9,10 are points" + puts "7,11 are natural winners.\n\n" + end + + def displayStanding + if @@standings < 0 + print "you are in the hole by " + elsif @@standings == 0 + print "you currently have " + else + # show how much money we currently have + print "you now have won " + end + # print the absolute value of the amount in the standings + puts @@standings.abs.to_s + " dollars" + end + + # dice can come up 2 through 12 + # so return a minimum of 2 and add 0 through 10 to that + def rollDice + puts "I will now throw the dice" + return rand(5) + rand(5) + 2 + end + + def placeBet + print "How much do you want to wager? " + wager = gets.strip.to_i + return wager + end + + def loseBetBy amount + @@standings -= amount + end + + def winBetBy amount + @@standings += amount + end + + def askQuit? + print "\nDo you want to play again? " + # just the first character, make it uppercase + again = gets.strip.upcase[0] + return again != "Y" + end + + def pointRoll point, wager + while true do + puts " is the point." + puts " I will roll again when you press Enter." + waitForIt = gets + roll = rollDice + print roll.to_s + + # the only critical rolls here are 7 and the previous roll + # if anything else comes up we roll again. + case roll.to_i + when 7 + puts " craps - you lose" + loseBetBy wager + break + when point + puts " is a winner! congrats!" + puts "at 2 to 1 odds pays you " + (2 * wager).to_s + " dollars" + winBetBy 2 * wager + break + else + print " no point - " + point.to_s + end + end + end + + def play + displayHeading + + while true do + wagerAmount = placeBet + roll = rollDice + print roll.to_s + case roll + when 2 + puts " snake eyes - you lose" + loseBetBy wagerAmount + when 3, 12 + puts " craps - you lose" + loseBetBy wagerAmount + when 4, 5, 6, 8, 9, 10 + pointRoll roll, wagerAmount + when 7, 11 + puts " a natural - a winner" + puts "pays even money: " + wagerAmount.to_s + " dollars" + winBetBy wagerAmount + end + displayStanding + if askQuit? + endPlay + end + end + end + + def endPlay + case + when @@standings < 0 + puts "Too bad. You are in the hole " + @@standings.abs.to_s + " dollars. Come again." + when @@standings > 0 + puts "Congratulations --- You came out a winner of " + @@standings.to_s + " dollars. Come again!" + when @@standings == 0 + puts "Congratulations --- You came out even, not bad for an amateur" + end + exit + end +end + +craps = CRAPSGAME.new +craps.play + From 63655d4ba05e4d04d1a90745b30b7850a52aebc4 Mon Sep 17 00:00:00 2001 From: ribtips Date: Sun, 16 Jan 2022 19:24:20 -0500 Subject: [PATCH 31/82] Game 41 Guess in Ruby --- 41_Guess/ruby/guess.rb | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 41_Guess/ruby/guess.rb diff --git a/41_Guess/ruby/guess.rb b/41_Guess/ruby/guess.rb new file mode 100644 index 00000000..cf2deea2 --- /dev/null +++ b/41_Guess/ruby/guess.rb @@ -0,0 +1,48 @@ +def print_intro + print " " * 31 + "GUESS\n" + print " " * 15 + "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n" + print "THIS IS A NUMBER GUESSING GAME. I'LL THINK\nOF A NUMBER BETWEEN 1 AND ANY LIMIT YOU WANT.\nTHEN YOU HAVE TO GUESS WHAT IT IS.\n" +end + +def game_play(limit,choice_limit) + random = rand(limit.to_i)+1 + puts "I'M THINKING OF A NUMBER BETWEEN 1 and #{limit}" + puts "NOW YOU TRY TO GUESS WHAT IT IS." + print "? " + ans=0 + guesses=0 + until ans.to_i == random.to_i + ans = gets.chomp + guesses += 1 + if ans.to_i > random.to_i + puts "TOO HIGH. TRY A SMALLER ANSWER." + print "? " + elsif ans.to_i < random.to_i + puts "TOO LOW. TRY A BIGGER ANSWER." + print "? " + elsif ans.to_i == random.to_i + puts "THAT'S IT! YOU GOT IT IN #{guesses} TRIES." + if guesses.to_i < choice_limit.to_i + puts "VERY GOOD." + elsif guesses.to_i == choice_limit.to_i + puts "GOOD." + else + puts "YOU SHOULD HAVE BEEN ABLE TO GET IT IN ONLY #{choice_limit}" + end + print "\n\n\n\n\n" + end + end +end + + +def main + print_intro + puts "WHAT LIMIT DO YOU WANT" + limit = gets.chomp + choice_limit = (Math.log(limit.to_i)/Math.log(2)+1).to_i + while 1 + game_play(limit,choice_limit) + end +end + +main From a586da66ad570c08a7494e186e5a998816d40128 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 02:55:36 +0200 Subject: [PATCH 32/82] Script - output info on a single port --- .../DotnetUtils/DotnetUtils/Functions.cs | 14 +++ .../DotnetUtils/DotnetUtils/PortInfo.cs | 31 +++--- .../DotnetUtils/DotnetUtils/PortInfos.cs | 4 +- .../DotnetUtils/DotnetUtils/Program.cs | 94 +++++++++++++++---- 4 files changed, 107 insertions(+), 36 deletions(-) diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Functions.cs b/00_Utilities/DotnetUtils/DotnetUtils/Functions.cs index 7fa3115c..cc31170e 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Functions.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Functions.cs @@ -1,4 +1,5 @@ using System.Xml.Linq; +using static System.Console; namespace DotnetUtils; @@ -18,4 +19,17 @@ public static class Functions { } return elem?.Value; } + + public static int getChoice(int maxValue) => getChoice(0, maxValue); + + public static int getChoice(int minValue, int maxValue) { + int result; + do { + Write("? "); + } while (!int.TryParse(ReadLine(), out result) || result < minValue || result > maxValue); + //WriteLine(); + return result; + } + + } diff --git a/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs b/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs index a1caaf15..1cb0ba03 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs @@ -5,7 +5,7 @@ using static DotnetUtils.Globals; namespace DotnetUtils; public record PortInfo( - string FullPath, string FolderName, int Index, string GameName, + string GamePath, string FolderName, int Index, string GameName, string LangPath, string Lang, string Ext, string ProjExt, string[] CodeFiles, string[] Slns, string[] Projs ) { @@ -24,33 +24,32 @@ public record PortInfo( { "23_Matches", "TwentyThreeMatches"} }; - public static PortInfo? Create(string fullPath, string langKeyword) { - var folderName = GetFileName(fullPath); + public static PortInfo? Create(string gamePath, string langKeyword) { + var folderName = GetFileName(gamePath); var parts = folderName.Split('_', 2); - var index = - parts.Length > 0 && int.TryParse(parts[0], out var n) ? + if (parts.Length <= 1) { return null; } + + var (index, gameName) = ( + int.TryParse(parts[0], out var n) && n > 0 ? // ignore utilities folder n : - (int?)null; + (int?)null, + specialGameNames.TryGetValue(parts[1], out var specialName) ? + specialName : + parts[1].Replace("_", "").Replace("-", "") + ); - var gameName = - parts.Length <= 1 ? - null : - specialGameNames.TryGetValue(parts[1], out var specialName) ? - specialName : - parts[1].Replace("_", "").Replace("-", ""); - - if (index is 0 or null || gameName is null) { return null; } + if (index is null || gameName is null) { return null; } var (ext, projExt) = LangData[langKeyword]; - var langPath = Combine(fullPath, langKeyword); + var langPath = Combine(gamePath, langKeyword); var codeFiles = GetFiles(langPath, $"*.{ext}", enumerationOptions) .Where(x => !x.Contains("\\bin\\") && !x.Contains("\\obj\\")) .ToArray(); return new PortInfo( - fullPath, folderName, index.Value, gameName, + gamePath, folderName, index.Value, gameName, langPath, langKeyword, ext, projExt, codeFiles, GetFiles(langPath, "*.sln", enumerationOptions), diff --git a/00_Utilities/DotnetUtils/DotnetUtils/PortInfos.cs b/00_Utilities/DotnetUtils/DotnetUtils/PortInfos.cs index b8c1afd3..af824b33 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/PortInfos.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/PortInfos.cs @@ -12,8 +12,8 @@ public static class PortInfos { Root = Root[..Root.IndexOf(@"\00_Utilities")]; Get = GetDirectories(Root) - .SelectMany(fullPath => LangData.Keys.Select(keyword => (fullPath, keyword))) - .SelectT((fullPath, keyword) => PortInfo.Create(fullPath, keyword)) + .SelectMany(gamePath => LangData.Keys.Select(keyword => (gamePath, keyword))) + .SelectT((gamePath, keyword) => PortInfo.Create(gamePath, keyword)) .Where(x => x is not null) .ToArray()!; } diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index 6121d131..ab59bd9e 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -17,6 +17,7 @@ var actions = new (Action action, string description)[] { (multipleProjs, "Output multiple project files"), (checkProjects, "Check .csproj/.vbproj files for target framework, nullability etc."), (checkExecutableProject, "Check that there is at least one executable project per port"), + (printPortInfo, "Print info about a single port"), (generateMissingSlns, "Generate solution files when missing"), (generateMissingProjs, "Generate project files when missing") @@ -30,15 +31,6 @@ WriteLine(); actions[getChoice(actions.Length - 1)].action(); -int getChoice(int maxValue) { - int result; - do { - Write("? "); - } while (!int.TryParse(ReadLine(), out result) || result < 0 || result > maxValue); - WriteLine(); - return result; -} - void printSlns(PortInfo pi) { switch (pi.Slns.Length) { case 0: @@ -73,7 +65,6 @@ void printProjs(PortInfo pi) { } break; } - WriteLine(); } void printInfos() { @@ -215,7 +206,7 @@ void generateMissingProjs() { }; var projFullPath = Combine(item.LangPath, $"{item.GameName}.{item.ProjExt}"); File.WriteAllText(projFullPath, projText); - + if (item.Slns.Length == 1) { var result = RunProcess("dotnet", $"sln {item.Slns[0]} add {projFullPath}"); WriteLine(result); @@ -224,7 +215,15 @@ void generateMissingProjs() { } void checkProjects() { - foreach (var (proj,item) in infos.SelectMany(item => item.Projs.Select(proj => (proj,item)))) { + foreach (var info in infos) { + printProjectWarnings(info); + WriteLine(); + } +} + +// TODO make this run on a single project +void printProjectWarnings(PortInfo info) { + foreach (var proj in info.Projs) { var warnings = new List(); var parent = XDocument.Load(proj).Element("Project")?.Element("PropertyGroup"); @@ -246,14 +245,14 @@ void checkProjects() { warnings.Add($"Target: {framework}"); } - if (item.Lang == "csharp") { + if (info.Lang == "csharp") { if (nullable != "enable") { warnings.Add($"Nullable: {nullable}"); } if (implicitUsing != "enable") { warnings.Add($"ImplicitUsings: {implicitUsing}"); } - if (rootNamespace != null && rootNamespace != item.GameName) { + if (rootNamespace != null && rootNamespace != info.GameName) { warnings.Add($"RootNamespace: {rootNamespace}"); } if (langVersion != "10") { @@ -261,8 +260,8 @@ void checkProjects() { } } - if (item.Lang == "vbnet") { - if (rootNamespace != item.GameName) { + if (info.Lang == "vbnet") { + if (rootNamespace != info.GameName) { warnings.Add($"RootNamespace: {rootNamespace}"); } if (langVersion != "16.9") { @@ -271,7 +270,7 @@ void checkProjects() { } if (warnings.Any()) { - WriteLine(proj); + WriteLine(proj.RelativePath(info.LangPath)); WriteLine(string.Join("\n", warnings)); WriteLine(); } @@ -280,7 +279,7 @@ void checkProjects() { void checkExecutableProject() { foreach (var item in infos) { - if (item.Projs.All(proj => getValue(proj,"OutputType") != "Exe")) { + if (item.Projs.All(proj => getValue(proj, "OutputType") != "Exe")) { WriteLine($"{item.LangPath}"); } } @@ -289,3 +288,62 @@ void checkExecutableProject() { void tryBuild() { // if has code files, try to build } + +void printPortInfo() { + // prompt for port number + Write("Enter number from 1 to 96 "); + var index = getChoice(1, 96); + + Write("Enter 0 for C#, 1 for VB "); + var lang = getChoice(1) switch { + 0 => "csharp", + 1 => "vbnet", + _ => throw new InvalidOperationException() + }; + + WriteLine(); + + var info = infos.Single(x => x.Index == index && x.Lang == lang); + + WriteLine(info.LangPath); + WriteLine(new string('-', 50)); + + // print solutions + printSlns(info); + + // mismatched solution name/location? (expected x) + var expectedSlnName = Combine(info.LangPath, $"{info.GameName}.sln"); + if (!info.Slns.Contains(expectedSlnName)) { + WriteLine($"Expected name/path: {expectedSlnName.RelativePath(info.LangPath)}"); + } + + // has executable project? + if (info.Projs.All(proj => getValue(proj, "OutputType") != "Exe")) { + WriteLine("No executable project"); + } + + WriteLine(); + + // print projects + printProjs(info); + + // mimsatched project name/location? (expected x) + var expectedProjName = Combine(info.LangPath, $"{info.GameName}.{info.ProjExt}"); + if (info.Projs.Length < 2 && !info.Projs.Contains(expectedProjName)) { + WriteLine($"Expected name/path: {expectedProjName.RelativePath(info.LangPath)}"); + } + + WriteLine(); + + // verify project properties + printProjectWarnings(info); + + WriteLine("Code files:"); + + // list code files + foreach (var codeFile in info.CodeFiles) { + WriteLine(codeFile.RelativePath(info.LangPath)); + } + + // try build +} From b942bbab9eea5ee638b7c848bf3d46bd88cf60d0 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 03:13:27 +0200 Subject: [PATCH 33/82] Rename AceyDucey; fix folder structure --- 00_Utilities/DotnetUtils/DotnetUtils/Program.cs | 1 - 01_Acey_Ducey/vbnet/{AceyDucy.sln => AceyDucey.sln} | 10 +++++----- .../{AceyDucy/AceyDucy.vbproj => AceyDucey.vbproj} | 3 ++- 01_Acey_Ducey/vbnet/{AceyDucy => }/Program.vb | 0 4 files changed, 7 insertions(+), 7 deletions(-) rename 01_Acey_Ducey/vbnet/{AceyDucy.sln => AceyDucey.sln} (64%) rename 01_Acey_Ducey/vbnet/{AceyDucy/AceyDucy.vbproj => AceyDucey.vbproj} (66%) rename 01_Acey_Ducey/vbnet/{AceyDucy => }/Program.vb (100%) diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index ab59bd9e..7f350f55 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -221,7 +221,6 @@ void checkProjects() { } } -// TODO make this run on a single project void printProjectWarnings(PortInfo info) { foreach (var proj in info.Projs) { var warnings = new List(); diff --git a/01_Acey_Ducey/vbnet/AceyDucy.sln b/01_Acey_Ducey/vbnet/AceyDucey.sln similarity index 64% rename from 01_Acey_Ducey/vbnet/AceyDucy.sln rename to 01_Acey_Ducey/vbnet/AceyDucey.sln index 881d7c9c..1c5cafb6 100644 --- a/01_Acey_Ducey/vbnet/AceyDucy.sln +++ b/01_Acey_Ducey/vbnet/AceyDucey.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "AceyDucy", "AceyDucy\AceyDucy.vbproj", "{37496710-B458-4502-ADCB-4C57203866F9}" +Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "AceyDucey", "AceyDucey.vbproj", "{54C05475-238D-4A82-A67B-B6C1BF2CA337}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {37496710-B458-4502-ADCB-4C57203866F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {37496710-B458-4502-ADCB-4C57203866F9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {37496710-B458-4502-ADCB-4C57203866F9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {37496710-B458-4502-ADCB-4C57203866F9}.Release|Any CPU.Build.0 = Release|Any CPU + {54C05475-238D-4A82-A67B-B6C1BF2CA337}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54C05475-238D-4A82-A67B-B6C1BF2CA337}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54C05475-238D-4A82-A67B-B6C1BF2CA337}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54C05475-238D-4A82-A67B-B6C1BF2CA337}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/01_Acey_Ducey/vbnet/AceyDucy/AceyDucy.vbproj b/01_Acey_Ducey/vbnet/AceyDucey.vbproj similarity index 66% rename from 01_Acey_Ducey/vbnet/AceyDucy/AceyDucy.vbproj rename to 01_Acey_Ducey/vbnet/AceyDucey.vbproj index 98a07001..88e8cd5e 100644 --- a/01_Acey_Ducey/vbnet/AceyDucy/AceyDucy.vbproj +++ b/01_Acey_Ducey/vbnet/AceyDucey.vbproj @@ -2,8 +2,9 @@ Exe - AceyDucy + AceyDucey net6.0 + 16.9 diff --git a/01_Acey_Ducey/vbnet/AceyDucy/Program.vb b/01_Acey_Ducey/vbnet/Program.vb similarity index 100% rename from 01_Acey_Ducey/vbnet/AceyDucy/Program.vb rename to 01_Acey_Ducey/vbnet/Program.vb From 994de5bebe7104bf30c24a91e96209c2efb3f7fd Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:16:42 +0200 Subject: [PATCH 34/82] Simplify Chemist (C#) folder structure --- 24_Chemist/csharp/{Chemist/Chemist => }/Chemist.csproj | 0 24_Chemist/csharp/{Chemist => }/Chemist.sln | 10 +++++----- 24_Chemist/csharp/{Chemist/Chemist => }/Program.cs | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename 24_Chemist/csharp/{Chemist/Chemist => }/Chemist.csproj (100%) rename 24_Chemist/csharp/{Chemist => }/Chemist.sln (64%) rename 24_Chemist/csharp/{Chemist/Chemist => }/Program.cs (100%) diff --git a/24_Chemist/csharp/Chemist/Chemist/Chemist.csproj b/24_Chemist/csharp/Chemist.csproj similarity index 100% rename from 24_Chemist/csharp/Chemist/Chemist/Chemist.csproj rename to 24_Chemist/csharp/Chemist.csproj diff --git a/24_Chemist/csharp/Chemist/Chemist.sln b/24_Chemist/csharp/Chemist.sln similarity index 64% rename from 24_Chemist/csharp/Chemist/Chemist.sln rename to 24_Chemist/csharp/Chemist.sln index 6dc7bfa2..bac78435 100644 --- a/24_Chemist/csharp/Chemist/Chemist.sln +++ b/24_Chemist/csharp/Chemist.sln @@ -3,7 +3,7 @@ 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}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Chemist", "Chemist.csproj", "{C16545E8-E078-4C69-B7CA-9D821C944252}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global 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 + {C16545E8-E078-4C69-B7CA-9D821C944252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C16545E8-E078-4C69-B7CA-9D821C944252}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C16545E8-E078-4C69-B7CA-9D821C944252}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C16545E8-E078-4C69-B7CA-9D821C944252}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/24_Chemist/csharp/Chemist/Chemist/Program.cs b/24_Chemist/csharp/Program.cs similarity index 100% rename from 24_Chemist/csharp/Chemist/Chemist/Program.cs rename to 24_Chemist/csharp/Program.cs From fe7b6c69ee572f3e5d5000d7d895bcc5b4b271e4 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:19:24 +0200 Subject: [PATCH 35/82] Simplify CivilWar (C#) folder structure --- 27_Civil_War/csharp/{CivilWar/CivilWar => }/Army.cs | 0 27_Civil_War/csharp/{CivilWar/CivilWar => }/Battle.cs | 0 .../csharp/{CivilWar/CivilWar => }/CivilWar.csproj | 0 27_Civil_War/csharp/{CivilWar => }/CivilWar.sln | 10 +++++----- .../csharp/{CivilWar/CivilWar => }/ConsoleUtils.cs | 0 .../csharp/{CivilWar/CivilWar => }/GameOptions.cs | 0 27_Civil_War/csharp/{CivilWar/CivilWar => }/Program.cs | 0 7 files changed, 5 insertions(+), 5 deletions(-) rename 27_Civil_War/csharp/{CivilWar/CivilWar => }/Army.cs (100%) rename 27_Civil_War/csharp/{CivilWar/CivilWar => }/Battle.cs (100%) rename 27_Civil_War/csharp/{CivilWar/CivilWar => }/CivilWar.csproj (100%) rename 27_Civil_War/csharp/{CivilWar => }/CivilWar.sln (64%) rename 27_Civil_War/csharp/{CivilWar/CivilWar => }/ConsoleUtils.cs (100%) rename 27_Civil_War/csharp/{CivilWar/CivilWar => }/GameOptions.cs (100%) rename 27_Civil_War/csharp/{CivilWar/CivilWar => }/Program.cs (100%) diff --git a/27_Civil_War/csharp/CivilWar/CivilWar/Army.cs b/27_Civil_War/csharp/Army.cs similarity index 100% rename from 27_Civil_War/csharp/CivilWar/CivilWar/Army.cs rename to 27_Civil_War/csharp/Army.cs diff --git a/27_Civil_War/csharp/CivilWar/CivilWar/Battle.cs b/27_Civil_War/csharp/Battle.cs similarity index 100% rename from 27_Civil_War/csharp/CivilWar/CivilWar/Battle.cs rename to 27_Civil_War/csharp/Battle.cs diff --git a/27_Civil_War/csharp/CivilWar/CivilWar/CivilWar.csproj b/27_Civil_War/csharp/CivilWar.csproj similarity index 100% rename from 27_Civil_War/csharp/CivilWar/CivilWar/CivilWar.csproj rename to 27_Civil_War/csharp/CivilWar.csproj diff --git a/27_Civil_War/csharp/CivilWar/CivilWar.sln b/27_Civil_War/csharp/CivilWar.sln similarity index 64% rename from 27_Civil_War/csharp/CivilWar/CivilWar.sln rename to 27_Civil_War/csharp/CivilWar.sln index 17da385e..d013f7ed 100644 --- a/27_Civil_War/csharp/CivilWar/CivilWar.sln +++ b/27_Civil_War/csharp/CivilWar.sln @@ -3,7 +3,7 @@ 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}") = "CivilWar", "CivilWar\CivilWar.csproj", "{09C22BBE-8480-4B8C-9A07-E2DAA24B692B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CivilWar", "CivilWar.csproj", "{4EE5EFE7-2D60-464A-9F8D-4BBD2A14AAC7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {09C22BBE-8480-4B8C-9A07-E2DAA24B692B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {09C22BBE-8480-4B8C-9A07-E2DAA24B692B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {09C22BBE-8480-4B8C-9A07-E2DAA24B692B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {09C22BBE-8480-4B8C-9A07-E2DAA24B692B}.Release|Any CPU.Build.0 = Release|Any CPU + {4EE5EFE7-2D60-464A-9F8D-4BBD2A14AAC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4EE5EFE7-2D60-464A-9F8D-4BBD2A14AAC7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4EE5EFE7-2D60-464A-9F8D-4BBD2A14AAC7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4EE5EFE7-2D60-464A-9F8D-4BBD2A14AAC7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/27_Civil_War/csharp/CivilWar/CivilWar/ConsoleUtils.cs b/27_Civil_War/csharp/ConsoleUtils.cs similarity index 100% rename from 27_Civil_War/csharp/CivilWar/CivilWar/ConsoleUtils.cs rename to 27_Civil_War/csharp/ConsoleUtils.cs diff --git a/27_Civil_War/csharp/CivilWar/CivilWar/GameOptions.cs b/27_Civil_War/csharp/GameOptions.cs similarity index 100% rename from 27_Civil_War/csharp/CivilWar/CivilWar/GameOptions.cs rename to 27_Civil_War/csharp/GameOptions.cs diff --git a/27_Civil_War/csharp/CivilWar/CivilWar/Program.cs b/27_Civil_War/csharp/Program.cs similarity index 100% rename from 27_Civil_War/csharp/CivilWar/CivilWar/Program.cs rename to 27_Civil_War/csharp/Program.cs From e6db612025d4250d10f0cac0e3be93ee89e12461 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:24:39 +0200 Subject: [PATCH 36/82] Simplify Craps (C#) folder structure --- 29_Craps/csharp/{Craps => }/.gitignore | 0 29_Craps/csharp/{Craps => }/Craps.sln | 0 29_Craps/csharp/Craps/{Craps => }/Craps.csproj | 0 29_Craps/csharp/Craps/{Craps => }/CrapsGame.cs | 0 29_Craps/csharp/Craps/{Craps => }/Dice.cs | 0 29_Craps/csharp/Craps/{Craps => }/Program.cs | 0 29_Craps/csharp/Craps/{Craps => }/UserInterface.cs | 0 29_Craps/csharp/{Craps => }/CrapsTester/CrapsTester.csproj | 0 29_Craps/csharp/{Craps => }/CrapsTester/CrapsTests.cs | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename 29_Craps/csharp/{Craps => }/.gitignore (100%) rename 29_Craps/csharp/{Craps => }/Craps.sln (100%) rename 29_Craps/csharp/Craps/{Craps => }/Craps.csproj (100%) rename 29_Craps/csharp/Craps/{Craps => }/CrapsGame.cs (100%) rename 29_Craps/csharp/Craps/{Craps => }/Dice.cs (100%) rename 29_Craps/csharp/Craps/{Craps => }/Program.cs (100%) rename 29_Craps/csharp/Craps/{Craps => }/UserInterface.cs (100%) rename 29_Craps/csharp/{Craps => }/CrapsTester/CrapsTester.csproj (100%) rename 29_Craps/csharp/{Craps => }/CrapsTester/CrapsTests.cs (100%) diff --git a/29_Craps/csharp/Craps/.gitignore b/29_Craps/csharp/.gitignore similarity index 100% rename from 29_Craps/csharp/Craps/.gitignore rename to 29_Craps/csharp/.gitignore diff --git a/29_Craps/csharp/Craps/Craps.sln b/29_Craps/csharp/Craps.sln similarity index 100% rename from 29_Craps/csharp/Craps/Craps.sln rename to 29_Craps/csharp/Craps.sln diff --git a/29_Craps/csharp/Craps/Craps/Craps.csproj b/29_Craps/csharp/Craps/Craps.csproj similarity index 100% rename from 29_Craps/csharp/Craps/Craps/Craps.csproj rename to 29_Craps/csharp/Craps/Craps.csproj diff --git a/29_Craps/csharp/Craps/Craps/CrapsGame.cs b/29_Craps/csharp/Craps/CrapsGame.cs similarity index 100% rename from 29_Craps/csharp/Craps/Craps/CrapsGame.cs rename to 29_Craps/csharp/Craps/CrapsGame.cs diff --git a/29_Craps/csharp/Craps/Craps/Dice.cs b/29_Craps/csharp/Craps/Dice.cs similarity index 100% rename from 29_Craps/csharp/Craps/Craps/Dice.cs rename to 29_Craps/csharp/Craps/Dice.cs diff --git a/29_Craps/csharp/Craps/Craps/Program.cs b/29_Craps/csharp/Craps/Program.cs similarity index 100% rename from 29_Craps/csharp/Craps/Craps/Program.cs rename to 29_Craps/csharp/Craps/Program.cs diff --git a/29_Craps/csharp/Craps/Craps/UserInterface.cs b/29_Craps/csharp/Craps/UserInterface.cs similarity index 100% rename from 29_Craps/csharp/Craps/Craps/UserInterface.cs rename to 29_Craps/csharp/Craps/UserInterface.cs diff --git a/29_Craps/csharp/Craps/CrapsTester/CrapsTester.csproj b/29_Craps/csharp/CrapsTester/CrapsTester.csproj similarity index 100% rename from 29_Craps/csharp/Craps/CrapsTester/CrapsTester.csproj rename to 29_Craps/csharp/CrapsTester/CrapsTester.csproj diff --git a/29_Craps/csharp/Craps/CrapsTester/CrapsTests.cs b/29_Craps/csharp/CrapsTester/CrapsTests.cs similarity index 100% rename from 29_Craps/csharp/Craps/CrapsTester/CrapsTests.cs rename to 29_Craps/csharp/CrapsTester/CrapsTests.cs From 59c8b9cabc752eecb0090c2e4eaba2b1b2b96e0f Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:28:25 +0200 Subject: [PATCH 37/82] Simplify Hangman folder structure --- 44_Hangman/csharp/{Hangman => }/Graphic.cs | 0 44_Hangman/csharp/{Hangman => }/Hangman.csproj | 0 44_Hangman/csharp/{Hangman => }/Hangman.sln | 0 44_Hangman/csharp/{Hangman => }/Program.cs | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename 44_Hangman/csharp/{Hangman => }/Graphic.cs (100%) rename 44_Hangman/csharp/{Hangman => }/Hangman.csproj (100%) rename 44_Hangman/csharp/{Hangman => }/Hangman.sln (100%) rename 44_Hangman/csharp/{Hangman => }/Program.cs (100%) diff --git a/44_Hangman/csharp/Hangman/Graphic.cs b/44_Hangman/csharp/Graphic.cs similarity index 100% rename from 44_Hangman/csharp/Hangman/Graphic.cs rename to 44_Hangman/csharp/Graphic.cs diff --git a/44_Hangman/csharp/Hangman/Hangman.csproj b/44_Hangman/csharp/Hangman.csproj similarity index 100% rename from 44_Hangman/csharp/Hangman/Hangman.csproj rename to 44_Hangman/csharp/Hangman.csproj diff --git a/44_Hangman/csharp/Hangman/Hangman.sln b/44_Hangman/csharp/Hangman.sln similarity index 100% rename from 44_Hangman/csharp/Hangman/Hangman.sln rename to 44_Hangman/csharp/Hangman.sln diff --git a/44_Hangman/csharp/Hangman/Program.cs b/44_Hangman/csharp/Program.cs similarity index 100% rename from 44_Hangman/csharp/Hangman/Program.cs rename to 44_Hangman/csharp/Program.cs From b434e2de06bfd484db7660f066c52100d53b0241 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:31:36 +0200 Subject: [PATCH 38/82] Simplify Pizza (C#) folder structure --- 69_Pizza/csharp/{Pizza => }/CustomerMap.cs | 0 69_Pizza/csharp/{Pizza => }/Pizza.csproj | 0 69_Pizza/csharp/{Pizza => }/Pizza.sln | 0 69_Pizza/csharp/{Pizza => }/PizzaGame.cs | 0 69_Pizza/csharp/{Pizza => }/Program.cs | 0 69_Pizza/csharp/{Pizza => }/StringBuilderExtensions.cs | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename 69_Pizza/csharp/{Pizza => }/CustomerMap.cs (100%) rename 69_Pizza/csharp/{Pizza => }/Pizza.csproj (100%) rename 69_Pizza/csharp/{Pizza => }/Pizza.sln (100%) rename 69_Pizza/csharp/{Pizza => }/PizzaGame.cs (100%) rename 69_Pizza/csharp/{Pizza => }/Program.cs (100%) rename 69_Pizza/csharp/{Pizza => }/StringBuilderExtensions.cs (100%) diff --git a/69_Pizza/csharp/Pizza/CustomerMap.cs b/69_Pizza/csharp/CustomerMap.cs similarity index 100% rename from 69_Pizza/csharp/Pizza/CustomerMap.cs rename to 69_Pizza/csharp/CustomerMap.cs diff --git a/69_Pizza/csharp/Pizza/Pizza.csproj b/69_Pizza/csharp/Pizza.csproj similarity index 100% rename from 69_Pizza/csharp/Pizza/Pizza.csproj rename to 69_Pizza/csharp/Pizza.csproj diff --git a/69_Pizza/csharp/Pizza/Pizza.sln b/69_Pizza/csharp/Pizza.sln similarity index 100% rename from 69_Pizza/csharp/Pizza/Pizza.sln rename to 69_Pizza/csharp/Pizza.sln diff --git a/69_Pizza/csharp/Pizza/PizzaGame.cs b/69_Pizza/csharp/PizzaGame.cs similarity index 100% rename from 69_Pizza/csharp/Pizza/PizzaGame.cs rename to 69_Pizza/csharp/PizzaGame.cs diff --git a/69_Pizza/csharp/Pizza/Program.cs b/69_Pizza/csharp/Program.cs similarity index 100% rename from 69_Pizza/csharp/Pizza/Program.cs rename to 69_Pizza/csharp/Program.cs diff --git a/69_Pizza/csharp/Pizza/StringBuilderExtensions.cs b/69_Pizza/csharp/StringBuilderExtensions.cs similarity index 100% rename from 69_Pizza/csharp/Pizza/StringBuilderExtensions.cs rename to 69_Pizza/csharp/StringBuilderExtensions.cs From c73f30c046bf0ed982b8f4c4c34f7cb1c9d3df42 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:34:09 +0200 Subject: [PATCH 39/82] Simplify Reverse (C#) folder structure --- .../Reverse.Tests/Generators/PositiveIntegerGenerator.cs | 0 .../csharp/{Reverse => }/Reverse.Tests/Reverse.Tests.csproj | 0 73_Reverse/csharp/{Reverse => }/Reverse.Tests/ReverserTests.cs | 0 73_Reverse/csharp/{Reverse => }/Reverse.Tests/TestReverser.cs | 0 73_Reverse/csharp/{Reverse => }/Reverse.sln | 0 73_Reverse/csharp/Reverse/{Reverse => }/Program.cs | 0 73_Reverse/csharp/Reverse/{Reverse => }/Reverse.csproj | 0 73_Reverse/csharp/Reverse/{Reverse => }/Reverser.cs | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename 73_Reverse/csharp/{Reverse => }/Reverse.Tests/Generators/PositiveIntegerGenerator.cs (100%) rename 73_Reverse/csharp/{Reverse => }/Reverse.Tests/Reverse.Tests.csproj (100%) rename 73_Reverse/csharp/{Reverse => }/Reverse.Tests/ReverserTests.cs (100%) rename 73_Reverse/csharp/{Reverse => }/Reverse.Tests/TestReverser.cs (100%) rename 73_Reverse/csharp/{Reverse => }/Reverse.sln (100%) rename 73_Reverse/csharp/Reverse/{Reverse => }/Program.cs (100%) rename 73_Reverse/csharp/Reverse/{Reverse => }/Reverse.csproj (100%) rename 73_Reverse/csharp/Reverse/{Reverse => }/Reverser.cs (100%) diff --git a/73_Reverse/csharp/Reverse/Reverse.Tests/Generators/PositiveIntegerGenerator.cs b/73_Reverse/csharp/Reverse.Tests/Generators/PositiveIntegerGenerator.cs similarity index 100% rename from 73_Reverse/csharp/Reverse/Reverse.Tests/Generators/PositiveIntegerGenerator.cs rename to 73_Reverse/csharp/Reverse.Tests/Generators/PositiveIntegerGenerator.cs diff --git a/73_Reverse/csharp/Reverse/Reverse.Tests/Reverse.Tests.csproj b/73_Reverse/csharp/Reverse.Tests/Reverse.Tests.csproj similarity index 100% rename from 73_Reverse/csharp/Reverse/Reverse.Tests/Reverse.Tests.csproj rename to 73_Reverse/csharp/Reverse.Tests/Reverse.Tests.csproj diff --git a/73_Reverse/csharp/Reverse/Reverse.Tests/ReverserTests.cs b/73_Reverse/csharp/Reverse.Tests/ReverserTests.cs similarity index 100% rename from 73_Reverse/csharp/Reverse/Reverse.Tests/ReverserTests.cs rename to 73_Reverse/csharp/Reverse.Tests/ReverserTests.cs diff --git a/73_Reverse/csharp/Reverse/Reverse.Tests/TestReverser.cs b/73_Reverse/csharp/Reverse.Tests/TestReverser.cs similarity index 100% rename from 73_Reverse/csharp/Reverse/Reverse.Tests/TestReverser.cs rename to 73_Reverse/csharp/Reverse.Tests/TestReverser.cs diff --git a/73_Reverse/csharp/Reverse/Reverse.sln b/73_Reverse/csharp/Reverse.sln similarity index 100% rename from 73_Reverse/csharp/Reverse/Reverse.sln rename to 73_Reverse/csharp/Reverse.sln diff --git a/73_Reverse/csharp/Reverse/Reverse/Program.cs b/73_Reverse/csharp/Reverse/Program.cs similarity index 100% rename from 73_Reverse/csharp/Reverse/Reverse/Program.cs rename to 73_Reverse/csharp/Reverse/Program.cs diff --git a/73_Reverse/csharp/Reverse/Reverse/Reverse.csproj b/73_Reverse/csharp/Reverse/Reverse.csproj similarity index 100% rename from 73_Reverse/csharp/Reverse/Reverse/Reverse.csproj rename to 73_Reverse/csharp/Reverse/Reverse.csproj diff --git a/73_Reverse/csharp/Reverse/Reverse/Reverser.cs b/73_Reverse/csharp/Reverse/Reverser.cs similarity index 100% rename from 73_Reverse/csharp/Reverse/Reverse/Reverser.cs rename to 73_Reverse/csharp/Reverse/Reverser.cs From 83e5a3d8169497baf909f0e3814b5c8925ea1075 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:35:11 +0200 Subject: [PATCH 40/82] Simplify RussianRoulette (C#) folder structure --- 76_Russian_Roulette/csharp/{RussianRoulette => }/Program.cs | 0 .../csharp/{RussianRoulette => }/RussianRoulette.csproj | 0 .../csharp/{RussianRoulette => }/RussianRoulette.sln | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename 76_Russian_Roulette/csharp/{RussianRoulette => }/Program.cs (100%) rename 76_Russian_Roulette/csharp/{RussianRoulette => }/RussianRoulette.csproj (100%) rename 76_Russian_Roulette/csharp/{RussianRoulette => }/RussianRoulette.sln (100%) diff --git a/76_Russian_Roulette/csharp/RussianRoulette/Program.cs b/76_Russian_Roulette/csharp/Program.cs similarity index 100% rename from 76_Russian_Roulette/csharp/RussianRoulette/Program.cs rename to 76_Russian_Roulette/csharp/Program.cs diff --git a/76_Russian_Roulette/csharp/RussianRoulette/RussianRoulette.csproj b/76_Russian_Roulette/csharp/RussianRoulette.csproj similarity index 100% rename from 76_Russian_Roulette/csharp/RussianRoulette/RussianRoulette.csproj rename to 76_Russian_Roulette/csharp/RussianRoulette.csproj diff --git a/76_Russian_Roulette/csharp/RussianRoulette/RussianRoulette.sln b/76_Russian_Roulette/csharp/RussianRoulette.sln similarity index 100% rename from 76_Russian_Roulette/csharp/RussianRoulette/RussianRoulette.sln rename to 76_Russian_Roulette/csharp/RussianRoulette.sln From 16599b85fda1b0fbd507efa73dd0b94917336b20 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:37:17 +0200 Subject: [PATCH 41/82] Simplfy SineWave (C#) folder structure --- 78_Sine_Wave/csharp/{SineWave/SineWave => }/Program.cs | 0 .../csharp/{SineWave/SineWave => }/SineWave.csproj | 0 78_Sine_Wave/csharp/{SineWave => }/SineWave.sln | 10 +++++----- 3 files changed, 5 insertions(+), 5 deletions(-) rename 78_Sine_Wave/csharp/{SineWave/SineWave => }/Program.cs (100%) rename 78_Sine_Wave/csharp/{SineWave/SineWave => }/SineWave.csproj (100%) rename 78_Sine_Wave/csharp/{SineWave => }/SineWave.sln (64%) diff --git a/78_Sine_Wave/csharp/SineWave/SineWave/Program.cs b/78_Sine_Wave/csharp/Program.cs similarity index 100% rename from 78_Sine_Wave/csharp/SineWave/SineWave/Program.cs rename to 78_Sine_Wave/csharp/Program.cs diff --git a/78_Sine_Wave/csharp/SineWave/SineWave/SineWave.csproj b/78_Sine_Wave/csharp/SineWave.csproj similarity index 100% rename from 78_Sine_Wave/csharp/SineWave/SineWave/SineWave.csproj rename to 78_Sine_Wave/csharp/SineWave.csproj diff --git a/78_Sine_Wave/csharp/SineWave/SineWave.sln b/78_Sine_Wave/csharp/SineWave.sln similarity index 64% rename from 78_Sine_Wave/csharp/SineWave/SineWave.sln rename to 78_Sine_Wave/csharp/SineWave.sln index f32a06cd..adcc993f 100644 --- a/78_Sine_Wave/csharp/SineWave/SineWave.sln +++ b/78_Sine_Wave/csharp/SineWave.sln @@ -3,7 +3,7 @@ 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}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SineWave", "SineWave.csproj", "{730FA2CC-5AA5-4BE2-8DF9-8E55FDC8FB30}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global 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 + {730FA2CC-5AA5-4BE2-8DF9-8E55FDC8FB30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {730FA2CC-5AA5-4BE2-8DF9-8E55FDC8FB30}.Debug|Any CPU.Build.0 = Debug|Any CPU + {730FA2CC-5AA5-4BE2-8DF9-8E55FDC8FB30}.Release|Any CPU.ActiveCfg = Release|Any CPU + {730FA2CC-5AA5-4BE2-8DF9-8E55FDC8FB30}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From e17cd37096271812a2ec32b4cb4a12c0629bd228 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:44:09 +0200 Subject: [PATCH 42/82] Simplify Train (C#) folder structure --- 91_Train/csharp/{Train => }/Train.sln | 12 ++++++------ 91_Train/csharp/Train/{Train => }/TrainGame.cs | 0 91_Train/csharp/Train/{Train => }/TrainGame.csproj | 0 .../TrainTests/{TrainTests => }/TrainGameTests.cs | 0 .../TrainTests/{TrainTests => }/TrainTests.csproj | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename 91_Train/csharp/{Train => }/Train.sln (70%) rename 91_Train/csharp/Train/{Train => }/TrainGame.cs (100%) rename 91_Train/csharp/Train/{Train => }/TrainGame.csproj (100%) rename 91_Train/csharp/TrainTests/{TrainTests => }/TrainGameTests.cs (100%) rename 91_Train/csharp/TrainTests/{TrainTests => }/TrainTests.csproj (92%) diff --git a/91_Train/csharp/Train/Train.sln b/91_Train/csharp/Train.sln similarity index 70% rename from 91_Train/csharp/Train/Train.sln rename to 91_Train/csharp/Train.sln index 7735a737..29c49c59 100644 --- a/91_Train/csharp/Train/Train.sln +++ b/91_Train/csharp/Train.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31129.286 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrainGame", "Train\TrainGame.csproj", "{42617537-4E7C-4082-A17B-7F18DFA04C35}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrainGame", "Train\TrainGame.csproj", "{42617537-4E7C-4082-A17B-7F18DFA04C35}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrainTests", "..\TrainTests\TrainTests\TrainTests.csproj", "{7C740A47-99C6-44E1-BDEE-140086BCFE8B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrainTests", "TrainTests\TrainTests.csproj", "{B967AA46-78F2-44F8-A30D-85D35F625991}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -17,10 +17,10 @@ Global {42617537-4E7C-4082-A17B-7F18DFA04C35}.Debug|Any CPU.Build.0 = Debug|Any CPU {42617537-4E7C-4082-A17B-7F18DFA04C35}.Release|Any CPU.ActiveCfg = Release|Any CPU {42617537-4E7C-4082-A17B-7F18DFA04C35}.Release|Any CPU.Build.0 = Release|Any CPU - {7C740A47-99C6-44E1-BDEE-140086BCFE8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7C740A47-99C6-44E1-BDEE-140086BCFE8B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7C740A47-99C6-44E1-BDEE-140086BCFE8B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7C740A47-99C6-44E1-BDEE-140086BCFE8B}.Release|Any CPU.Build.0 = Release|Any CPU + {B967AA46-78F2-44F8-A30D-85D35F625991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B967AA46-78F2-44F8-A30D-85D35F625991}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B967AA46-78F2-44F8-A30D-85D35F625991}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B967AA46-78F2-44F8-A30D-85D35F625991}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/91_Train/csharp/Train/Train/TrainGame.cs b/91_Train/csharp/Train/TrainGame.cs similarity index 100% rename from 91_Train/csharp/Train/Train/TrainGame.cs rename to 91_Train/csharp/Train/TrainGame.cs diff --git a/91_Train/csharp/Train/Train/TrainGame.csproj b/91_Train/csharp/Train/TrainGame.csproj similarity index 100% rename from 91_Train/csharp/Train/Train/TrainGame.csproj rename to 91_Train/csharp/Train/TrainGame.csproj diff --git a/91_Train/csharp/TrainTests/TrainTests/TrainGameTests.cs b/91_Train/csharp/TrainTests/TrainGameTests.cs similarity index 100% rename from 91_Train/csharp/TrainTests/TrainTests/TrainGameTests.cs rename to 91_Train/csharp/TrainTests/TrainGameTests.cs diff --git a/91_Train/csharp/TrainTests/TrainTests/TrainTests.csproj b/91_Train/csharp/TrainTests/TrainTests.csproj similarity index 92% rename from 91_Train/csharp/TrainTests/TrainTests/TrainTests.csproj rename to 91_Train/csharp/TrainTests/TrainTests.csproj index a8de6dde..fb6ab9fb 100644 --- a/91_Train/csharp/TrainTests/TrainTests/TrainTests.csproj +++ b/91_Train/csharp/TrainTests/TrainTests.csproj @@ -20,7 +20,7 @@ - + From 2e03a94e921e281764de3220ca423eccc30e402f Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:48:34 +0200 Subject: [PATCH 43/82] Simplify War (C#) folder structure --- 94_War/csharp/{War => }/War.sln | 0 94_War/csharp/War/{War => }/Cards.cs | 0 94_War/csharp/War/{War => }/Program.cs | 0 94_War/csharp/War/{War => }/UserInterface.cs | 0 94_War/csharp/War/{War => }/War.csproj | 0 94_War/csharp/{War => }/WarTester/Tests.cs | 0 94_War/csharp/{War => }/WarTester/WarTester.csproj | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename 94_War/csharp/{War => }/War.sln (100%) rename 94_War/csharp/War/{War => }/Cards.cs (100%) rename 94_War/csharp/War/{War => }/Program.cs (100%) rename 94_War/csharp/War/{War => }/UserInterface.cs (100%) rename 94_War/csharp/War/{War => }/War.csproj (100%) rename 94_War/csharp/{War => }/WarTester/Tests.cs (100%) rename 94_War/csharp/{War => }/WarTester/WarTester.csproj (100%) diff --git a/94_War/csharp/War/War.sln b/94_War/csharp/War.sln similarity index 100% rename from 94_War/csharp/War/War.sln rename to 94_War/csharp/War.sln diff --git a/94_War/csharp/War/War/Cards.cs b/94_War/csharp/War/Cards.cs similarity index 100% rename from 94_War/csharp/War/War/Cards.cs rename to 94_War/csharp/War/Cards.cs diff --git a/94_War/csharp/War/War/Program.cs b/94_War/csharp/War/Program.cs similarity index 100% rename from 94_War/csharp/War/War/Program.cs rename to 94_War/csharp/War/Program.cs diff --git a/94_War/csharp/War/War/UserInterface.cs b/94_War/csharp/War/UserInterface.cs similarity index 100% rename from 94_War/csharp/War/War/UserInterface.cs rename to 94_War/csharp/War/UserInterface.cs diff --git a/94_War/csharp/War/War/War.csproj b/94_War/csharp/War/War.csproj similarity index 100% rename from 94_War/csharp/War/War/War.csproj rename to 94_War/csharp/War/War.csproj diff --git a/94_War/csharp/War/WarTester/Tests.cs b/94_War/csharp/WarTester/Tests.cs similarity index 100% rename from 94_War/csharp/War/WarTester/Tests.cs rename to 94_War/csharp/WarTester/Tests.cs diff --git a/94_War/csharp/War/WarTester/WarTester.csproj b/94_War/csharp/WarTester/WarTester.csproj similarity index 100% rename from 94_War/csharp/War/WarTester/WarTester.csproj rename to 94_War/csharp/WarTester/WarTester.csproj From b2513f88e6ffb5611f41a72b7611a106eb753bd5 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 08:59:24 +0200 Subject: [PATCH 44/82] Fix capitalization mismatch --- 00_Utilities/DotnetUtils/DotnetUtils/Program.cs | 2 +- 06_Banner/csharp/banner.sln | 10 +++++----- 06_Banner/vbnet/banner.sln | 10 +++++----- 08_Batnum/vbnet/batnum.sln | 6 +++--- 96_Word/csharp/word.sln | 6 +++--- 96_Word/vbnet/word.sln | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index 7f350f55..550250b1 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -101,7 +101,7 @@ void unexpectedSlnName() { if (!item.Slns.Any()) { continue; } var expectedSlnName = $"{item.GameName}.sln"; - if (item.Slns.Contains(Combine(item.LangPath, expectedSlnName))) { continue; } + if (item.Slns.Contains(Combine(item.LangPath, expectedSlnName), StringComparer.InvariantCultureIgnoreCase)) { continue; } counter += 1; WriteLine(item.LangPath); diff --git a/06_Banner/csharp/banner.sln b/06_Banner/csharp/banner.sln index 34f63984..9beeb9b3 100644 --- a/06_Banner/csharp/banner.sln +++ b/06_Banner/csharp/banner.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31321.278 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "banner", "banner.csproj", "{9E24FA30-F2AC-4BF3-ADFB-92D3F796561C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Banner", "Banner.csproj", "{7E8612AB-AFFD-4F72-855F-8172786F28FD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9E24FA30-F2AC-4BF3-ADFB-92D3F796561C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9E24FA30-F2AC-4BF3-ADFB-92D3F796561C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9E24FA30-F2AC-4BF3-ADFB-92D3F796561C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9E24FA30-F2AC-4BF3-ADFB-92D3F796561C}.Release|Any CPU.Build.0 = Release|Any CPU + {7E8612AB-AFFD-4F72-855F-8172786F28FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E8612AB-AFFD-4F72-855F-8172786F28FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E8612AB-AFFD-4F72-855F-8172786F28FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E8612AB-AFFD-4F72-855F-8172786F28FD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/06_Banner/vbnet/banner.sln b/06_Banner/vbnet/banner.sln index 5fdc8737..8a782a2f 100644 --- a/06_Banner/vbnet/banner.sln +++ b/06_Banner/vbnet/banner.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31321.278 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "banner", "banner.vbproj", "{1738D297-A04C-4E6E-8219-D9E72982C39D}" +Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Banner", "Banner.vbproj", "{091ABE13-3E70-4848-B836-592F725915A3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1738D297-A04C-4E6E-8219-D9E72982C39D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1738D297-A04C-4E6E-8219-D9E72982C39D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1738D297-A04C-4E6E-8219-D9E72982C39D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1738D297-A04C-4E6E-8219-D9E72982C39D}.Release|Any CPU.Build.0 = Release|Any CPU + {091ABE13-3E70-4848-B836-592F725915A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {091ABE13-3E70-4848-B836-592F725915A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {091ABE13-3E70-4848-B836-592F725915A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {091ABE13-3E70-4848-B836-592F725915A3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/08_Batnum/vbnet/batnum.sln b/08_Batnum/vbnet/batnum.sln index b3f63f59..ca05e41b 100644 --- a/08_Batnum/vbnet/batnum.sln +++ b/08_Batnum/vbnet/batnum.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31321.278 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "batnum", "batnum.vbproj", "{D577E429-F84D-4E84-86E7-E6526CFD5FD9}" +Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Batnum", "Batnum.vbproj", "{D577E429-F84D-4E84-86E7-E6526CFD5FD9}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/96_Word/csharp/word.sln b/96_Word/csharp/word.sln index 59bdec97..77360e81 100644 --- a/96_Word/csharp/word.sln +++ b/96_Word/csharp/word.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31321.278 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "word", "word.csproj", "{E2CF183B-EBC3-497C-8D34-32EBEE4E2B73}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Word", "Word.csproj", "{E2CF183B-EBC3-497C-8D34-32EBEE4E2B73}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/96_Word/vbnet/word.sln b/96_Word/vbnet/word.sln index 16584104..73674ee4 100644 --- a/96_Word/vbnet/word.sln +++ b/96_Word/vbnet/word.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31321.278 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "word", "word.vbproj", "{F0D2422C-983F-4DF3-9D17-D2480839DF07}" +Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Word", "Word.vbproj", "{F0D2422C-983F-4DF3-9D17-D2480839DF07}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution From 9b9e50549b9bccb06ed7baef195ab73b72413974 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 09:07:59 +0200 Subject: [PATCH 45/82] Simplify Bullfight (C#) folder structure --- 17_Bullfight/csharp/{src => }/Action.cs | 0 17_Bullfight/csharp/{src => }/ActionResult.cs | 0 17_Bullfight/csharp/{src => }/BullFight.cs | 0 17_Bullfight/csharp/{Game.csproj => Bullfight.csproj} | 0 17_Bullfight/csharp/Bullfight.sln | 10 +++++----- 17_Bullfight/csharp/{src => }/Controller.cs | 0 17_Bullfight/csharp/{src => }/Events/BullCharging.cs | 0 17_Bullfight/csharp/{src => }/Events/Event.cs | 0 17_Bullfight/csharp/{src => }/Events/MatchCompleted.cs | 0 17_Bullfight/csharp/{src => }/Events/MatchStarted.cs | 0 17_Bullfight/csharp/{src => }/Events/PlayerGored.cs | 0 17_Bullfight/csharp/{src => }/Events/PlayerSurvived.cs | 0 17_Bullfight/csharp/{src => }/Mediator.cs | 0 17_Bullfight/csharp/{src => }/Program.cs | 0 17_Bullfight/csharp/{src => }/Quality.cs | 0 17_Bullfight/csharp/{src => }/Reward.cs | 0 17_Bullfight/csharp/{src => }/RiskLevel.cs | 0 17_Bullfight/csharp/{src => }/View.cs | 0 18 files changed, 5 insertions(+), 5 deletions(-) rename 17_Bullfight/csharp/{src => }/Action.cs (100%) rename 17_Bullfight/csharp/{src => }/ActionResult.cs (100%) rename 17_Bullfight/csharp/{src => }/BullFight.cs (100%) rename 17_Bullfight/csharp/{Game.csproj => Bullfight.csproj} (100%) rename 17_Bullfight/csharp/{src => }/Controller.cs (100%) rename 17_Bullfight/csharp/{src => }/Events/BullCharging.cs (100%) rename 17_Bullfight/csharp/{src => }/Events/Event.cs (100%) rename 17_Bullfight/csharp/{src => }/Events/MatchCompleted.cs (100%) rename 17_Bullfight/csharp/{src => }/Events/MatchStarted.cs (100%) rename 17_Bullfight/csharp/{src => }/Events/PlayerGored.cs (100%) rename 17_Bullfight/csharp/{src => }/Events/PlayerSurvived.cs (100%) rename 17_Bullfight/csharp/{src => }/Mediator.cs (100%) rename 17_Bullfight/csharp/{src => }/Program.cs (100%) rename 17_Bullfight/csharp/{src => }/Quality.cs (100%) rename 17_Bullfight/csharp/{src => }/Reward.cs (100%) rename 17_Bullfight/csharp/{src => }/RiskLevel.cs (100%) rename 17_Bullfight/csharp/{src => }/View.cs (100%) diff --git a/17_Bullfight/csharp/src/Action.cs b/17_Bullfight/csharp/Action.cs similarity index 100% rename from 17_Bullfight/csharp/src/Action.cs rename to 17_Bullfight/csharp/Action.cs diff --git a/17_Bullfight/csharp/src/ActionResult.cs b/17_Bullfight/csharp/ActionResult.cs similarity index 100% rename from 17_Bullfight/csharp/src/ActionResult.cs rename to 17_Bullfight/csharp/ActionResult.cs diff --git a/17_Bullfight/csharp/src/BullFight.cs b/17_Bullfight/csharp/BullFight.cs similarity index 100% rename from 17_Bullfight/csharp/src/BullFight.cs rename to 17_Bullfight/csharp/BullFight.cs diff --git a/17_Bullfight/csharp/Game.csproj b/17_Bullfight/csharp/Bullfight.csproj similarity index 100% rename from 17_Bullfight/csharp/Game.csproj rename to 17_Bullfight/csharp/Bullfight.csproj diff --git a/17_Bullfight/csharp/Bullfight.sln b/17_Bullfight/csharp/Bullfight.sln index 29f5276f..8c819db1 100644 --- a/17_Bullfight/csharp/Bullfight.sln +++ b/17_Bullfight/csharp/Bullfight.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31321.278 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game", "Game.csproj", "{8F7C450E-5F3A-45BA-9DB9-329744214931}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bullfight", "Bullfight.csproj", "{502A672C-F7D7-4A85-973A-B5EA8761008A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8F7C450E-5F3A-45BA-9DB9-329744214931}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F7C450E-5F3A-45BA-9DB9-329744214931}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8F7C450E-5F3A-45BA-9DB9-329744214931}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8F7C450E-5F3A-45BA-9DB9-329744214931}.Release|Any CPU.Build.0 = Release|Any CPU + {502A672C-F7D7-4A85-973A-B5EA8761008A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {502A672C-F7D7-4A85-973A-B5EA8761008A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {502A672C-F7D7-4A85-973A-B5EA8761008A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {502A672C-F7D7-4A85-973A-B5EA8761008A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/17_Bullfight/csharp/src/Controller.cs b/17_Bullfight/csharp/Controller.cs similarity index 100% rename from 17_Bullfight/csharp/src/Controller.cs rename to 17_Bullfight/csharp/Controller.cs diff --git a/17_Bullfight/csharp/src/Events/BullCharging.cs b/17_Bullfight/csharp/Events/BullCharging.cs similarity index 100% rename from 17_Bullfight/csharp/src/Events/BullCharging.cs rename to 17_Bullfight/csharp/Events/BullCharging.cs diff --git a/17_Bullfight/csharp/src/Events/Event.cs b/17_Bullfight/csharp/Events/Event.cs similarity index 100% rename from 17_Bullfight/csharp/src/Events/Event.cs rename to 17_Bullfight/csharp/Events/Event.cs diff --git a/17_Bullfight/csharp/src/Events/MatchCompleted.cs b/17_Bullfight/csharp/Events/MatchCompleted.cs similarity index 100% rename from 17_Bullfight/csharp/src/Events/MatchCompleted.cs rename to 17_Bullfight/csharp/Events/MatchCompleted.cs diff --git a/17_Bullfight/csharp/src/Events/MatchStarted.cs b/17_Bullfight/csharp/Events/MatchStarted.cs similarity index 100% rename from 17_Bullfight/csharp/src/Events/MatchStarted.cs rename to 17_Bullfight/csharp/Events/MatchStarted.cs diff --git a/17_Bullfight/csharp/src/Events/PlayerGored.cs b/17_Bullfight/csharp/Events/PlayerGored.cs similarity index 100% rename from 17_Bullfight/csharp/src/Events/PlayerGored.cs rename to 17_Bullfight/csharp/Events/PlayerGored.cs diff --git a/17_Bullfight/csharp/src/Events/PlayerSurvived.cs b/17_Bullfight/csharp/Events/PlayerSurvived.cs similarity index 100% rename from 17_Bullfight/csharp/src/Events/PlayerSurvived.cs rename to 17_Bullfight/csharp/Events/PlayerSurvived.cs diff --git a/17_Bullfight/csharp/src/Mediator.cs b/17_Bullfight/csharp/Mediator.cs similarity index 100% rename from 17_Bullfight/csharp/src/Mediator.cs rename to 17_Bullfight/csharp/Mediator.cs diff --git a/17_Bullfight/csharp/src/Program.cs b/17_Bullfight/csharp/Program.cs similarity index 100% rename from 17_Bullfight/csharp/src/Program.cs rename to 17_Bullfight/csharp/Program.cs diff --git a/17_Bullfight/csharp/src/Quality.cs b/17_Bullfight/csharp/Quality.cs similarity index 100% rename from 17_Bullfight/csharp/src/Quality.cs rename to 17_Bullfight/csharp/Quality.cs diff --git a/17_Bullfight/csharp/src/Reward.cs b/17_Bullfight/csharp/Reward.cs similarity index 100% rename from 17_Bullfight/csharp/src/Reward.cs rename to 17_Bullfight/csharp/Reward.cs diff --git a/17_Bullfight/csharp/src/RiskLevel.cs b/17_Bullfight/csharp/RiskLevel.cs similarity index 100% rename from 17_Bullfight/csharp/src/RiskLevel.cs rename to 17_Bullfight/csharp/RiskLevel.cs diff --git a/17_Bullfight/csharp/src/View.cs b/17_Bullfight/csharp/View.cs similarity index 100% rename from 17_Bullfight/csharp/src/View.cs rename to 17_Bullfight/csharp/View.cs From a6f8686d6f821a21cdf430874301167f9d18c3f5 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 09:12:50 +0200 Subject: [PATCH 46/82] Simplify Combat (C#) folder structure --- 28_Combat/csharp/{src => }/ArmedForces.cs | 0 28_Combat/csharp/{src => }/Ceasefire.cs | 0 28_Combat/csharp/{Game.csproj => Combat.csproj} | 0 28_Combat/csharp/Combat.sln | 10 +++++----- 28_Combat/csharp/{src => }/Controller.cs | 0 28_Combat/csharp/{src => }/FinalCampaign.cs | 0 28_Combat/csharp/{src => }/InitialCampaign.cs | 0 28_Combat/csharp/{src => }/MilitaryBranch.cs | 0 28_Combat/csharp/{src => }/Program.cs | 0 28_Combat/csharp/{src => }/View.cs | 0 28_Combat/csharp/{src => }/WarResult.cs | 0 28_Combat/csharp/{src => }/WarState.cs | 0 12 files changed, 5 insertions(+), 5 deletions(-) rename 28_Combat/csharp/{src => }/ArmedForces.cs (100%) rename 28_Combat/csharp/{src => }/Ceasefire.cs (100%) rename 28_Combat/csharp/{Game.csproj => Combat.csproj} (100%) rename 28_Combat/csharp/{src => }/Controller.cs (100%) rename 28_Combat/csharp/{src => }/FinalCampaign.cs (100%) rename 28_Combat/csharp/{src => }/InitialCampaign.cs (100%) rename 28_Combat/csharp/{src => }/MilitaryBranch.cs (100%) rename 28_Combat/csharp/{src => }/Program.cs (100%) rename 28_Combat/csharp/{src => }/View.cs (100%) rename 28_Combat/csharp/{src => }/WarResult.cs (100%) rename 28_Combat/csharp/{src => }/WarState.cs (100%) diff --git a/28_Combat/csharp/src/ArmedForces.cs b/28_Combat/csharp/ArmedForces.cs similarity index 100% rename from 28_Combat/csharp/src/ArmedForces.cs rename to 28_Combat/csharp/ArmedForces.cs diff --git a/28_Combat/csharp/src/Ceasefire.cs b/28_Combat/csharp/Ceasefire.cs similarity index 100% rename from 28_Combat/csharp/src/Ceasefire.cs rename to 28_Combat/csharp/Ceasefire.cs diff --git a/28_Combat/csharp/Game.csproj b/28_Combat/csharp/Combat.csproj similarity index 100% rename from 28_Combat/csharp/Game.csproj rename to 28_Combat/csharp/Combat.csproj diff --git a/28_Combat/csharp/Combat.sln b/28_Combat/csharp/Combat.sln index 522b680e..99233316 100644 --- a/28_Combat/csharp/Combat.sln +++ b/28_Combat/csharp/Combat.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31321.278 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game", "Game.csproj", "{054A1718-1B7D-4954-81A7-EEA390713439}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Combat", "Combat.csproj", "{F7CEEC00-CF2C-436C-883B-55A20C21AB93}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {054A1718-1B7D-4954-81A7-EEA390713439}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {054A1718-1B7D-4954-81A7-EEA390713439}.Debug|Any CPU.Build.0 = Debug|Any CPU - {054A1718-1B7D-4954-81A7-EEA390713439}.Release|Any CPU.ActiveCfg = Release|Any CPU - {054A1718-1B7D-4954-81A7-EEA390713439}.Release|Any CPU.Build.0 = Release|Any CPU + {F7CEEC00-CF2C-436C-883B-55A20C21AB93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7CEEC00-CF2C-436C-883B-55A20C21AB93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7CEEC00-CF2C-436C-883B-55A20C21AB93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7CEEC00-CF2C-436C-883B-55A20C21AB93}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/28_Combat/csharp/src/Controller.cs b/28_Combat/csharp/Controller.cs similarity index 100% rename from 28_Combat/csharp/src/Controller.cs rename to 28_Combat/csharp/Controller.cs diff --git a/28_Combat/csharp/src/FinalCampaign.cs b/28_Combat/csharp/FinalCampaign.cs similarity index 100% rename from 28_Combat/csharp/src/FinalCampaign.cs rename to 28_Combat/csharp/FinalCampaign.cs diff --git a/28_Combat/csharp/src/InitialCampaign.cs b/28_Combat/csharp/InitialCampaign.cs similarity index 100% rename from 28_Combat/csharp/src/InitialCampaign.cs rename to 28_Combat/csharp/InitialCampaign.cs diff --git a/28_Combat/csharp/src/MilitaryBranch.cs b/28_Combat/csharp/MilitaryBranch.cs similarity index 100% rename from 28_Combat/csharp/src/MilitaryBranch.cs rename to 28_Combat/csharp/MilitaryBranch.cs diff --git a/28_Combat/csharp/src/Program.cs b/28_Combat/csharp/Program.cs similarity index 100% rename from 28_Combat/csharp/src/Program.cs rename to 28_Combat/csharp/Program.cs diff --git a/28_Combat/csharp/src/View.cs b/28_Combat/csharp/View.cs similarity index 100% rename from 28_Combat/csharp/src/View.cs rename to 28_Combat/csharp/View.cs diff --git a/28_Combat/csharp/src/WarResult.cs b/28_Combat/csharp/WarResult.cs similarity index 100% rename from 28_Combat/csharp/src/WarResult.cs rename to 28_Combat/csharp/WarResult.cs diff --git a/28_Combat/csharp/src/WarState.cs b/28_Combat/csharp/WarState.cs similarity index 100% rename from 28_Combat/csharp/src/WarState.cs rename to 28_Combat/csharp/WarState.cs From d9848543ee3caf89b52a0bf17ebeb50da0834c46 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 09:15:40 +0200 Subject: [PATCH 47/82] Simplify DepthCharge (C#) folder structure --- 31_Depth_Charge/csharp/{src => }/Controller.cs | 0 .../csharp/{Game.csproj => DepthCharge.csproj} | 0 31_Depth_Charge/csharp/DepthCharge.sln | 10 +++++----- 31_Depth_Charge/csharp/{src => }/Program.cs | 0 31_Depth_Charge/csharp/{src => }/View.cs | 0 5 files changed, 5 insertions(+), 5 deletions(-) rename 31_Depth_Charge/csharp/{src => }/Controller.cs (100%) rename 31_Depth_Charge/csharp/{Game.csproj => DepthCharge.csproj} (100%) rename 31_Depth_Charge/csharp/{src => }/Program.cs (100%) rename 31_Depth_Charge/csharp/{src => }/View.cs (100%) diff --git a/31_Depth_Charge/csharp/src/Controller.cs b/31_Depth_Charge/csharp/Controller.cs similarity index 100% rename from 31_Depth_Charge/csharp/src/Controller.cs rename to 31_Depth_Charge/csharp/Controller.cs diff --git a/31_Depth_Charge/csharp/Game.csproj b/31_Depth_Charge/csharp/DepthCharge.csproj similarity index 100% rename from 31_Depth_Charge/csharp/Game.csproj rename to 31_Depth_Charge/csharp/DepthCharge.csproj diff --git a/31_Depth_Charge/csharp/DepthCharge.sln b/31_Depth_Charge/csharp/DepthCharge.sln index 8d56c717..2f11d18c 100644 --- a/31_Depth_Charge/csharp/DepthCharge.sln +++ b/31_Depth_Charge/csharp/DepthCharge.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31129.286 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game", "Game.csproj", "{CBC9D8D9-9EDE-4D34-A20E-C90D929ABF8F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DepthCharge", "DepthCharge.csproj", "{15CF71F3-72F3-4C81-B54F-139F2A1E3920}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CBC9D8D9-9EDE-4D34-A20E-C90D929ABF8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CBC9D8D9-9EDE-4D34-A20E-C90D929ABF8F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CBC9D8D9-9EDE-4D34-A20E-C90D929ABF8F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CBC9D8D9-9EDE-4D34-A20E-C90D929ABF8F}.Release|Any CPU.Build.0 = Release|Any CPU + {15CF71F3-72F3-4C81-B54F-139F2A1E3920}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15CF71F3-72F3-4C81-B54F-139F2A1E3920}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15CF71F3-72F3-4C81-B54F-139F2A1E3920}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15CF71F3-72F3-4C81-B54F-139F2A1E3920}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/31_Depth_Charge/csharp/src/Program.cs b/31_Depth_Charge/csharp/Program.cs similarity index 100% rename from 31_Depth_Charge/csharp/src/Program.cs rename to 31_Depth_Charge/csharp/Program.cs diff --git a/31_Depth_Charge/csharp/src/View.cs b/31_Depth_Charge/csharp/View.cs similarity index 100% rename from 31_Depth_Charge/csharp/src/View.cs rename to 31_Depth_Charge/csharp/View.cs From ffd7a6dc665f3e930c0fea9ec33fd4e3631b4ff9 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 09:21:33 +0200 Subject: [PATCH 48/82] Simplify Hammurabi (C#) folder structure --- 43_Hammurabi/csharp/{src => }/ActionResult.cs | 0 43_Hammurabi/csharp/{src => }/Controller.cs | 0 43_Hammurabi/csharp/{src => }/GameResult.cs | 0 43_Hammurabi/csharp/{src => }/GameState.cs | 0 43_Hammurabi/csharp/{src => }/GreatOffence.cs | 0 .../csharp/{Game.csproj => Hammurabi.csproj} | 0 43_Hammurabi/csharp/Hammurabi.sln | 14 +++++++------- 43_Hammurabi/csharp/{src => }/PerformanceRating.cs | 0 43_Hammurabi/csharp/{src => }/Program.cs | 0 43_Hammurabi/csharp/{src => }/Rules.cs | 0 43_Hammurabi/csharp/{src => }/View.cs | 0 11 files changed, 7 insertions(+), 7 deletions(-) rename 43_Hammurabi/csharp/{src => }/ActionResult.cs (100%) rename 43_Hammurabi/csharp/{src => }/Controller.cs (100%) rename 43_Hammurabi/csharp/{src => }/GameResult.cs (100%) rename 43_Hammurabi/csharp/{src => }/GameState.cs (100%) rename 43_Hammurabi/csharp/{src => }/GreatOffence.cs (100%) rename 43_Hammurabi/csharp/{Game.csproj => Hammurabi.csproj} (100%) rename 43_Hammurabi/csharp/{src => }/PerformanceRating.cs (100%) rename 43_Hammurabi/csharp/{src => }/Program.cs (100%) rename 43_Hammurabi/csharp/{src => }/Rules.cs (100%) rename 43_Hammurabi/csharp/{src => }/View.cs (100%) diff --git a/43_Hammurabi/csharp/src/ActionResult.cs b/43_Hammurabi/csharp/ActionResult.cs similarity index 100% rename from 43_Hammurabi/csharp/src/ActionResult.cs rename to 43_Hammurabi/csharp/ActionResult.cs diff --git a/43_Hammurabi/csharp/src/Controller.cs b/43_Hammurabi/csharp/Controller.cs similarity index 100% rename from 43_Hammurabi/csharp/src/Controller.cs rename to 43_Hammurabi/csharp/Controller.cs diff --git a/43_Hammurabi/csharp/src/GameResult.cs b/43_Hammurabi/csharp/GameResult.cs similarity index 100% rename from 43_Hammurabi/csharp/src/GameResult.cs rename to 43_Hammurabi/csharp/GameResult.cs diff --git a/43_Hammurabi/csharp/src/GameState.cs b/43_Hammurabi/csharp/GameState.cs similarity index 100% rename from 43_Hammurabi/csharp/src/GameState.cs rename to 43_Hammurabi/csharp/GameState.cs diff --git a/43_Hammurabi/csharp/src/GreatOffence.cs b/43_Hammurabi/csharp/GreatOffence.cs similarity index 100% rename from 43_Hammurabi/csharp/src/GreatOffence.cs rename to 43_Hammurabi/csharp/GreatOffence.cs diff --git a/43_Hammurabi/csharp/Game.csproj b/43_Hammurabi/csharp/Hammurabi.csproj similarity index 100% rename from 43_Hammurabi/csharp/Game.csproj rename to 43_Hammurabi/csharp/Hammurabi.csproj diff --git a/43_Hammurabi/csharp/Hammurabi.sln b/43_Hammurabi/csharp/Hammurabi.sln index feeae212..7475f8fd 100644 --- a/43_Hammurabi/csharp/Hammurabi.sln +++ b/43_Hammurabi/csharp/Hammurabi.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31129.286 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game", "Game.csproj", "{20599300-7C6E-48A2-AB24-EC7CCF224A5C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hammurabi", "Hammurabi.csproj", "{2C4407AF-5ED6-4C9F-833E-35461DF7DBBB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {20599300-7C6E-48A2-AB24-EC7CCF224A5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {20599300-7C6E-48A2-AB24-EC7CCF224A5C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {20599300-7C6E-48A2-AB24-EC7CCF224A5C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {20599300-7C6E-48A2-AB24-EC7CCF224A5C}.Release|Any CPU.Build.0 = Release|Any CPU + {2C4407AF-5ED6-4C9F-833E-35461DF7DBBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C4407AF-5ED6-4C9F-833E-35461DF7DBBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C4407AF-5ED6-4C9F-833E-35461DF7DBBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C4407AF-5ED6-4C9F-833E-35461DF7DBBB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/43_Hammurabi/csharp/src/PerformanceRating.cs b/43_Hammurabi/csharp/PerformanceRating.cs similarity index 100% rename from 43_Hammurabi/csharp/src/PerformanceRating.cs rename to 43_Hammurabi/csharp/PerformanceRating.cs diff --git a/43_Hammurabi/csharp/src/Program.cs b/43_Hammurabi/csharp/Program.cs similarity index 100% rename from 43_Hammurabi/csharp/src/Program.cs rename to 43_Hammurabi/csharp/Program.cs diff --git a/43_Hammurabi/csharp/src/Rules.cs b/43_Hammurabi/csharp/Rules.cs similarity index 100% rename from 43_Hammurabi/csharp/src/Rules.cs rename to 43_Hammurabi/csharp/Rules.cs diff --git a/43_Hammurabi/csharp/src/View.cs b/43_Hammurabi/csharp/View.cs similarity index 100% rename from 43_Hammurabi/csharp/src/View.cs rename to 43_Hammurabi/csharp/View.cs From 9a23ff72952f4fd2e176da0ad550f97d352453e3 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 10:48:54 +0200 Subject: [PATCH 49/82] Simplify Hexapawn (C#) folder structure --- 46_Hexapawn/csharp/{Hexapawn => }/Board.cs | 0 46_Hexapawn/csharp/{Hexapawn => }/Cell.cs | 0 46_Hexapawn/csharp/{Hexapawn => }/Computer.cs | 0 46_Hexapawn/csharp/{Hexapawn => }/Game.cs | 0 .../csharp/{Hexapawn => }/GameSeries.cs | 0 .../csharp/{Hexapawn => }/Hexapawn.csproj | 0 46_Hexapawn/csharp/Hexapawn.sln | 31 +++++++------------ 46_Hexapawn/csharp/{Hexapawn => }/Human.cs | 0 46_Hexapawn/csharp/{Hexapawn => }/IPlayer.cs | 0 46_Hexapawn/csharp/{Hexapawn => }/Input.cs | 0 46_Hexapawn/csharp/{Hexapawn => }/Move.cs | 0 46_Hexapawn/csharp/{Hexapawn => }/Pawn.cs | 0 46_Hexapawn/csharp/{Hexapawn => }/Program.cs | 0 13 files changed, 11 insertions(+), 20 deletions(-) rename 46_Hexapawn/csharp/{Hexapawn => }/Board.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/Cell.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/Computer.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/Game.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/GameSeries.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/Hexapawn.csproj (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/Human.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/IPlayer.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/Input.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/Move.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/Pawn.cs (100%) rename 46_Hexapawn/csharp/{Hexapawn => }/Program.cs (100%) diff --git a/46_Hexapawn/csharp/Hexapawn/Board.cs b/46_Hexapawn/csharp/Board.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Board.cs rename to 46_Hexapawn/csharp/Board.cs diff --git a/46_Hexapawn/csharp/Hexapawn/Cell.cs b/46_Hexapawn/csharp/Cell.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Cell.cs rename to 46_Hexapawn/csharp/Cell.cs diff --git a/46_Hexapawn/csharp/Hexapawn/Computer.cs b/46_Hexapawn/csharp/Computer.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Computer.cs rename to 46_Hexapawn/csharp/Computer.cs diff --git a/46_Hexapawn/csharp/Hexapawn/Game.cs b/46_Hexapawn/csharp/Game.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Game.cs rename to 46_Hexapawn/csharp/Game.cs diff --git a/46_Hexapawn/csharp/Hexapawn/GameSeries.cs b/46_Hexapawn/csharp/GameSeries.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/GameSeries.cs rename to 46_Hexapawn/csharp/GameSeries.cs diff --git a/46_Hexapawn/csharp/Hexapawn/Hexapawn.csproj b/46_Hexapawn/csharp/Hexapawn.csproj similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Hexapawn.csproj rename to 46_Hexapawn/csharp/Hexapawn.csproj diff --git a/46_Hexapawn/csharp/Hexapawn.sln b/46_Hexapawn/csharp/Hexapawn.sln index 6cfc8a8f..06e7b32f 100644 --- a/46_Hexapawn/csharp/Hexapawn.sln +++ b/46_Hexapawn/csharp/Hexapawn.sln @@ -1,34 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hexapawn", "Hexapawn\Hexapawn.csproj", "{679D95BE-6E0C-4D8C-A2D4-0957576B63F3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hexapawn", "Hexapawn.csproj", "{785DA416-2609-4DB1-9F18-63CF6AC9927E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {785DA416-2609-4DB1-9F18-63CF6AC9927E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {785DA416-2609-4DB1-9F18-63CF6AC9927E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {785DA416-2609-4DB1-9F18-63CF6AC9927E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {785DA416-2609-4DB1-9F18-63CF6AC9927E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Debug|x64.ActiveCfg = Debug|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Debug|x64.Build.0 = Debug|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Debug|x86.ActiveCfg = Debug|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Debug|x86.Build.0 = Debug|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Release|Any CPU.Build.0 = Release|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Release|x64.ActiveCfg = Release|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Release|x64.Build.0 = Release|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Release|x86.ActiveCfg = Release|Any CPU - {679D95BE-6E0C-4D8C-A2D4-0957576B63F3}.Release|x86.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D662AD9F-88B1-4AC9-83AD-DBFC08F384A8} EndGlobalSection EndGlobal diff --git a/46_Hexapawn/csharp/Hexapawn/Human.cs b/46_Hexapawn/csharp/Human.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Human.cs rename to 46_Hexapawn/csharp/Human.cs diff --git a/46_Hexapawn/csharp/Hexapawn/IPlayer.cs b/46_Hexapawn/csharp/IPlayer.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/IPlayer.cs rename to 46_Hexapawn/csharp/IPlayer.cs diff --git a/46_Hexapawn/csharp/Hexapawn/Input.cs b/46_Hexapawn/csharp/Input.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Input.cs rename to 46_Hexapawn/csharp/Input.cs diff --git a/46_Hexapawn/csharp/Hexapawn/Move.cs b/46_Hexapawn/csharp/Move.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Move.cs rename to 46_Hexapawn/csharp/Move.cs diff --git a/46_Hexapawn/csharp/Hexapawn/Pawn.cs b/46_Hexapawn/csharp/Pawn.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Pawn.cs rename to 46_Hexapawn/csharp/Pawn.cs diff --git a/46_Hexapawn/csharp/Hexapawn/Program.cs b/46_Hexapawn/csharp/Program.cs similarity index 100% rename from 46_Hexapawn/csharp/Hexapawn/Program.cs rename to 46_Hexapawn/csharp/Program.cs From ae5a96d400fe881737a3a8ccbf5b808f95e935b3 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 11:09:11 +0200 Subject: [PATCH 50/82] Simplify Hurkle (C#) folder structure --- .../{src/hurkle => }/CardinalDirection.cs | 0 .../{src/hurkle => }/ConsoleHurkleView.cs | 0 .../{src/hurkle => }/FailedGuessViewModel.cs | 0 .../csharp/{src/hurkle => }/GamePoint.cs | 0 .../csharp/{src/hurkle => }/GuessViewModel.cs | 0 .../hurkle/hurkle.csproj => Hurkle.csproj} | 16 +-- 51_Hurkle/csharp/Hurkle.sln | 20 ++- .../csharp/{src/hurkle => }/HurkleGame.cs | 0 .../csharp/{src/hurkle => }/IHurkleView.cs | 0 .../csharp/{src/hurkle => }/LossViewModel.cs | 0 51_Hurkle/csharp/{src/hurkle => }/Program.cs | 128 +++++++++--------- .../{src/hurkle => }/VictoryViewModel.cs | 0 12 files changed, 81 insertions(+), 83 deletions(-) rename 51_Hurkle/csharp/{src/hurkle => }/CardinalDirection.cs (100%) rename 51_Hurkle/csharp/{src/hurkle => }/ConsoleHurkleView.cs (100%) rename 51_Hurkle/csharp/{src/hurkle => }/FailedGuessViewModel.cs (100%) rename 51_Hurkle/csharp/{src/hurkle => }/GamePoint.cs (100%) rename 51_Hurkle/csharp/{src/hurkle => }/GuessViewModel.cs (100%) rename 51_Hurkle/csharp/{src/hurkle/hurkle.csproj => Hurkle.csproj} (95%) rename 51_Hurkle/csharp/{src/hurkle => }/HurkleGame.cs (100%) rename 51_Hurkle/csharp/{src/hurkle => }/IHurkleView.cs (100%) rename 51_Hurkle/csharp/{src/hurkle => }/LossViewModel.cs (100%) rename 51_Hurkle/csharp/{src/hurkle => }/Program.cs (97%) rename 51_Hurkle/csharp/{src/hurkle => }/VictoryViewModel.cs (100%) diff --git a/51_Hurkle/csharp/src/hurkle/CardinalDirection.cs b/51_Hurkle/csharp/CardinalDirection.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/CardinalDirection.cs rename to 51_Hurkle/csharp/CardinalDirection.cs diff --git a/51_Hurkle/csharp/src/hurkle/ConsoleHurkleView.cs b/51_Hurkle/csharp/ConsoleHurkleView.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/ConsoleHurkleView.cs rename to 51_Hurkle/csharp/ConsoleHurkleView.cs diff --git a/51_Hurkle/csharp/src/hurkle/FailedGuessViewModel.cs b/51_Hurkle/csharp/FailedGuessViewModel.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/FailedGuessViewModel.cs rename to 51_Hurkle/csharp/FailedGuessViewModel.cs diff --git a/51_Hurkle/csharp/src/hurkle/GamePoint.cs b/51_Hurkle/csharp/GamePoint.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/GamePoint.cs rename to 51_Hurkle/csharp/GamePoint.cs diff --git a/51_Hurkle/csharp/src/hurkle/GuessViewModel.cs b/51_Hurkle/csharp/GuessViewModel.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/GuessViewModel.cs rename to 51_Hurkle/csharp/GuessViewModel.cs diff --git a/51_Hurkle/csharp/src/hurkle/hurkle.csproj b/51_Hurkle/csharp/Hurkle.csproj similarity index 95% rename from 51_Hurkle/csharp/src/hurkle/hurkle.csproj rename to 51_Hurkle/csharp/Hurkle.csproj index 1d2d39a9..20827042 100644 --- a/51_Hurkle/csharp/src/hurkle/hurkle.csproj +++ b/51_Hurkle/csharp/Hurkle.csproj @@ -1,8 +1,8 @@ - - - - Exe - net5.0 - - - + + + + Exe + net5.0 + + + diff --git a/51_Hurkle/csharp/Hurkle.sln b/51_Hurkle/csharp/Hurkle.sln index e1792677..d1a6fb25 100644 --- a/51_Hurkle/csharp/Hurkle.sln +++ b/51_Hurkle/csharp/Hurkle.sln @@ -3,25 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EBE7BC2B-8F2E-41D5-AF36-7AAC7CE0E1BF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hurkle", "src\hurkle\hurkle.csproj", "{47578EC1-A012-4BF7-8709-64F675E72DB0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hurkle", "Hurkle.csproj", "{BE321D5B-93BD-4F91-A875-564DC9D4094F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BE321D5B-93BD-4F91-A875-564DC9D4094F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE321D5B-93BD-4F91-A875-564DC9D4094F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE321D5B-93BD-4F91-A875-564DC9D4094F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE321D5B-93BD-4F91-A875-564DC9D4094F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {47578EC1-A012-4BF7-8709-64F675E72DB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {47578EC1-A012-4BF7-8709-64F675E72DB0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {47578EC1-A012-4BF7-8709-64F675E72DB0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {47578EC1-A012-4BF7-8709-64F675E72DB0}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {47578EC1-A012-4BF7-8709-64F675E72DB0} = {EBE7BC2B-8F2E-41D5-AF36-7AAC7CE0E1BF} + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {42DC6AE5-5127-4B1B-BD5E-F3B1CCDC3822} EndGlobalSection EndGlobal diff --git a/51_Hurkle/csharp/src/hurkle/HurkleGame.cs b/51_Hurkle/csharp/HurkleGame.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/HurkleGame.cs rename to 51_Hurkle/csharp/HurkleGame.cs diff --git a/51_Hurkle/csharp/src/hurkle/IHurkleView.cs b/51_Hurkle/csharp/IHurkleView.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/IHurkleView.cs rename to 51_Hurkle/csharp/IHurkleView.cs diff --git a/51_Hurkle/csharp/src/hurkle/LossViewModel.cs b/51_Hurkle/csharp/LossViewModel.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/LossViewModel.cs rename to 51_Hurkle/csharp/LossViewModel.cs diff --git a/51_Hurkle/csharp/src/hurkle/Program.cs b/51_Hurkle/csharp/Program.cs similarity index 97% rename from 51_Hurkle/csharp/src/hurkle/Program.cs rename to 51_Hurkle/csharp/Program.cs index 148308d1..e5c3f6af 100644 --- a/51_Hurkle/csharp/src/hurkle/Program.cs +++ b/51_Hurkle/csharp/Program.cs @@ -1,64 +1,64 @@ -using System; - -namespace hurkle -{ - class Program - { - static void Main(string[] args) - { - /* - Original source transscription - 10 PRINT TAB(33);"HURKLE" - 20 PRINT TAB(15);"CREATIVE COMPUTING NORRISTOWN, NEW JERSEY" - 30 PRINT;PRINT;PRINT - */ - Console.WriteLine(new string(' ', 33) + @"HURKLE"); - Console.WriteLine(new string(' ', 15) + @"CREATIVE COMPUTING NORRISTOWN, NEW JERSEY"); - /* - 110 N=5 - 120 G=10 - */ - var N=5; - var G=10; - /* - 210 PRINT - 220 PRINT "A HURKLE IS HIDING ON A";G;"BY";G;"GRID. HOMEBASE" - 230 PRINT "ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A" - 240 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO" - 250 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET";N;"TRIES." - 260 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE" - 270 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE." - 280 PRINT - */ - // Using string formatting via the '$' string - Console.WriteLine(); - Console.WriteLine($"A HURKLE IS HIDING ON A {G} BY {G} GRID. HOMEBASE"); - Console.WriteLine(@"ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A"); - Console.WriteLine(@"PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO"); - Console.WriteLine($"GUESS THE HURKLE'S GRIDPOINT. YOU GET {N} TRIES."); - Console.WriteLine(@"AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE"); - Console.WriteLine(@"DIRECTION TO GO TO LOOK FOR THE HURKLE."); - Console.WriteLine(); - - var view = new ConsoleHurkleView(); - var hurkle = new HurkleGame(N,G, view); - while(true) - { - hurkle.PlayGame(); - - Console.WriteLine("PLAY AGAIN? (Y)ES/(N)O"); - var playAgainResponse = Console.ReadLine(); - if(playAgainResponse.Trim().StartsWith("y", StringComparison.InvariantCultureIgnoreCase)) - { - Console.WriteLine(); - Console.WriteLine("LET'S PLAY AGAIN. HURKLE IS HIDING"); - Console.WriteLine(); - }else{ - Console.WriteLine("THANKS FOR PLAYING!"); - break; - } - - } - } - } -} +using System; + +namespace hurkle +{ + class Program + { + static void Main(string[] args) + { + /* + Original source transscription + 10 PRINT TAB(33);"HURKLE" + 20 PRINT TAB(15);"CREATIVE COMPUTING NORRISTOWN, NEW JERSEY" + 30 PRINT;PRINT;PRINT + */ + Console.WriteLine(new string(' ', 33) + @"HURKLE"); + Console.WriteLine(new string(' ', 15) + @"CREATIVE COMPUTING NORRISTOWN, NEW JERSEY"); + /* + 110 N=5 + 120 G=10 + */ + var N=5; + var G=10; + /* + 210 PRINT + 220 PRINT "A HURKLE IS HIDING ON A";G;"BY";G;"GRID. HOMEBASE" + 230 PRINT "ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A" + 240 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO" + 250 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET";N;"TRIES." + 260 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE" + 270 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE." + 280 PRINT + */ + // Using string formatting via the '$' string + Console.WriteLine(); + Console.WriteLine($"A HURKLE IS HIDING ON A {G} BY {G} GRID. HOMEBASE"); + Console.WriteLine(@"ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A"); + Console.WriteLine(@"PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO"); + Console.WriteLine($"GUESS THE HURKLE'S GRIDPOINT. YOU GET {N} TRIES."); + Console.WriteLine(@"AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE"); + Console.WriteLine(@"DIRECTION TO GO TO LOOK FOR THE HURKLE."); + Console.WriteLine(); + + var view = new ConsoleHurkleView(); + var hurkle = new HurkleGame(N,G, view); + while(true) + { + hurkle.PlayGame(); + + Console.WriteLine("PLAY AGAIN? (Y)ES/(N)O"); + var playAgainResponse = Console.ReadLine(); + if(playAgainResponse.Trim().StartsWith("y", StringComparison.InvariantCultureIgnoreCase)) + { + Console.WriteLine(); + Console.WriteLine("LET'S PLAY AGAIN. HURKLE IS HIDING"); + Console.WriteLine(); + }else{ + Console.WriteLine("THANKS FOR PLAYING!"); + break; + } + + } + } + } +} diff --git a/51_Hurkle/csharp/src/hurkle/VictoryViewModel.cs b/51_Hurkle/csharp/VictoryViewModel.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/VictoryViewModel.cs rename to 51_Hurkle/csharp/VictoryViewModel.cs From 6504a1f26ebec68ac1daec8280832a943f248582 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 11:12:56 +0200 Subject: [PATCH 51/82] Simplify Love (C#) folder structure --- 58_Love/csharp/{Love => }/Input.cs | 0 58_Love/csharp/{Love => }/Love.csproj | 0 58_Love/csharp/Love.sln | 31 +++++++------------ 58_Love/csharp/{Love => }/LovePattern.cs | 0 58_Love/csharp/{Love => }/Program.cs | 0 58_Love/csharp/{Love => }/SourceCharacters.cs | 0 58_Love/csharp/{Love => }/Strings/Intro.txt | 0 7 files changed, 11 insertions(+), 20 deletions(-) rename 58_Love/csharp/{Love => }/Input.cs (100%) rename 58_Love/csharp/{Love => }/Love.csproj (100%) rename 58_Love/csharp/{Love => }/LovePattern.cs (100%) rename 58_Love/csharp/{Love => }/Program.cs (100%) rename 58_Love/csharp/{Love => }/SourceCharacters.cs (100%) rename 58_Love/csharp/{Love => }/Strings/Intro.txt (100%) diff --git a/58_Love/csharp/Love/Input.cs b/58_Love/csharp/Input.cs similarity index 100% rename from 58_Love/csharp/Love/Input.cs rename to 58_Love/csharp/Input.cs diff --git a/58_Love/csharp/Love/Love.csproj b/58_Love/csharp/Love.csproj similarity index 100% rename from 58_Love/csharp/Love/Love.csproj rename to 58_Love/csharp/Love.csproj diff --git a/58_Love/csharp/Love.sln b/58_Love/csharp/Love.sln index a89fd1d8..813af0f2 100644 --- a/58_Love/csharp/Love.sln +++ b/58_Love/csharp/Love.sln @@ -1,34 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Love", "Love\Love.csproj", "{FC74E025-A50D-4E19-9337-87F2E4A9F83E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Love", "Love.csproj", "{1C02A3CA-615B-42CF-B696-4514770CA67F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1C02A3CA-615B-42CF-B696-4514770CA67F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C02A3CA-615B-42CF-B696-4514770CA67F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C02A3CA-615B-42CF-B696-4514770CA67F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C02A3CA-615B-42CF-B696-4514770CA67F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Debug|x64.ActiveCfg = Debug|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Debug|x64.Build.0 = Debug|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Debug|x86.ActiveCfg = Debug|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Debug|x86.Build.0 = Debug|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Release|Any CPU.Build.0 = Release|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Release|x64.ActiveCfg = Release|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Release|x64.Build.0 = Release|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Release|x86.ActiveCfg = Release|Any CPU - {FC74E025-A50D-4E19-9337-87F2E4A9F83E}.Release|x86.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F9C55508-108B-4EA1-ADD7-4BA8EC915E68} EndGlobalSection EndGlobal diff --git a/58_Love/csharp/Love/LovePattern.cs b/58_Love/csharp/LovePattern.cs similarity index 100% rename from 58_Love/csharp/Love/LovePattern.cs rename to 58_Love/csharp/LovePattern.cs diff --git a/58_Love/csharp/Love/Program.cs b/58_Love/csharp/Program.cs similarity index 100% rename from 58_Love/csharp/Love/Program.cs rename to 58_Love/csharp/Program.cs diff --git a/58_Love/csharp/Love/SourceCharacters.cs b/58_Love/csharp/SourceCharacters.cs similarity index 100% rename from 58_Love/csharp/Love/SourceCharacters.cs rename to 58_Love/csharp/SourceCharacters.cs diff --git a/58_Love/csharp/Love/Strings/Intro.txt b/58_Love/csharp/Strings/Intro.txt similarity index 100% rename from 58_Love/csharp/Love/Strings/Intro.txt rename to 58_Love/csharp/Strings/Intro.txt From 58cac7061d18d6febee843cfb91b7ae63616afc5 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 11:48:01 +0200 Subject: [PATCH 52/82] Simplify Mastermind (C#) folder structure --- 60_Mastermind/csharp/{Game/src => }/Code.cs | 0 60_Mastermind/csharp/{Game/src => }/CodeFactory.cs | 0 60_Mastermind/csharp/{Game/src => }/ColorInfo.cs | 0 60_Mastermind/csharp/{Game/src => }/Colors.cs | 0 60_Mastermind/csharp/{Game/src => }/Command.cs | 0 60_Mastermind/csharp/{Game/src => }/Controller.cs | 0 .../csharp/{Game/src => }/EnumerableExtensions.cs | 0 .../csharp/{Game/Game.csproj => Mastermind.csproj} | 0 60_Mastermind/csharp/Mastermind.sln | 14 +++++++------- 60_Mastermind/csharp/{Game/src => }/Program.cs | 0 60_Mastermind/csharp/{Game/src => }/TurnResult.cs | 0 60_Mastermind/csharp/{Game/src => }/View.cs | 0 12 files changed, 7 insertions(+), 7 deletions(-) rename 60_Mastermind/csharp/{Game/src => }/Code.cs (100%) rename 60_Mastermind/csharp/{Game/src => }/CodeFactory.cs (100%) rename 60_Mastermind/csharp/{Game/src => }/ColorInfo.cs (100%) rename 60_Mastermind/csharp/{Game/src => }/Colors.cs (100%) rename 60_Mastermind/csharp/{Game/src => }/Command.cs (100%) rename 60_Mastermind/csharp/{Game/src => }/Controller.cs (100%) rename 60_Mastermind/csharp/{Game/src => }/EnumerableExtensions.cs (100%) rename 60_Mastermind/csharp/{Game/Game.csproj => Mastermind.csproj} (100%) rename 60_Mastermind/csharp/{Game/src => }/Program.cs (100%) rename 60_Mastermind/csharp/{Game/src => }/TurnResult.cs (100%) rename 60_Mastermind/csharp/{Game/src => }/View.cs (100%) diff --git a/60_Mastermind/csharp/Game/src/Code.cs b/60_Mastermind/csharp/Code.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/Code.cs rename to 60_Mastermind/csharp/Code.cs diff --git a/60_Mastermind/csharp/Game/src/CodeFactory.cs b/60_Mastermind/csharp/CodeFactory.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/CodeFactory.cs rename to 60_Mastermind/csharp/CodeFactory.cs diff --git a/60_Mastermind/csharp/Game/src/ColorInfo.cs b/60_Mastermind/csharp/ColorInfo.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/ColorInfo.cs rename to 60_Mastermind/csharp/ColorInfo.cs diff --git a/60_Mastermind/csharp/Game/src/Colors.cs b/60_Mastermind/csharp/Colors.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/Colors.cs rename to 60_Mastermind/csharp/Colors.cs diff --git a/60_Mastermind/csharp/Game/src/Command.cs b/60_Mastermind/csharp/Command.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/Command.cs rename to 60_Mastermind/csharp/Command.cs diff --git a/60_Mastermind/csharp/Game/src/Controller.cs b/60_Mastermind/csharp/Controller.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/Controller.cs rename to 60_Mastermind/csharp/Controller.cs diff --git a/60_Mastermind/csharp/Game/src/EnumerableExtensions.cs b/60_Mastermind/csharp/EnumerableExtensions.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/EnumerableExtensions.cs rename to 60_Mastermind/csharp/EnumerableExtensions.cs diff --git a/60_Mastermind/csharp/Game/Game.csproj b/60_Mastermind/csharp/Mastermind.csproj similarity index 100% rename from 60_Mastermind/csharp/Game/Game.csproj rename to 60_Mastermind/csharp/Mastermind.csproj diff --git a/60_Mastermind/csharp/Mastermind.sln b/60_Mastermind/csharp/Mastermind.sln index c3827fb7..0da53b6d 100644 --- a/60_Mastermind/csharp/Mastermind.sln +++ b/60_Mastermind/csharp/Mastermind.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31321.278 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game", "Game\Game.csproj", "{E8D63140-971D-4FBF-8138-964E54CCB7DD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mastermind", "Mastermind.csproj", "{AEC839CD-C6D3-4476-AA85-79B160AF78BE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E8D63140-971D-4FBF-8138-964E54CCB7DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E8D63140-971D-4FBF-8138-964E54CCB7DD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E8D63140-971D-4FBF-8138-964E54CCB7DD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E8D63140-971D-4FBF-8138-964E54CCB7DD}.Release|Any CPU.Build.0 = Release|Any CPU + {AEC839CD-C6D3-4476-AA85-79B160AF78BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AEC839CD-C6D3-4476-AA85-79B160AF78BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AEC839CD-C6D3-4476-AA85-79B160AF78BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AEC839CD-C6D3-4476-AA85-79B160AF78BE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/60_Mastermind/csharp/Game/src/Program.cs b/60_Mastermind/csharp/Program.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/Program.cs rename to 60_Mastermind/csharp/Program.cs diff --git a/60_Mastermind/csharp/Game/src/TurnResult.cs b/60_Mastermind/csharp/TurnResult.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/TurnResult.cs rename to 60_Mastermind/csharp/TurnResult.cs diff --git a/60_Mastermind/csharp/Game/src/View.cs b/60_Mastermind/csharp/View.cs similarity index 100% rename from 60_Mastermind/csharp/Game/src/View.cs rename to 60_Mastermind/csharp/View.cs From 18d8903b26f7b2ce2ed36d9c05ee07e563d89e78 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 11:50:17 +0200 Subject: [PATCH 53/82] Simplify Mugwump (C#) folder structure --- 62_Mugwump/csharp/{Mugwump => }/Game.cs | 0 62_Mugwump/csharp/{Mugwump => }/Grid.cs | 0 62_Mugwump/csharp/{Mugwump => }/Input.cs | 0 62_Mugwump/csharp/{Mugwump => }/Mugwump.cs | 0 .../csharp/{Mugwump => }/Mugwump.csproj | 0 62_Mugwump/csharp/Mugwump.sln | 31 +++++++------------ 62_Mugwump/csharp/{Mugwump => }/Offset.cs | 0 62_Mugwump/csharp/{Mugwump => }/Position.cs | 0 62_Mugwump/csharp/{Mugwump => }/Program.cs | 0 .../csharp/{Mugwump => }/Strings/Intro.txt | 0 10 files changed, 11 insertions(+), 20 deletions(-) rename 62_Mugwump/csharp/{Mugwump => }/Game.cs (100%) rename 62_Mugwump/csharp/{Mugwump => }/Grid.cs (100%) rename 62_Mugwump/csharp/{Mugwump => }/Input.cs (100%) rename 62_Mugwump/csharp/{Mugwump => }/Mugwump.cs (100%) rename 62_Mugwump/csharp/{Mugwump => }/Mugwump.csproj (100%) rename 62_Mugwump/csharp/{Mugwump => }/Offset.cs (100%) rename 62_Mugwump/csharp/{Mugwump => }/Position.cs (100%) rename 62_Mugwump/csharp/{Mugwump => }/Program.cs (100%) rename 62_Mugwump/csharp/{Mugwump => }/Strings/Intro.txt (100%) diff --git a/62_Mugwump/csharp/Mugwump/Game.cs b/62_Mugwump/csharp/Game.cs similarity index 100% rename from 62_Mugwump/csharp/Mugwump/Game.cs rename to 62_Mugwump/csharp/Game.cs diff --git a/62_Mugwump/csharp/Mugwump/Grid.cs b/62_Mugwump/csharp/Grid.cs similarity index 100% rename from 62_Mugwump/csharp/Mugwump/Grid.cs rename to 62_Mugwump/csharp/Grid.cs diff --git a/62_Mugwump/csharp/Mugwump/Input.cs b/62_Mugwump/csharp/Input.cs similarity index 100% rename from 62_Mugwump/csharp/Mugwump/Input.cs rename to 62_Mugwump/csharp/Input.cs diff --git a/62_Mugwump/csharp/Mugwump/Mugwump.cs b/62_Mugwump/csharp/Mugwump.cs similarity index 100% rename from 62_Mugwump/csharp/Mugwump/Mugwump.cs rename to 62_Mugwump/csharp/Mugwump.cs diff --git a/62_Mugwump/csharp/Mugwump/Mugwump.csproj b/62_Mugwump/csharp/Mugwump.csproj similarity index 100% rename from 62_Mugwump/csharp/Mugwump/Mugwump.csproj rename to 62_Mugwump/csharp/Mugwump.csproj diff --git a/62_Mugwump/csharp/Mugwump.sln b/62_Mugwump/csharp/Mugwump.sln index bc3cfbff..ab99858a 100644 --- a/62_Mugwump/csharp/Mugwump.sln +++ b/62_Mugwump/csharp/Mugwump.sln @@ -1,34 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mugwump", "Mugwump\Mugwump.csproj", "{83F42802-4E7C-49B5-A022-DB9B6A65F2C6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mugwump", "Mugwump.csproj", "{DB23BDB0-10A4-4771-B942-E646A1A5C416}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB23BDB0-10A4-4771-B942-E646A1A5C416}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB23BDB0-10A4-4771-B942-E646A1A5C416}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB23BDB0-10A4-4771-B942-E646A1A5C416}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB23BDB0-10A4-4771-B942-E646A1A5C416}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Debug|x64.ActiveCfg = Debug|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Debug|x64.Build.0 = Debug|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Debug|x86.ActiveCfg = Debug|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Debug|x86.Build.0 = Debug|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Release|Any CPU.Build.0 = Release|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Release|x64.ActiveCfg = Release|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Release|x64.Build.0 = Release|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Release|x86.ActiveCfg = Release|Any CPU - {83F42802-4E7C-49B5-A022-DB9B6A65F2C6}.Release|x86.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1FE34948-9066-4F57-A4C1-423293A430C5} EndGlobalSection EndGlobal diff --git a/62_Mugwump/csharp/Mugwump/Offset.cs b/62_Mugwump/csharp/Offset.cs similarity index 100% rename from 62_Mugwump/csharp/Mugwump/Offset.cs rename to 62_Mugwump/csharp/Offset.cs diff --git a/62_Mugwump/csharp/Mugwump/Position.cs b/62_Mugwump/csharp/Position.cs similarity index 100% rename from 62_Mugwump/csharp/Mugwump/Position.cs rename to 62_Mugwump/csharp/Position.cs diff --git a/62_Mugwump/csharp/Mugwump/Program.cs b/62_Mugwump/csharp/Program.cs similarity index 100% rename from 62_Mugwump/csharp/Mugwump/Program.cs rename to 62_Mugwump/csharp/Program.cs diff --git a/62_Mugwump/csharp/Mugwump/Strings/Intro.txt b/62_Mugwump/csharp/Strings/Intro.txt similarity index 100% rename from 62_Mugwump/csharp/Mugwump/Strings/Intro.txt rename to 62_Mugwump/csharp/Strings/Intro.txt From d7ad215070f1eb60a3e5b88bd01d51689c7f0625 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 11:52:48 +0200 Subject: [PATCH 54/82] Simplify Stars (C#) folder structure --- 82_Stars/csharp/{Stars => }/Game.cs | 0 82_Stars/csharp/{Stars => }/Input.cs | 0 82_Stars/csharp/{Stars => }/Program.cs | 0 82_Stars/csharp/{Stars => }/Stars.csproj | 0 82_Stars/csharp/Stars.sln | 31 +++++++++--------------- 5 files changed, 11 insertions(+), 20 deletions(-) rename 82_Stars/csharp/{Stars => }/Game.cs (100%) rename 82_Stars/csharp/{Stars => }/Input.cs (100%) rename 82_Stars/csharp/{Stars => }/Program.cs (100%) rename 82_Stars/csharp/{Stars => }/Stars.csproj (100%) diff --git a/82_Stars/csharp/Stars/Game.cs b/82_Stars/csharp/Game.cs similarity index 100% rename from 82_Stars/csharp/Stars/Game.cs rename to 82_Stars/csharp/Game.cs diff --git a/82_Stars/csharp/Stars/Input.cs b/82_Stars/csharp/Input.cs similarity index 100% rename from 82_Stars/csharp/Stars/Input.cs rename to 82_Stars/csharp/Input.cs diff --git a/82_Stars/csharp/Stars/Program.cs b/82_Stars/csharp/Program.cs similarity index 100% rename from 82_Stars/csharp/Stars/Program.cs rename to 82_Stars/csharp/Program.cs diff --git a/82_Stars/csharp/Stars/Stars.csproj b/82_Stars/csharp/Stars.csproj similarity index 100% rename from 82_Stars/csharp/Stars/Stars.csproj rename to 82_Stars/csharp/Stars.csproj diff --git a/82_Stars/csharp/Stars.sln b/82_Stars/csharp/Stars.sln index 5f85e6b7..19c3a265 100644 --- a/82_Stars/csharp/Stars.sln +++ b/82_Stars/csharp/Stars.sln @@ -1,34 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stars", "Stars\Stars.csproj", "{5832C21C-4DE5-475E-893D-745DA15F1AAC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stars", "Stars.csproj", "{F03C19DA-0F5D-45F4-B85E-E3ABCA197D4B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F03C19DA-0F5D-45F4-B85E-E3ABCA197D4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F03C19DA-0F5D-45F4-B85E-E3ABCA197D4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F03C19DA-0F5D-45F4-B85E-E3ABCA197D4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F03C19DA-0F5D-45F4-B85E-E3ABCA197D4B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Debug|x64.ActiveCfg = Debug|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Debug|x64.Build.0 = Debug|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Debug|x86.ActiveCfg = Debug|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Debug|x86.Build.0 = Debug|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Release|Any CPU.Build.0 = Release|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Release|x64.ActiveCfg = Release|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Release|x64.Build.0 = Release|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Release|x86.ActiveCfg = Release|Any CPU - {5832C21C-4DE5-475E-893D-745DA15F1AAC}.Release|x86.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0752CA22-85F0-43AE-8B79-7A611531CAF7} EndGlobalSection EndGlobal From 2de884f2afa6240abadb14d7e80a4aa33d7eea95 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 11:56:20 +0200 Subject: [PATCH 55/82] Simplify StockMarket (C#) folder structure --- 83_Stock_Market/csharp/{src => }/Assets.cs | 0 83_Stock_Market/csharp/{src => }/Broker.cs | 0 83_Stock_Market/csharp/{src => }/Company.cs | 0 83_Stock_Market/csharp/{src => }/Controller.cs | 0 .../{src => }/Extensions/EnumerableExtensions.cs | 0 .../Extensions/ImmutableArrayExtensions.cs | 0 .../{src => }/Extensions/RandomExtensions.cs | 0 83_Stock_Market/csharp/{src => }/Program.cs | 0 83_Stock_Market/csharp/{src => }/StockMarket.cs | 0 .../csharp/{Game.csproj => StockMarket.csproj} | 0 83_Stock_Market/csharp/StockMarket.sln | 14 +++++++------- 83_Stock_Market/csharp/{src => }/TradingDay.cs | 0 .../csharp/{src => }/TransactionResult.cs | 0 83_Stock_Market/csharp/{src => }/View.cs | 0 14 files changed, 7 insertions(+), 7 deletions(-) rename 83_Stock_Market/csharp/{src => }/Assets.cs (100%) rename 83_Stock_Market/csharp/{src => }/Broker.cs (100%) rename 83_Stock_Market/csharp/{src => }/Company.cs (100%) rename 83_Stock_Market/csharp/{src => }/Controller.cs (100%) rename 83_Stock_Market/csharp/{src => }/Extensions/EnumerableExtensions.cs (100%) rename 83_Stock_Market/csharp/{src => }/Extensions/ImmutableArrayExtensions.cs (100%) rename 83_Stock_Market/csharp/{src => }/Extensions/RandomExtensions.cs (100%) rename 83_Stock_Market/csharp/{src => }/Program.cs (100%) rename 83_Stock_Market/csharp/{src => }/StockMarket.cs (100%) rename 83_Stock_Market/csharp/{Game.csproj => StockMarket.csproj} (100%) rename 83_Stock_Market/csharp/{src => }/TradingDay.cs (100%) rename 83_Stock_Market/csharp/{src => }/TransactionResult.cs (100%) rename 83_Stock_Market/csharp/{src => }/View.cs (100%) diff --git a/83_Stock_Market/csharp/src/Assets.cs b/83_Stock_Market/csharp/Assets.cs similarity index 100% rename from 83_Stock_Market/csharp/src/Assets.cs rename to 83_Stock_Market/csharp/Assets.cs diff --git a/83_Stock_Market/csharp/src/Broker.cs b/83_Stock_Market/csharp/Broker.cs similarity index 100% rename from 83_Stock_Market/csharp/src/Broker.cs rename to 83_Stock_Market/csharp/Broker.cs diff --git a/83_Stock_Market/csharp/src/Company.cs b/83_Stock_Market/csharp/Company.cs similarity index 100% rename from 83_Stock_Market/csharp/src/Company.cs rename to 83_Stock_Market/csharp/Company.cs diff --git a/83_Stock_Market/csharp/src/Controller.cs b/83_Stock_Market/csharp/Controller.cs similarity index 100% rename from 83_Stock_Market/csharp/src/Controller.cs rename to 83_Stock_Market/csharp/Controller.cs diff --git a/83_Stock_Market/csharp/src/Extensions/EnumerableExtensions.cs b/83_Stock_Market/csharp/Extensions/EnumerableExtensions.cs similarity index 100% rename from 83_Stock_Market/csharp/src/Extensions/EnumerableExtensions.cs rename to 83_Stock_Market/csharp/Extensions/EnumerableExtensions.cs diff --git a/83_Stock_Market/csharp/src/Extensions/ImmutableArrayExtensions.cs b/83_Stock_Market/csharp/Extensions/ImmutableArrayExtensions.cs similarity index 100% rename from 83_Stock_Market/csharp/src/Extensions/ImmutableArrayExtensions.cs rename to 83_Stock_Market/csharp/Extensions/ImmutableArrayExtensions.cs diff --git a/83_Stock_Market/csharp/src/Extensions/RandomExtensions.cs b/83_Stock_Market/csharp/Extensions/RandomExtensions.cs similarity index 100% rename from 83_Stock_Market/csharp/src/Extensions/RandomExtensions.cs rename to 83_Stock_Market/csharp/Extensions/RandomExtensions.cs diff --git a/83_Stock_Market/csharp/src/Program.cs b/83_Stock_Market/csharp/Program.cs similarity index 100% rename from 83_Stock_Market/csharp/src/Program.cs rename to 83_Stock_Market/csharp/Program.cs diff --git a/83_Stock_Market/csharp/src/StockMarket.cs b/83_Stock_Market/csharp/StockMarket.cs similarity index 100% rename from 83_Stock_Market/csharp/src/StockMarket.cs rename to 83_Stock_Market/csharp/StockMarket.cs diff --git a/83_Stock_Market/csharp/Game.csproj b/83_Stock_Market/csharp/StockMarket.csproj similarity index 100% rename from 83_Stock_Market/csharp/Game.csproj rename to 83_Stock_Market/csharp/StockMarket.csproj diff --git a/83_Stock_Market/csharp/StockMarket.sln b/83_Stock_Market/csharp/StockMarket.sln index 5bfb67aa..ab159a5b 100644 --- a/83_Stock_Market/csharp/StockMarket.sln +++ b/83_Stock_Market/csharp/StockMarket.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31321.278 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game", "Game.csproj", "{BADD262D-D540-431F-8803-2A6F80C22033}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StockMarket", "StockMarket.csproj", "{B4C15C31-EB2D-4AAF-8380-5F2EBC0DD9D0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BADD262D-D540-431F-8803-2A6F80C22033}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BADD262D-D540-431F-8803-2A6F80C22033}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BADD262D-D540-431F-8803-2A6F80C22033}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BADD262D-D540-431F-8803-2A6F80C22033}.Release|Any CPU.Build.0 = Release|Any CPU + {B4C15C31-EB2D-4AAF-8380-5F2EBC0DD9D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4C15C31-EB2D-4AAF-8380-5F2EBC0DD9D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4C15C31-EB2D-4AAF-8380-5F2EBC0DD9D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4C15C31-EB2D-4AAF-8380-5F2EBC0DD9D0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/83_Stock_Market/csharp/src/TradingDay.cs b/83_Stock_Market/csharp/TradingDay.cs similarity index 100% rename from 83_Stock_Market/csharp/src/TradingDay.cs rename to 83_Stock_Market/csharp/TradingDay.cs diff --git a/83_Stock_Market/csharp/src/TransactionResult.cs b/83_Stock_Market/csharp/TransactionResult.cs similarity index 100% rename from 83_Stock_Market/csharp/src/TransactionResult.cs rename to 83_Stock_Market/csharp/TransactionResult.cs diff --git a/83_Stock_Market/csharp/src/View.cs b/83_Stock_Market/csharp/View.cs similarity index 100% rename from 83_Stock_Market/csharp/src/View.cs rename to 83_Stock_Market/csharp/View.cs From e24dc3a8133676248f890ea1de24a8ca52863eb5 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 11:59:02 +0200 Subject: [PATCH 56/82] Simplify Target (C#) folder strucure --- 86_Target/csharp/{Target => }/Angle.cs | 0 86_Target/csharp/{Target => }/Explosion.cs | 0 86_Target/csharp/{Target => }/FiringRange.cs | 0 86_Target/csharp/{Target => }/Game.cs | 0 86_Target/csharp/{Target => }/Input.cs | 0 86_Target/csharp/{Target => }/Offset.cs | 0 86_Target/csharp/{Target => }/Point.cs | 0 86_Target/csharp/{Target => }/Program.cs | 0 .../csharp/{Target => }/RandomExtensions.cs | 0 .../Strings/TitleAndInstructions.txt | 0 86_Target/csharp/{Target => }/Target.csproj | 0 86_Target/csharp/Target.sln | 31 +++++++------------ 12 files changed, 11 insertions(+), 20 deletions(-) rename 86_Target/csharp/{Target => }/Angle.cs (100%) rename 86_Target/csharp/{Target => }/Explosion.cs (100%) rename 86_Target/csharp/{Target => }/FiringRange.cs (100%) rename 86_Target/csharp/{Target => }/Game.cs (100%) rename 86_Target/csharp/{Target => }/Input.cs (100%) rename 86_Target/csharp/{Target => }/Offset.cs (100%) rename 86_Target/csharp/{Target => }/Point.cs (100%) rename 86_Target/csharp/{Target => }/Program.cs (100%) rename 86_Target/csharp/{Target => }/RandomExtensions.cs (100%) rename 86_Target/csharp/{Target => }/Strings/TitleAndInstructions.txt (100%) rename 86_Target/csharp/{Target => }/Target.csproj (100%) diff --git a/86_Target/csharp/Target/Angle.cs b/86_Target/csharp/Angle.cs similarity index 100% rename from 86_Target/csharp/Target/Angle.cs rename to 86_Target/csharp/Angle.cs diff --git a/86_Target/csharp/Target/Explosion.cs b/86_Target/csharp/Explosion.cs similarity index 100% rename from 86_Target/csharp/Target/Explosion.cs rename to 86_Target/csharp/Explosion.cs diff --git a/86_Target/csharp/Target/FiringRange.cs b/86_Target/csharp/FiringRange.cs similarity index 100% rename from 86_Target/csharp/Target/FiringRange.cs rename to 86_Target/csharp/FiringRange.cs diff --git a/86_Target/csharp/Target/Game.cs b/86_Target/csharp/Game.cs similarity index 100% rename from 86_Target/csharp/Target/Game.cs rename to 86_Target/csharp/Game.cs diff --git a/86_Target/csharp/Target/Input.cs b/86_Target/csharp/Input.cs similarity index 100% rename from 86_Target/csharp/Target/Input.cs rename to 86_Target/csharp/Input.cs diff --git a/86_Target/csharp/Target/Offset.cs b/86_Target/csharp/Offset.cs similarity index 100% rename from 86_Target/csharp/Target/Offset.cs rename to 86_Target/csharp/Offset.cs diff --git a/86_Target/csharp/Target/Point.cs b/86_Target/csharp/Point.cs similarity index 100% rename from 86_Target/csharp/Target/Point.cs rename to 86_Target/csharp/Point.cs diff --git a/86_Target/csharp/Target/Program.cs b/86_Target/csharp/Program.cs similarity index 100% rename from 86_Target/csharp/Target/Program.cs rename to 86_Target/csharp/Program.cs diff --git a/86_Target/csharp/Target/RandomExtensions.cs b/86_Target/csharp/RandomExtensions.cs similarity index 100% rename from 86_Target/csharp/Target/RandomExtensions.cs rename to 86_Target/csharp/RandomExtensions.cs diff --git a/86_Target/csharp/Target/Strings/TitleAndInstructions.txt b/86_Target/csharp/Strings/TitleAndInstructions.txt similarity index 100% rename from 86_Target/csharp/Target/Strings/TitleAndInstructions.txt rename to 86_Target/csharp/Strings/TitleAndInstructions.txt diff --git a/86_Target/csharp/Target/Target.csproj b/86_Target/csharp/Target.csproj similarity index 100% rename from 86_Target/csharp/Target/Target.csproj rename to 86_Target/csharp/Target.csproj diff --git a/86_Target/csharp/Target.sln b/86_Target/csharp/Target.sln index 3e111702..9aa2c86d 100644 --- a/86_Target/csharp/Target.sln +++ b/86_Target/csharp/Target.sln @@ -1,34 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Target", "Target\Target.csproj", "{8B0B5114-1D05-4F8D-B328-EA2FB89992E7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Target", "Target.csproj", "{DF03CFDB-2857-4416-A07A-80D84874F46E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DF03CFDB-2857-4416-A07A-80D84874F46E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF03CFDB-2857-4416-A07A-80D84874F46E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF03CFDB-2857-4416-A07A-80D84874F46E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF03CFDB-2857-4416-A07A-80D84874F46E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Debug|x64.ActiveCfg = Debug|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Debug|x64.Build.0 = Debug|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Debug|x86.ActiveCfg = Debug|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Debug|x86.Build.0 = Debug|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Release|Any CPU.Build.0 = Release|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Release|x64.ActiveCfg = Release|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Release|x64.Build.0 = Release|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Release|x86.ActiveCfg = Release|Any CPU - {8B0B5114-1D05-4F8D-B328-EA2FB89992E7}.Release|x86.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B49DF932-4DF9-44C3-B63F-FD9443B4DDD2} EndGlobalSection EndGlobal From 06bca7c6537d4f5210b2a96a24d84256fca41ec5 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 15:11:35 +0200 Subject: [PATCH 57/82] Simplify 3-D Plot (C#) folder structure --- 87_3-D_Plot/csharp/{Plot => }/Function.cs | 0 87_3-D_Plot/csharp/{Plot => }/Plot.csproj | 0 87_3-D_Plot/csharp/Plot.sln | 31 ++++++++--------------- 87_3-D_Plot/csharp/{Plot => }/Program.cs | 0 4 files changed, 11 insertions(+), 20 deletions(-) rename 87_3-D_Plot/csharp/{Plot => }/Function.cs (100%) rename 87_3-D_Plot/csharp/{Plot => }/Plot.csproj (100%) rename 87_3-D_Plot/csharp/{Plot => }/Program.cs (100%) diff --git a/87_3-D_Plot/csharp/Plot/Function.cs b/87_3-D_Plot/csharp/Function.cs similarity index 100% rename from 87_3-D_Plot/csharp/Plot/Function.cs rename to 87_3-D_Plot/csharp/Function.cs diff --git a/87_3-D_Plot/csharp/Plot/Plot.csproj b/87_3-D_Plot/csharp/Plot.csproj similarity index 100% rename from 87_3-D_Plot/csharp/Plot/Plot.csproj rename to 87_3-D_Plot/csharp/Plot.csproj diff --git a/87_3-D_Plot/csharp/Plot.sln b/87_3-D_Plot/csharp/Plot.sln index 1402bc2a..b296ace9 100644 --- a/87_3-D_Plot/csharp/Plot.sln +++ b/87_3-D_Plot/csharp/Plot.sln @@ -1,34 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plot", "Plot\Plot.csproj", "{8857AE83-F481-43B0-AA51-D78E1340BD93}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plot", "Plot.csproj", "{8000A3CF-612D-4FB7-B53D-885BB6E5492B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8000A3CF-612D-4FB7-B53D-885BB6E5492B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8000A3CF-612D-4FB7-B53D-885BB6E5492B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8000A3CF-612D-4FB7-B53D-885BB6E5492B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8000A3CF-612D-4FB7-B53D-885BB6E5492B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Debug|x64.ActiveCfg = Debug|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Debug|x64.Build.0 = Debug|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Debug|x86.ActiveCfg = Debug|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Debug|x86.Build.0 = Debug|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Release|Any CPU.Build.0 = Release|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Release|x64.ActiveCfg = Release|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Release|x64.Build.0 = Release|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Release|x86.ActiveCfg = Release|Any CPU - {8857AE83-F481-43B0-AA51-D78E1340BD93}.Release|x86.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5DE8E572-67C9-4DE3-B851-447B78FE983A} EndGlobalSection EndGlobal diff --git a/87_3-D_Plot/csharp/Plot/Program.cs b/87_3-D_Plot/csharp/Program.cs similarity index 100% rename from 87_3-D_Plot/csharp/Plot/Program.cs rename to 87_3-D_Plot/csharp/Program.cs From a851b084e490f7a5b7fdca76ee23067b3c9397fb Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 15:17:54 +0200 Subject: [PATCH 58/82] Simplify TicTacToe (C#) folder structure --- .../csharp/{tictactoe1 => }/Program.cs | 0 .../tictactoe1.csproj => TicTacToe.csproj} | 0 89_Tic-Tac-Toe/csharp/TicTacToe.sln | 19 +++++++++++-------- 3 files changed, 11 insertions(+), 8 deletions(-) rename 89_Tic-Tac-Toe/csharp/{tictactoe1 => }/Program.cs (100%) rename 89_Tic-Tac-Toe/csharp/{tictactoe1/tictactoe1.csproj => TicTacToe.csproj} (100%) diff --git a/89_Tic-Tac-Toe/csharp/tictactoe1/Program.cs b/89_Tic-Tac-Toe/csharp/Program.cs similarity index 100% rename from 89_Tic-Tac-Toe/csharp/tictactoe1/Program.cs rename to 89_Tic-Tac-Toe/csharp/Program.cs diff --git a/89_Tic-Tac-Toe/csharp/tictactoe1/tictactoe1.csproj b/89_Tic-Tac-Toe/csharp/TicTacToe.csproj similarity index 100% rename from 89_Tic-Tac-Toe/csharp/tictactoe1/tictactoe1.csproj rename to 89_Tic-Tac-Toe/csharp/TicTacToe.csproj diff --git a/89_Tic-Tac-Toe/csharp/TicTacToe.sln b/89_Tic-Tac-Toe/csharp/TicTacToe.sln index c26bd1b4..f334433a 100644 --- a/89_Tic-Tac-Toe/csharp/TicTacToe.sln +++ b/89_Tic-Tac-Toe/csharp/TicTacToe.sln @@ -1,22 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30114.105 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tictactoe1", "tictactoe1\tictactoe1.csproj", "{FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TicTacToe", "TicTacToe.csproj", "{A318881A-DA1A-499C-8820-69A1BF02B824}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A318881A-DA1A-499C-8820-69A1BF02B824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A318881A-DA1A-499C-8820-69A1BF02B824}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A318881A-DA1A-499C-8820-69A1BF02B824}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A318881A-DA1A-499C-8820-69A1BF02B824}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FE9379CF-AF73-43DA-8FEC-2BCA7FA13A5E}.Release|Any CPU.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B5343227-EE3B-4829-AC09-DF6702D24501} EndGlobalSection EndGlobal From 8b03046f6dd96ad6f71f7c2a4d402fb41c299008 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 15:25:01 +0200 Subject: [PATCH 59/82] Simplify Tower (C#) folder structure --- 90_Tower/csharp/{Tower => }/Game.cs | 0 90_Tower/csharp/{Tower => }/Models/Needle.cs | 0 90_Tower/csharp/{Tower => }/Models/Towers.cs | 0 90_Tower/csharp/{Tower => }/Program.cs | 0 .../{Tower => }/Resources/Congratulations.txt | 0 .../{Tower => }/Resources/DiskCountPrompt.txt | 0 .../{Tower => }/Resources/DiskCountQuit.txt | 0 .../{Tower => }/Resources/DiskCountRetry.txt | 0 .../{Tower => }/Resources/DiskNotInPlay.txt | 0 .../{Tower => }/Resources/DiskPrompt.txt | 0 .../csharp/{Tower => }/Resources/DiskQuit.txt | 0 .../{Tower => }/Resources/DiskRetry.txt | 0 .../{Tower => }/Resources/DiskUnavailable.txt | 0 .../{Tower => }/Resources/IllegalMove.txt | 0 .../{Tower => }/Resources/Instructions.txt | 0 .../csharp/{Tower => }/Resources/Intro.txt | 0 .../{Tower => }/Resources/NeedlePrompt.txt | 0 .../{Tower => }/Resources/NeedleQuit.txt | 0 .../{Tower => }/Resources/NeedleRetry.txt | 0 .../{Tower => }/Resources/PlayAgainPrompt.txt | 0 .../csharp/{Tower => }/Resources/Strings.cs | 0 .../{Tower => }/Resources/TaskFinished.txt | 0 .../csharp/{Tower => }/Resources/Thanks.txt | 0 .../csharp/{Tower => }/Resources/Title.txt | 0 .../{Tower => }/Resources/TooManyMoves.txt | 0 .../{Tower => }/Resources/YesNoPrompt.txt | 0 90_Tower/csharp/{Tower => }/Tower.csproj | 0 90_Tower/csharp/Tower.sln | 31 +++++++------------ 90_Tower/csharp/{Tower => }/UI/Input.cs | 0 90_Tower/csharp/{Tower => }/UI/Prompt.cs | 0 .../csharp/{Tower => }/UI/TowerDisplay.cs | 0 31 files changed, 11 insertions(+), 20 deletions(-) rename 90_Tower/csharp/{Tower => }/Game.cs (100%) rename 90_Tower/csharp/{Tower => }/Models/Needle.cs (100%) rename 90_Tower/csharp/{Tower => }/Models/Towers.cs (100%) rename 90_Tower/csharp/{Tower => }/Program.cs (100%) rename 90_Tower/csharp/{Tower => }/Resources/Congratulations.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/DiskCountPrompt.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/DiskCountQuit.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/DiskCountRetry.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/DiskNotInPlay.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/DiskPrompt.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/DiskQuit.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/DiskRetry.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/DiskUnavailable.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/IllegalMove.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/Instructions.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/Intro.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/NeedlePrompt.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/NeedleQuit.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/NeedleRetry.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/PlayAgainPrompt.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/Strings.cs (100%) rename 90_Tower/csharp/{Tower => }/Resources/TaskFinished.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/Thanks.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/Title.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/TooManyMoves.txt (100%) rename 90_Tower/csharp/{Tower => }/Resources/YesNoPrompt.txt (100%) rename 90_Tower/csharp/{Tower => }/Tower.csproj (100%) rename 90_Tower/csharp/{Tower => }/UI/Input.cs (100%) rename 90_Tower/csharp/{Tower => }/UI/Prompt.cs (100%) rename 90_Tower/csharp/{Tower => }/UI/TowerDisplay.cs (100%) diff --git a/90_Tower/csharp/Tower/Game.cs b/90_Tower/csharp/Game.cs similarity index 100% rename from 90_Tower/csharp/Tower/Game.cs rename to 90_Tower/csharp/Game.cs diff --git a/90_Tower/csharp/Tower/Models/Needle.cs b/90_Tower/csharp/Models/Needle.cs similarity index 100% rename from 90_Tower/csharp/Tower/Models/Needle.cs rename to 90_Tower/csharp/Models/Needle.cs diff --git a/90_Tower/csharp/Tower/Models/Towers.cs b/90_Tower/csharp/Models/Towers.cs similarity index 100% rename from 90_Tower/csharp/Tower/Models/Towers.cs rename to 90_Tower/csharp/Models/Towers.cs diff --git a/90_Tower/csharp/Tower/Program.cs b/90_Tower/csharp/Program.cs similarity index 100% rename from 90_Tower/csharp/Tower/Program.cs rename to 90_Tower/csharp/Program.cs diff --git a/90_Tower/csharp/Tower/Resources/Congratulations.txt b/90_Tower/csharp/Resources/Congratulations.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/Congratulations.txt rename to 90_Tower/csharp/Resources/Congratulations.txt diff --git a/90_Tower/csharp/Tower/Resources/DiskCountPrompt.txt b/90_Tower/csharp/Resources/DiskCountPrompt.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/DiskCountPrompt.txt rename to 90_Tower/csharp/Resources/DiskCountPrompt.txt diff --git a/90_Tower/csharp/Tower/Resources/DiskCountQuit.txt b/90_Tower/csharp/Resources/DiskCountQuit.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/DiskCountQuit.txt rename to 90_Tower/csharp/Resources/DiskCountQuit.txt diff --git a/90_Tower/csharp/Tower/Resources/DiskCountRetry.txt b/90_Tower/csharp/Resources/DiskCountRetry.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/DiskCountRetry.txt rename to 90_Tower/csharp/Resources/DiskCountRetry.txt diff --git a/90_Tower/csharp/Tower/Resources/DiskNotInPlay.txt b/90_Tower/csharp/Resources/DiskNotInPlay.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/DiskNotInPlay.txt rename to 90_Tower/csharp/Resources/DiskNotInPlay.txt diff --git a/90_Tower/csharp/Tower/Resources/DiskPrompt.txt b/90_Tower/csharp/Resources/DiskPrompt.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/DiskPrompt.txt rename to 90_Tower/csharp/Resources/DiskPrompt.txt diff --git a/90_Tower/csharp/Tower/Resources/DiskQuit.txt b/90_Tower/csharp/Resources/DiskQuit.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/DiskQuit.txt rename to 90_Tower/csharp/Resources/DiskQuit.txt diff --git a/90_Tower/csharp/Tower/Resources/DiskRetry.txt b/90_Tower/csharp/Resources/DiskRetry.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/DiskRetry.txt rename to 90_Tower/csharp/Resources/DiskRetry.txt diff --git a/90_Tower/csharp/Tower/Resources/DiskUnavailable.txt b/90_Tower/csharp/Resources/DiskUnavailable.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/DiskUnavailable.txt rename to 90_Tower/csharp/Resources/DiskUnavailable.txt diff --git a/90_Tower/csharp/Tower/Resources/IllegalMove.txt b/90_Tower/csharp/Resources/IllegalMove.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/IllegalMove.txt rename to 90_Tower/csharp/Resources/IllegalMove.txt diff --git a/90_Tower/csharp/Tower/Resources/Instructions.txt b/90_Tower/csharp/Resources/Instructions.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/Instructions.txt rename to 90_Tower/csharp/Resources/Instructions.txt diff --git a/90_Tower/csharp/Tower/Resources/Intro.txt b/90_Tower/csharp/Resources/Intro.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/Intro.txt rename to 90_Tower/csharp/Resources/Intro.txt diff --git a/90_Tower/csharp/Tower/Resources/NeedlePrompt.txt b/90_Tower/csharp/Resources/NeedlePrompt.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/NeedlePrompt.txt rename to 90_Tower/csharp/Resources/NeedlePrompt.txt diff --git a/90_Tower/csharp/Tower/Resources/NeedleQuit.txt b/90_Tower/csharp/Resources/NeedleQuit.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/NeedleQuit.txt rename to 90_Tower/csharp/Resources/NeedleQuit.txt diff --git a/90_Tower/csharp/Tower/Resources/NeedleRetry.txt b/90_Tower/csharp/Resources/NeedleRetry.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/NeedleRetry.txt rename to 90_Tower/csharp/Resources/NeedleRetry.txt diff --git a/90_Tower/csharp/Tower/Resources/PlayAgainPrompt.txt b/90_Tower/csharp/Resources/PlayAgainPrompt.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/PlayAgainPrompt.txt rename to 90_Tower/csharp/Resources/PlayAgainPrompt.txt diff --git a/90_Tower/csharp/Tower/Resources/Strings.cs b/90_Tower/csharp/Resources/Strings.cs similarity index 100% rename from 90_Tower/csharp/Tower/Resources/Strings.cs rename to 90_Tower/csharp/Resources/Strings.cs diff --git a/90_Tower/csharp/Tower/Resources/TaskFinished.txt b/90_Tower/csharp/Resources/TaskFinished.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/TaskFinished.txt rename to 90_Tower/csharp/Resources/TaskFinished.txt diff --git a/90_Tower/csharp/Tower/Resources/Thanks.txt b/90_Tower/csharp/Resources/Thanks.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/Thanks.txt rename to 90_Tower/csharp/Resources/Thanks.txt diff --git a/90_Tower/csharp/Tower/Resources/Title.txt b/90_Tower/csharp/Resources/Title.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/Title.txt rename to 90_Tower/csharp/Resources/Title.txt diff --git a/90_Tower/csharp/Tower/Resources/TooManyMoves.txt b/90_Tower/csharp/Resources/TooManyMoves.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/TooManyMoves.txt rename to 90_Tower/csharp/Resources/TooManyMoves.txt diff --git a/90_Tower/csharp/Tower/Resources/YesNoPrompt.txt b/90_Tower/csharp/Resources/YesNoPrompt.txt similarity index 100% rename from 90_Tower/csharp/Tower/Resources/YesNoPrompt.txt rename to 90_Tower/csharp/Resources/YesNoPrompt.txt diff --git a/90_Tower/csharp/Tower/Tower.csproj b/90_Tower/csharp/Tower.csproj similarity index 100% rename from 90_Tower/csharp/Tower/Tower.csproj rename to 90_Tower/csharp/Tower.csproj diff --git a/90_Tower/csharp/Tower.sln b/90_Tower/csharp/Tower.sln index 2c6e524d..6f87b0b9 100644 --- a/90_Tower/csharp/Tower.sln +++ b/90_Tower/csharp/Tower.sln @@ -1,34 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tower", "tower\Tower.csproj", "{2E14FCD5-A52C-4292-A7F4-0C7E5780C962}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tower", "Tower.csproj", "{EEED33AD-3DE2-49AA-8AF1-2174C510E128}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EEED33AD-3DE2-49AA-8AF1-2174C510E128}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEED33AD-3DE2-49AA-8AF1-2174C510E128}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEED33AD-3DE2-49AA-8AF1-2174C510E128}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEED33AD-3DE2-49AA-8AF1-2174C510E128}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Debug|x64.ActiveCfg = Debug|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Debug|x64.Build.0 = Debug|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Debug|x86.ActiveCfg = Debug|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Debug|x86.Build.0 = Debug|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Release|Any CPU.Build.0 = Release|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Release|x64.ActiveCfg = Release|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Release|x64.Build.0 = Release|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Release|x86.ActiveCfg = Release|Any CPU - {2E14FCD5-A52C-4292-A7F4-0C7E5780C962}.Release|x86.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {BDCB8278-62ED-46E3-92C2-FF572E0E3ED3} EndGlobalSection EndGlobal diff --git a/90_Tower/csharp/Tower/UI/Input.cs b/90_Tower/csharp/UI/Input.cs similarity index 100% rename from 90_Tower/csharp/Tower/UI/Input.cs rename to 90_Tower/csharp/UI/Input.cs diff --git a/90_Tower/csharp/Tower/UI/Prompt.cs b/90_Tower/csharp/UI/Prompt.cs similarity index 100% rename from 90_Tower/csharp/Tower/UI/Prompt.cs rename to 90_Tower/csharp/UI/Prompt.cs diff --git a/90_Tower/csharp/Tower/UI/TowerDisplay.cs b/90_Tower/csharp/UI/TowerDisplay.cs similarity index 100% rename from 90_Tower/csharp/Tower/UI/TowerDisplay.cs rename to 90_Tower/csharp/UI/TowerDisplay.cs From 0a07132dafaa54eea35f7d69558b8db37c80b42c Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 15:29:38 +0200 Subject: [PATCH 60/82] Rename some projects to match game name --- .../DotnetUtils/DotnetUtils/PortInfo.cs | 2 +- .../csharp/{csharp.csproj => Awari.csproj} | 0 04_Awari/csharp/Awari.sln | 19 +++++++++++-------- .../{21_calendar.csproj => Calendar.csproj} | 0 .../csharp/{21_calendar.sln => Calendar.sln} | 10 +++++----- .../csharp/{csharp.csproj => Gunner.csproj} | 0 42_Gunner/csharp/Gunner.sln | 15 +++++++++------ 47_Hi-Lo/csharp/{hi-lo.csproj => HiLo.csproj} | 0 47_Hi-Lo/csharp/HiLo.sln | 15 +++++++++------ 47_Hi-Lo/csharp/{hi-lo.cs => Program.cs} | 0 .../vbnet/{ThreeDPlot.sln => Plot.sln} | 15 +++++++++------ .../vbnet/{ThreeDPlot.vbproj => Plot.vbproj} | 2 +- 12 files changed, 45 insertions(+), 33 deletions(-) rename 04_Awari/csharp/{csharp.csproj => Awari.csproj} (100%) rename 21_Calendar/csharp/{21_calendar.csproj => Calendar.csproj} (100%) rename 21_Calendar/csharp/{21_calendar.sln => Calendar.sln} (64%) rename 42_Gunner/csharp/{csharp.csproj => Gunner.csproj} (100%) rename 47_Hi-Lo/csharp/{hi-lo.csproj => HiLo.csproj} (100%) rename 47_Hi-Lo/csharp/{hi-lo.cs => Program.cs} (100%) rename 87_3-D_Plot/vbnet/{ThreeDPlot.sln => Plot.sln} (54%) rename 87_3-D_Plot/vbnet/{ThreeDPlot.vbproj => Plot.vbproj} (81%) diff --git a/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs b/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs index 1cb0ba03..535c0ca0 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/PortInfo.cs @@ -19,7 +19,7 @@ public record PortInfo( // .NET namespaces cannot have a digit as the first character // For games whose name starts with a digit, we map the name to a specific string private static readonly Dictionary specialGameNames = new() { - { "3-D_Plot", "ThreeDPlot" }, + { "3-D_Plot", "Plot" }, { "3-D_Tic-Tac-Toe", "ThreeDTicTacToe" }, { "23_Matches", "TwentyThreeMatches"} }; diff --git a/04_Awari/csharp/csharp.csproj b/04_Awari/csharp/Awari.csproj similarity index 100% rename from 04_Awari/csharp/csharp.csproj rename to 04_Awari/csharp/Awari.csproj diff --git a/04_Awari/csharp/Awari.sln b/04_Awari/csharp/Awari.sln index 816cfcc9..492aa580 100644 --- a/04_Awari/csharp/Awari.sln +++ b/04_Awari/csharp/Awari.sln @@ -1,22 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30114.105 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp", "csharp.csproj", "{4E2057CB-0BFE-41A4-910C-798DFABF7FE9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Awari", "Awari.csproj", "{DD161F58-D90F-481A-8275-96E01D229A70}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DD161F58-D90F-481A-8275-96E01D229A70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD161F58-D90F-481A-8275-96E01D229A70}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD161F58-D90F-481A-8275-96E01D229A70}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD161F58-D90F-481A-8275-96E01D229A70}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4E2057CB-0BFE-41A4-910C-798DFABF7FE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E2057CB-0BFE-41A4-910C-798DFABF7FE9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E2057CB-0BFE-41A4-910C-798DFABF7FE9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E2057CB-0BFE-41A4-910C-798DFABF7FE9}.Release|Any CPU.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7F5C288A-A6C6-4AC0-96E3-6A3B482A0947} EndGlobalSection EndGlobal diff --git a/21_Calendar/csharp/21_calendar.csproj b/21_Calendar/csharp/Calendar.csproj similarity index 100% rename from 21_Calendar/csharp/21_calendar.csproj rename to 21_Calendar/csharp/Calendar.csproj diff --git a/21_Calendar/csharp/21_calendar.sln b/21_Calendar/csharp/Calendar.sln similarity index 64% rename from 21_Calendar/csharp/21_calendar.sln rename to 21_Calendar/csharp/Calendar.sln index d8330a26..8b2be04b 100644 --- a/21_Calendar/csharp/21_calendar.sln +++ b/21_Calendar/csharp/Calendar.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31613.86 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "21_calendar", "21_calendar.csproj", "{99AB85E1-A42B-4FEF-8BA6-0ED877F05249}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calendar", "Calendar.csproj", "{1EADFB6C-4496-42C2-A80F-84FEC3F061D1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {99AB85E1-A42B-4FEF-8BA6-0ED877F05249}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99AB85E1-A42B-4FEF-8BA6-0ED877F05249}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99AB85E1-A42B-4FEF-8BA6-0ED877F05249}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99AB85E1-A42B-4FEF-8BA6-0ED877F05249}.Release|Any CPU.Build.0 = Release|Any CPU + {1EADFB6C-4496-42C2-A80F-84FEC3F061D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EADFB6C-4496-42C2-A80F-84FEC3F061D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EADFB6C-4496-42C2-A80F-84FEC3F061D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EADFB6C-4496-42C2-A80F-84FEC3F061D1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/42_Gunner/csharp/csharp.csproj b/42_Gunner/csharp/Gunner.csproj similarity index 100% rename from 42_Gunner/csharp/csharp.csproj rename to 42_Gunner/csharp/Gunner.csproj diff --git a/42_Gunner/csharp/Gunner.sln b/42_Gunner/csharp/Gunner.sln index bbc80af3..5fadb359 100644 --- a/42_Gunner/csharp/Gunner.sln +++ b/42_Gunner/csharp/Gunner.sln @@ -3,20 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp", "csharp.csproj", "{83323E98-D981-4AC2-A74B-36804C9C2497}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gunner", "Gunner.csproj", "{0279F69D-A69A-49B6-867C-78AA4F4DB962}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0279F69D-A69A-49B6-867C-78AA4F4DB962}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0279F69D-A69A-49B6-867C-78AA4F4DB962}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0279F69D-A69A-49B6-867C-78AA4F4DB962}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0279F69D-A69A-49B6-867C-78AA4F4DB962}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {83323E98-D981-4AC2-A74B-36804C9C2497}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {83323E98-D981-4AC2-A74B-36804C9C2497}.Debug|Any CPU.Build.0 = Debug|Any CPU - {83323E98-D981-4AC2-A74B-36804C9C2497}.Release|Any CPU.ActiveCfg = Release|Any CPU - {83323E98-D981-4AC2-A74B-36804C9C2497}.Release|Any CPU.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {09C668DA-38D4-4EF4-9FCA-EB1FF9EF6067} EndGlobalSection EndGlobal diff --git a/47_Hi-Lo/csharp/hi-lo.csproj b/47_Hi-Lo/csharp/HiLo.csproj similarity index 100% rename from 47_Hi-Lo/csharp/hi-lo.csproj rename to 47_Hi-Lo/csharp/HiLo.csproj diff --git a/47_Hi-Lo/csharp/HiLo.sln b/47_Hi-Lo/csharp/HiLo.sln index b735d83d..225235b8 100644 --- a/47_Hi-Lo/csharp/HiLo.sln +++ b/47_Hi-Lo/csharp/HiLo.sln @@ -3,20 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hi-lo", "hi-lo.csproj", "{59721819-A474-4348-8E3D-5F2FCA5D95FA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HiLo", "HiLo.csproj", "{C4D0FAB6-056D-4DD2-827D-3383BE0AA382}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C4D0FAB6-056D-4DD2-827D-3383BE0AA382}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4D0FAB6-056D-4DD2-827D-3383BE0AA382}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4D0FAB6-056D-4DD2-827D-3383BE0AA382}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4D0FAB6-056D-4DD2-827D-3383BE0AA382}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {59721819-A474-4348-8E3D-5F2FCA5D95FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {59721819-A474-4348-8E3D-5F2FCA5D95FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {59721819-A474-4348-8E3D-5F2FCA5D95FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {59721819-A474-4348-8E3D-5F2FCA5D95FA}.Release|Any CPU.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {BF77DB59-426B-4A01-A8AC-09AAF42DA633} EndGlobalSection EndGlobal diff --git a/47_Hi-Lo/csharp/hi-lo.cs b/47_Hi-Lo/csharp/Program.cs similarity index 100% rename from 47_Hi-Lo/csharp/hi-lo.cs rename to 47_Hi-Lo/csharp/Program.cs diff --git a/87_3-D_Plot/vbnet/ThreeDPlot.sln b/87_3-D_Plot/vbnet/Plot.sln similarity index 54% rename from 87_3-D_Plot/vbnet/ThreeDPlot.sln rename to 87_3-D_Plot/vbnet/Plot.sln index b2ea1dbe..a0dcbfcb 100644 --- a/87_3-D_Plot/vbnet/ThreeDPlot.sln +++ b/87_3-D_Plot/vbnet/Plot.sln @@ -3,20 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ThreeDPlot", "ThreeDPlot.vbproj", "{FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}" +Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Plot", "Plot.vbproj", "{534355CC-A2C1-4138-9EB5-09D658DD4504}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {534355CC-A2C1-4138-9EB5-09D658DD4504}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {534355CC-A2C1-4138-9EB5-09D658DD4504}.Debug|Any CPU.Build.0 = Debug|Any CPU + {534355CC-A2C1-4138-9EB5-09D658DD4504}.Release|Any CPU.ActiveCfg = Release|Any CPU + {534355CC-A2C1-4138-9EB5-09D658DD4504}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FF54B85E-8AD1-4AD5-BB54-2E3DABAA0998}.Release|Any CPU.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CAD09CCC-4522-438E-A8C6-514A866D90DE} EndGlobalSection EndGlobal diff --git a/87_3-D_Plot/vbnet/ThreeDPlot.vbproj b/87_3-D_Plot/vbnet/Plot.vbproj similarity index 81% rename from 87_3-D_Plot/vbnet/ThreeDPlot.vbproj rename to 87_3-D_Plot/vbnet/Plot.vbproj index 903ea6aa..be687f57 100644 --- a/87_3-D_Plot/vbnet/ThreeDPlot.vbproj +++ b/87_3-D_Plot/vbnet/Plot.vbproj @@ -1,7 +1,7 @@ Exe - ThreeDPlot + Plot net6.0 16.9 From 3c960f94ea2222b8fa3f14d736c443942a2d40c3 Mon Sep 17 00:00:00 2001 From: Claus Volko <49327712+adokhugi@users.noreply.github.com> Date: Mon, 17 Jan 2022 17:17:34 +0100 Subject: [PATCH 61/82] Kotlin implementation of the Acey Ducey game --- 01_Acey_Ducey/aceyducey.kt | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 01_Acey_Ducey/aceyducey.kt diff --git a/01_Acey_Ducey/aceyducey.kt b/01_Acey_Ducey/aceyducey.kt new file mode 100644 index 00000000..ccc5eb0a --- /dev/null +++ b/01_Acey_Ducey/aceyducey.kt @@ -0,0 +1,74 @@ +import java.util.Random + +fun printCard(a: Int) { + if (a < 11) println(a) + if (a == 11) println("JACK") + if (a == 12) println("QUEEN") + if (a == 13) println("KING") + if (a == 14) println("ACE") +} + +fun main() { + println("ACEY DUCEY CARD GAME") + println("CREATIVE COMPUTING MORRISTOWN, NEW JERSEY") + println() + println() + println("ACEY-DUCEY IS PLAYED IN THE FOLLOWING MANNER ") + println("THE DEALER (COMPUTER) DEALS TWO CARDS FACE UP") + println("YOU HAVE AN OPTION TO BET OR NOT BET DEPENDING") + println("ON WHETHER OR NOT YOU FEEL THE CARD WILL HAVE") + println("A VALUE BETWEEN THE FIRST TWO.") + println("IF YOU DO NOT WANT TO BET, INPUT A 0") + var random = Random() + do { + var q = 100 + var a : Int + var b : Int + var m : Int + println("YOU NOW HAVE " + q + " DOLLARS.") + println() + do { + do { + do { + println("HERE ARE YOUR NEXT TWO CARDS: ") + do { + a = random.nextInt(12) + 2 + b = random.nextInt(12) + 2 + } while (a >= b); + printCard(a) + printCard(b) + println() + println() + print("WHAT IS YOUR BET") + m = readLine()!!.toInt() + if (m == 0) { + println("CHICKEN!!") + println() + } + } while (m == 0); + if (m > q) { + println("SORRY, MY FRIEND, BUT YOU BET TOO MUCH.") + println("YOU HAVE ONLY " + q + " DOLLARS TO BET.") + } + } while (m > q); + var c = random.nextInt(12) + 2 + printCard(c) + println() + if (c > a && c < b) { + println("YOU WIN!!!") + q += m + } + else { + println("SORRY, YOU LOSE") + if (m < q) q -= m + } + } while (m < q); + println() + println() + println("SORRY, FRIEND, BUT YOU BLEW YOUR WAD.") + println() + println() + println("TRY AGAIN (YES OR NO)") + } while (readLine() == "YES"); + println("O.K., HOPE YOU HAD FUN!") +} From fa9fb47f140b9e9646a81fae232bde850b822ecf Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 23:01:42 +0200 Subject: [PATCH 62/82] Fix RootNamespace and LangVersion --- 00_Utilities/DotnetUtils/DotnetUtils/Program.cs | 2 +- 05_Bagels/csharp/Bagels.csproj | 1 - 06_Banner/vbnet/banner.vbproj | 3 ++- 08_Batnum/vbnet/batnum.vbproj | 3 ++- 21_Calendar/csharp/Calendar.csproj | 1 - 96_Word/vbnet/word.vbproj | 3 ++- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index 550250b1..5a3a70e5 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -216,8 +216,8 @@ void generateMissingProjs() { void checkProjects() { foreach (var info in infos) { + WriteLine(info.LangPath); printProjectWarnings(info); - WriteLine(); } } diff --git a/05_Bagels/csharp/Bagels.csproj b/05_Bagels/csharp/Bagels.csproj index 68fa11ec..54cdbe42 100644 --- a/05_Bagels/csharp/Bagels.csproj +++ b/05_Bagels/csharp/Bagels.csproj @@ -3,7 +3,6 @@ Exe net5.0 - BasicComputerGames.Bagels diff --git a/06_Banner/vbnet/banner.vbproj b/06_Banner/vbnet/banner.vbproj index 659fea7b..e825a636 100644 --- a/06_Banner/vbnet/banner.vbproj +++ b/06_Banner/vbnet/banner.vbproj @@ -2,8 +2,9 @@ Exe - banner + Banner netcoreapp3.1 + 16.9 diff --git a/08_Batnum/vbnet/batnum.vbproj b/08_Batnum/vbnet/batnum.vbproj index 3c21499c..aad6e218 100644 --- a/08_Batnum/vbnet/batnum.vbproj +++ b/08_Batnum/vbnet/batnum.vbproj @@ -2,8 +2,9 @@ Exe - batnum + Batnum netcoreapp3.1 + 16.9 diff --git a/21_Calendar/csharp/Calendar.csproj b/21_Calendar/csharp/Calendar.csproj index 895f2f3f..20827042 100644 --- a/21_Calendar/csharp/Calendar.csproj +++ b/21_Calendar/csharp/Calendar.csproj @@ -3,7 +3,6 @@ Exe net5.0 - _21_calendar diff --git a/96_Word/vbnet/word.vbproj b/96_Word/vbnet/word.vbproj index 9868dd3e..f80094e4 100644 --- a/96_Word/vbnet/word.vbproj +++ b/96_Word/vbnet/word.vbproj @@ -2,8 +2,9 @@ Exe - word + Word netcoreapp3.1 + 16.9 From dbf6f10d1b4faf22d067691472980b8e165a33dc Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 17 Jan 2022 23:09:30 +0200 Subject: [PATCH 63/82] Script -- output ports with no code files; replace !...Any with None --- .../DotnetUtils/DotnetUtils/Extensions.cs | 5 +++++ .../DotnetUtils/DotnetUtils/Program.cs | 22 ++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Extensions.cs b/00_Utilities/DotnetUtils/DotnetUtils/Extensions.cs index a0f52bee..11f05177 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Extensions.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Extensions.cs @@ -10,6 +10,11 @@ public static class Extensions { src.Select(x => selector(x.Item1, x.Item2, x.Item3)); public static IEnumerable<(T1, T2, int)> WithIndex(this IEnumerable<(T1, T2)> src) => src.Select((x, index) => (x.Item1, x.Item2, index)); + public static bool None(this IEnumerable src, Func? predicate = null) => + predicate is null ? + !src.Any() : + !src.Any(predicate); + public static bool IsNullOrWhitespace([NotNullWhen(false)] this string? s) => string.IsNullOrWhiteSpace(s); [return: NotNullIfNotNull("path")] diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index 5a3a70e5..560a7207 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -17,6 +17,7 @@ var actions = new (Action action, string description)[] { (multipleProjs, "Output multiple project files"), (checkProjects, "Check .csproj/.vbproj files for target framework, nullability etc."), (checkExecutableProject, "Check that there is at least one executable project per port"), + (noCodeFiles, "Output ports without any code files"), (printPortInfo, "Print info about a single port"), (generateMissingSlns, "Generate solution files when missing"), @@ -87,7 +88,7 @@ void printInfos() { } void missingSln() { - var data = infos.Where(x => !x.Slns.Any()).ToArray(); + var data = infos.Where(x => x.Slns.None()).ToArray(); foreach (var item in data) { WriteLine(item.LangPath); } @@ -98,7 +99,7 @@ void missingSln() { void unexpectedSlnName() { var counter = 0; foreach (var item in infos) { - if (!item.Slns.Any()) { continue; } + if (item.Slns.None()) { continue; } var expectedSlnName = $"{item.GameName}.sln"; if (item.Slns.Contains(Combine(item.LangPath, expectedSlnName), StringComparer.InvariantCultureIgnoreCase)) { continue; } @@ -125,7 +126,7 @@ void multipleSlns() { } void missingProj() { - var data = infos.Where(x => !x.Projs.Any()).ToArray(); + var data = infos.Where(x => x.Projs.None()).ToArray(); foreach (var item in data) { WriteLine(item.LangPath); } @@ -136,7 +137,7 @@ void missingProj() { void unexpectedProjName() { var counter = 0; foreach (var item in infos) { - if (!item.Projs.Any()) { continue; } + if (item.Projs.None()) { continue; } var expectedProjName = $"{item.GameName}.{item.ProjExt}"; if (item.Projs.Contains(Combine(item.LangPath, expectedProjName))) { continue; } @@ -164,7 +165,7 @@ void multipleProjs() { } void generateMissingSlns() { - foreach (var item in infos.Where(x => !x.Slns.Any())) { + foreach (var item in infos.Where(x => x.Slns.None())) { var result = RunProcess("dotnet", $"new sln -n {item.GameName} -o {item.LangPath}"); WriteLine(result); @@ -177,7 +178,7 @@ void generateMissingSlns() { } void generateMissingProjs() { - foreach (var item in infos.Where(x => !x.Projs.Any())) { + foreach (var item in infos.Where(x => x.Projs.None())) { // We can't use the dotnet command to create a new project using the built-in console template, because part of that template // is a Program.cs / Program.vb file. If there already are code files, there's no need to add a new empty one; and // if there's already such a file, it might try to overwrite it. @@ -284,6 +285,15 @@ void checkExecutableProject() { } } +void noCodeFiles() { + var qry = infos + .Where(x => x.CodeFiles.None()) + .OrderBy(x => x.Lang); + foreach (var item in qry) { + WriteLine(item.LangPath); + } +} + void tryBuild() { // if has code files, try to build } From 8c0f2f5f8b33e578c843be3d29941a4258e879ae Mon Sep 17 00:00:00 2001 From: Noah Pauls Date: Mon, 17 Jan 2022 18:06:22 -0800 Subject: [PATCH 64/82] completed csharp version --- 88_3-D_Tic-Tac-Toe/csharp/Program.cs | 10 + 88_3-D_Tic-Tac-Toe/csharp/Qubic.cs | 1178 ++++++++++++++++++++++++ 88_3-D_Tic-Tac-Toe/csharp/QubicData.cs | 559 +++++++++++ 3 files changed, 1747 insertions(+) create mode 100644 88_3-D_Tic-Tac-Toe/csharp/Program.cs create mode 100644 88_3-D_Tic-Tac-Toe/csharp/Qubic.cs create mode 100644 88_3-D_Tic-Tac-Toe/csharp/QubicData.cs diff --git a/88_3-D_Tic-Tac-Toe/csharp/Program.cs b/88_3-D_Tic-Tac-Toe/csharp/Program.cs new file mode 100644 index 00000000..12c6ca83 --- /dev/null +++ b/88_3-D_Tic-Tac-Toe/csharp/Program.cs @@ -0,0 +1,10 @@ +namespace ThreeDTicTacToe +{ + class Program + { + static void Main() + { + new Qubic().Run(); + } + } +} diff --git a/88_3-D_Tic-Tac-Toe/csharp/Qubic.cs b/88_3-D_Tic-Tac-Toe/csharp/Qubic.cs new file mode 100644 index 00000000..595db661 --- /dev/null +++ b/88_3-D_Tic-Tac-Toe/csharp/Qubic.cs @@ -0,0 +1,1178 @@ +using System.Text; + +namespace ThreeDTicTacToe +{ + ///

+ /// Qubic is a 3D Tic-Tac-Toe game played on a 4x4x4 cube. This code allows + /// a player to compete against a deterministic AI that is surprisingly + /// difficult to beat. + /// + internal class Qubic + { + // The Y variable in the original BASIC. + private static readonly int[] CornersAndCenters = QubicData.CornersAndCenters; + // The M variable in the original BASIC. + private static readonly int[,] RowsByPlane = QubicData.RowsByPlane; + + // Board spaces are filled in with numeric values. A space could be: + // + // - EMPTY: no one has moved here yet. + // - PLAYER: the player moved here. + // - MACHINE: the machine moved here. + // - POTENTIAL: the machine, in the middle of its move, + // might fill a space with a potential move marker, which + // prioritizes the space once it finally chooses where to move. + // + // The numeric values allow the program to determine what moves have + // been made in a row by summing the values in a row. In theory, the + // individual values could be any positive numbers that satisfy the + // following: + // + // - EMPTY = 0 + // - POTENTIAL * 4 < PLAYER + // - PLAYER * 4 < MACHINE + private const double PLAYER = 1.0; + private const double MACHINE = 5.0; + private const double POTENTIAL = 0.125; + private const double EMPTY = 0.0; + + // The X variable in the original BASIC. This is the Qubic board, + // flattened into a 1D array. + private readonly double[] Board = new double[64]; + + // The L variable in the original BASIC. There are 76 unique winning rows + // in the board, so each gets an entry in RowSums. A row sum can be used + // to check what moves have been made to that row in the board. + // + // Example: if RowSums[i] == PLAYER * 4, the player won with row i! + private readonly double[] RowSums = new double[76]; + + public Qubic() { } + + /// + /// Run the Qubic game. + /// + /// Show the title, prompt for instructions, then begin the game loop. + /// + public void Run() + { + Title(); + Instructions(); + Loop(); + } + + /*********************************************************************** + /* Terminal Text/Prompts + /**********************************************************************/ + #region TerminalText + + /// + /// Display title and attribution. + /// + /// Original BASIC: 50-120 + /// + private static void Title() + { + Console.WriteLine( + "\n" + + " QUBIC\n\n" + + " CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n\n\n" + ); + } + + /// + /// Prompt user for game instructions. + /// + /// Original BASIC: 210-313 + /// + private static void Instructions() + { + Console.Write("DO YOU WANT INSTRUCTIONS? "); + var yes = ReadYesNo(); + + if (yes) + { + Console.WriteLine( + "\n" + + "THE GAME IS TIC-TAC-TOE IN A 4 X 4 X 4 CUBE.\n" + + "EACH MOVE IS INDICATED BY A 3 DIGIT NUMBER, WITH EACH\n" + + "DIGIT BETWEEN 1 AND 4 INCLUSIVE. THE DIGITS INDICATE THE\n" + + "LEVEL, ROW, AND COLUMN, RESPECTIVELY, OF THE OCCUPIED\n" + + "PLACE.\n" + + "\n" + + "TO PRINT THE PLAYING BOARD, TYPE 0 (ZERO) AS YOUR MOVE.\n" + + "THE PROGRAM WILL PRINT THE BOARD WITH YOUR MOVES INDI-\n" + + "CATED WITH A (Y), THE MACHINE'S MOVES WITH AN (M), AND\n" + + "UNUSED SQUARES WITH A ( ). OUTPUT IS ON PAPER.\n" + + "\n" + + "TO STOP THE PROGRAM RUN, TYPE 1 AS YOUR MOVE.\n\n" + ); + } + } + + /// + /// Prompt player for whether they would like to move first, or allow + /// the machine to make the first move. + /// + /// Original BASIC: 440-490 + /// + /// true if the player wants to move first + private static bool PlayerMovePreference() + { + Console.Write("DO YOU WANT TO MOVE FIRST? "); + var result = ReadYesNo(); + Console.WriteLine(); + return result; + } + + /// + /// Run the Qubic program loop. + /// + private void Loop() + { + // The "retry" loop; ends if player quits or chooses not to retry + // after game ends. + while (true) + { + ClearBoard(); + var playerNext = PlayerMovePreference(); + + // The "game" loop; ends if player quits, player/machine wins, + // or game ends in draw. + while (true) + { + if (playerNext) + { + // Player makes a move. + var playerAction = PlayerMove(); + if (playerAction == PlayerAction.Move) + { + playerNext = !playerNext; + } + else + { + return; + } + } + else + { + // Check for wins, if any. + RefreshRowSums(); + if (CheckPlayerWin() || CheckMachineWin()) + { + break; + } + + // Machine makes a move. + var machineAction = MachineMove(); + if (machineAction == MachineAction.Move) + { + playerNext = !playerNext; + } + else if (machineAction == MachineAction.End) + { + break; + } + else + { + throw new Exception("unreachable; machine should always move or end game in game loop"); + } + } + } + + var retry = RetryPrompt(); + + if (!retry) + { + return; + } + } + } + + /// + /// Prompt the user to try another game. + /// + /// Original BASIC: 1490-1560 + /// + /// true if the user wants to play again + private static bool RetryPrompt() + { + Console.Write("DO YOU WANT TO TRY ANOTHER GAME? "); + return ReadYesNo(); + } + + /// + /// Read a yes/no from the terminal. This method accepts anything that + /// starts with N/n as no and Y/y as yes. + /// + /// true if the player answered yes + private static bool ReadYesNo() + { + while (true) + { + var response = Console.ReadLine() ?? " "; + if (response.ToLower().StartsWith("y")) + { + return true; + } + else if (response.ToLower().StartsWith("n")) + { + return false; + } + else + { + Console.Write("INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'. "); + } + } + } + + #endregion + + /*********************************************************************** + /* Player Move + /**********************************************************************/ + #region PlayerMove + + /// + /// Possible actions player has taken after ending their move. This + /// replaces the `GOTO` logic that allowed the player to jump out of + /// the game loop and quit. + /// + private enum PlayerAction + { + /// + /// The player ends the game prematurely. + /// + Quit, + /// + /// The player makes a move on the board. + /// + Move, + } + + /// + /// Make the player's move based on their input. + /// + /// Original BASIC: 500-620 + /// + /// Whether the player moved or quit the program. + private PlayerAction PlayerMove() + { + // Loop until a valid move is inputted. + while (true) + { + var move = ReadMove(); + if (move == 1) + { + return PlayerAction.Quit; + } + else if (move == 0) + { + ShowBoard(); + } + else + { + ClearPotentialMoves(); + if (TryCoordToIndex(move, out int moveIndex)) + { + if (Board[moveIndex] == EMPTY) + { + Board[moveIndex] = PLAYER; + return PlayerAction.Move; + } + else + { + Console.WriteLine("THAT SQUARE IS USED, TRY AGAIN."); + } + } + else + { + Console.WriteLine("INCORRECT MOVE, TRY AGAIN."); + } + } + } + } + + /// + /// Read a player move from the terminal. Move can be any integer. + /// + /// Original BASIC: 510-520 + /// + /// the move inputted + private static int ReadMove() + { + Console.Write("YOUR MOVE? "); + return ReadInteger(); + } + + /// + /// Read an integer from the terminal. + /// + /// Original BASIC: 520 + /// + /// Unlike the basic, this code will not accept any string that starts + /// with a number; only full number strings are allowed. + /// + /// the integer inputted + private static int ReadInteger() + { + while (true) + { + var response = Console.ReadLine() ?? " "; + + if (int.TryParse(response, out var move)) + { + return move; + + } + else + { + Console.Write("!NUMBER EXPECTED - RETRY INPUT LINE--? "); + } + } + } + + /// + /// Display the board to the player. Spaces taken by the player are + /// marked with "Y", while machine spaces are marked with "M". + /// + /// Original BASIC: 2550-2740 + /// + private void ShowBoard() + { + var s = new StringBuilder(new string('\n', 9)); + + for (int i = 1; i <= 4; i++) + { + for (int j = 1; j <= 4; j++) + { + s.Append(' ', 3 * (j + 1)); + for (int k = 1; k <= 4; k++) + { + int q = (16 * i) + (4 * j) + k - 21; + s.Append(Board[q] switch + { + EMPTY or POTENTIAL => "( ) ", + PLAYER => "(Y) ", + MACHINE => "(M) ", + _ => throw new Exception($"invalid space value {Board[q]}"), + }); + } + s.Append("\n\n"); + } + s.Append("\n\n"); + } + + Console.WriteLine(s.ToString()); + } + + #endregion + + /*********************************************************************** + /* Machine Move + /**********************************************************************/ + #region MachineMove + + /// + /// Check all rows for a player win. + /// + /// A row indicates a player win if its sum = PLAYER * 4. + /// + /// Original BASIC: 720-780 + /// + /// whether the player won in any row + private bool CheckPlayerWin() + { + for (int row = 0; row < 76; row++) + { + if (RowSums[row] == (PLAYER * 4)) + { + // Found player win! + Console.WriteLine("YOU WIN AS FOLLOWS"); + DisplayRow(row); + return true; + } + } + + // No player win found. + return false; + } + + /// + /// Check all rows for a row that the machine could move to to win + /// immediately. + /// + /// A row indicates a player could win immediately if it has three + /// machine moves already; that is, sum = MACHINE * 3. + /// + /// Original Basic: 790-920 + /// + /// + private bool CheckMachineWin() + { + for (int row = 0; row < 76; row++) + { + if (RowSums[row] == (MACHINE * 3)) + { + // Found a winning row! + for (int space = 0; space < 4; space++) + { + int move = RowsByPlane[row, space]; + if (Board[move] == EMPTY) + { + // Found empty space in winning row; move there. + Board[move] = MACHINE; + Console.WriteLine($"MACHINE MOVES TO {IndexToCoord(move)} , AND WINS AS FOLLOWS"); + DisplayRow(row); + return true; + } + } + } + } + + // No winning row available. + return false; + } + + /// + /// Display the coordinates of a winning row. + /// + /// index into RowsByPlane data + private void DisplayRow(int row) + { + for (int space = 0; space < 4; space++) + { + Console.Write($" {IndexToCoord(RowsByPlane[row, space])} "); + } + Console.WriteLine(); + } + + /// + /// Possible actions machine can take in a move. This helps replace the + /// complex GOTO logic from the original BASIC, which allowed the + /// program to jump from the machine's action to the end of the game. + /// + private enum MachineAction + { + /// + /// Machine did not take any action. + /// + None, + /// + /// Machine made a move. + /// + Move, + /// + /// Machine either won, conceded, or found a draw. + /// + End, + } + + /// + /// Machine decides where to move on the board, and ends the game if + /// appropriate. + /// + /// The machine's AI tries to take the following actions (in order): + /// + /// 1. If the player has a row that will get them the win on their + /// next turn, block that row. + /// 2. If the machine can trap the player (create two different rows + /// with three machine moves each that cannot be blocked by only a + /// single player move, create such a trap. + /// 3. If the player can create a similar trap for the machine on + /// their next move, block the space where that trap would be + /// created. + /// 4. Find a plane in the board that is well-populated by player + /// moves, and take a space in the first such plane. + /// 5. Find the first open corner or center and move there. + /// 6. Find the first open space and move there. + /// + /// If none of these actions are possible, then the board is entirely + /// full, and the game results in a draw. + /// + /// Original BASIC: start at 930 + /// + /// the action the machine took + private MachineAction MachineMove() + { + // The actions the machine attempts to take, in order. + var actions = new Func[] + { + BlockPlayer, + MakePlayerTrap, + BlockMachineTrap, + MoveByPlane, + MoveCornerOrCenter, + MoveAnyOpenSpace, + }; + + foreach (var action in actions) + { + // Try each action, moving to the next if nothing happens. + var actionResult = action(); + if (actionResult != MachineAction.None) + { + // Not in original BASIC: check for draw after each machine + // move. + if (CheckDraw()) + { + return DrawGame(); + } + return actionResult; + } + } + + // If we got here, all spaces are taken. Draw the game. + return DrawGame(); + } + + /// + /// Block a row with three spaces already taken by the player. + /// + /// Original BASIC: 930-1010 + /// + /// + /// Move if the machine blocked, + /// None otherwise + /// + private MachineAction BlockPlayer() + { + for (int row = 0; row < 76; row++) + { + if (RowSums[row] == (PLAYER * 3)) + { + // Found a row to block on! + for (int space = 0; space < 4; space++) + { + if (Board[RowsByPlane[row, space]] == EMPTY) + { + // Take the remaining empty space. + Board[RowsByPlane[row, space]] = MACHINE; + Console.WriteLine($"NICE TRY. MACHINE MOVES TO {IndexToCoord(RowsByPlane[row, space])}"); + return MachineAction.Move; + } + } + } + } + + // Didn't find a row to block on. + return MachineAction.None; + } + + /// + /// Create a trap for the player if possible. A trap can be created if + /// moving to a space on the board results in two different rows having + /// three MACHINE spaces, with the remaining space not shared between + /// the two rows. The player can only block one of these traps, so the + /// machine will win. + /// + /// If a player trap is not possible, but a row is found that is + /// particularly advantageous for the machine to move to, the machine + /// will try and move to a corner-edge in that row. + /// + /// Original BASIC: 1300-1480 + /// + /// + /// Move if a trap was created, + /// End if the machine conceded, + /// None otherwise + /// + private MachineAction MakePlayerTrap() + { + for (int row = 0; row < 76; row++) + { + // Refresh row sum, since new POTENTIALs might have changed it. + var rowSum = RefreshRowSum(row); + + // Machine has moved in this row twice, and player has not moved + // in this row. + if (rowSum >= (MACHINE * 2) && rowSum < (MACHINE * 2) + 1) + { + // Machine has no potential moves yet in this row. + if (rowSum == (MACHINE * 2)) + { + for (int space = 0; space < 4; space++) + { + // Empty space can potentially be used to create a + // trap. + if (Board[RowsByPlane[row, space]] == EMPTY) + { + Board[RowsByPlane[row, space]] = POTENTIAL; + } + } + } + // Machine has already found a potential move in this row, + // so a trap can be created with another row. + else + { + return MakeOrBlockTrap(row); + } + } + } + + // No player traps can be made. + RefreshRowSums(); + + for (int row = 0; row < 76; row++) + { + // A row may be particularly advantageous for the machine to + // move to at this point; this is the case if a row is entirely + // filled with POTENTIAL or has one MACHINE and others + // POTENTIAL. + if (RowSums[row] == (POTENTIAL * 4) || RowSums[row] == MACHINE + (POTENTIAL * 3)) + { + // Try moving to a corner-edge in an advantageous row. + return MoveCornerEdges(row, POTENTIAL); + } + } + + // No spaces found that are particularly advantageous to machine. + ClearPotentialMoves(); + return MachineAction.None; + } + + /// + /// Block a trap that the player could create for the machine on their + /// next turn. + /// + /// If there are no player traps to block, but a row is found that is + /// particularly advantageous for the player to move to, the machine + /// will try and move to a corner-edge in that row. + /// + /// Original BASIC: 1030-1190 + /// + /// + /// Move if a trap was created, + /// End if the machine conceded, + /// None otherwise + /// + private MachineAction BlockMachineTrap() + { + for (int i = 0; i < 76; i++) + { + // Refresh row sum, since new POTENTIALs might have changed it. + var rowSum = RefreshRowSum(i); + + // Player has moved in this row twice, and machine has not moved + // in this row. + if (rowSum >= (PLAYER * 2) && rowSum < (PLAYER * 2) + 1) + { + // Machine has no potential moves yet in this row. + if (rowSum == (PLAYER * 2)) + { + for (int j = 0; j < 4; j++) + { + if (Board[RowsByPlane[i, j]] == EMPTY) + { + Board[RowsByPlane[i, j]] = POTENTIAL; + } + } + } + // Machine has already found a potential move in this row, + // so a trap can be created with another row by the player. + // Move to block. + else + { + return MakeOrBlockTrap(i); + } + } + } + + // No player traps to block found. + RefreshRowSums(); + + for (int row = 0; row < 76; row++) + { + // A row may be particularly advantageous for the player to move + // to at this point, indicated by a row containing all POTENTIAL + // moves or one PLAYER and rest POTENTIAL. + if (RowSums[row] == (POTENTIAL * 4) || RowSums[row] == PLAYER + (POTENTIAL * 3)) + { + // Try moving to a corner-edge in an advantageous row. + return MoveCornerEdges(row, POTENTIAL); + } + } + + // No spaces found that are particularly advantageous to the player. + return MachineAction.None; + } + + /// + /// Either make a trap for the player or block a trap the player could + /// create on their next turn. + /// + /// Unclear how this method could possibly end with a concession; it + /// seems it can only be called if the row contains a potential move. + /// + /// Original BASIC: 2230-2350 + /// + /// the row containing the space to move to + /// + /// Move if the machine moved, + /// End if the machine conceded + /// + private MachineAction MakeOrBlockTrap(int row) + { + for (int space = 0; space < 4; space++) + { + if (Board[RowsByPlane[row, space]] == POTENTIAL) + { + Board[RowsByPlane[row, space]] = MACHINE; + + // Row sum indicates we're blocking a player trap. + if (RowSums[row] < MACHINE) + { + Console.Write("YOU FOX. JUST IN THE NICK OF TIME, "); + } + // Row sum indicates we're completing a machine trap. + else + { + Console.Write("LET'S SEE YOU GET OUT OF THIS: "); + } + + Console.WriteLine($"MACHINE MOVES TO {IndexToCoord(RowsByPlane[row, space])}"); + + return MachineAction.Move; + } + } + + // Unclear how this can be reached. + Console.WriteLine("MACHINE CONCEDES THIS GAME."); + return MachineAction.End; + } + + /// + /// Find a satisfactory plane on the board and move to one if that + /// plane's corner-edges. + /// + /// A plane on the board is satisfactory if it meets the following + /// conditions: + /// 1. Player has made exactly 4 moves on the plane. + /// 2. Machine has made either 0 or one moves on the plane. + /// The machine then attempts to move to a corner-edge in that plane, + /// first finding any potential moves from the previous action it took + /// and moving there, and moving to any open corner-edge if there are + /// no potential moves found. + /// + /// This action by the machine tries to prevent the player from having + /// exclusive control over any plane in the board. + /// + /// Original BASIC: 1830-2020 + /// + /// The BASIC code for this action is tightly bound with base code for + /// MoveCornerEdges. + /// + /// + /// Move if a move in a plane was found, + /// None otherwise + /// + private MachineAction MoveByPlane() + { + // For each plane in the cube... + for (int plane = 1; plane <= 18; plane++) + { + double planeSum = PlaneSum(plane); + + // Check that plane sum satisfies condition. + const double P4 = PLAYER * 4; + const double P4_M1 = (PLAYER * 4) + MACHINE; + if ( + (planeSum >= P4 && planeSum < P4 + 1) || + (planeSum >= P4_M1 && planeSum < P4_M1 + 1) + ) + { + // Try to move to corner edges in each row of plane + // First, check for corner edges marked as POTENTIAL. + for (int row = (4 * plane) - 4; row < (4 * plane); row++) + { + var moveResult = MoveCornerEdges(row, POTENTIAL); + if (moveResult != MachineAction.None) + { + return moveResult; + } + } + + // If no POTENTIAL corner-edge found, look for an EMPTY one. + for (int row = (4 * plane) - 4; row < (4 * plane); row++) + { + var moveResult = MoveCornerEdges(row, EMPTY); + if (moveResult != MachineAction.None) + { + return moveResult; + } + } + } + } + + // No good corner edges found by plane. + ClearPotentialMoves(); + return MachineAction.None; + } + + /// + /// Given a row, move to the first corner-edge of the cube that has the + /// given value. + /// + /// Corner edges are pieces of the cube that have two faces. The AI + /// prefers to move to these spaces before others, presumably + /// because they are powerful moves: a corner edge space is contained + /// in 3 rows on the cube. + /// + /// Original BASIC: 2360-2490 + /// + /// In the original BASIC, this code is pointed to from three different + /// locations by GOTOs (1440/50, or MakePlayerTrap; 1160/70, or + /// BlockMachineTrap; and 1990, or MoveByPlane). Interestingly, line + /// 2440 can only be reached if the code proceeds after a call from + /// 1990. In short, this means that the code flow is incredibly + /// difficult to understand; the block of code at 2360 acts like a + /// generalized subroutine, but contains bits of code that belong + /// to specific pieces of calling code. + /// + /// the row to try to move to + /// + /// what value the space to move to should have in Board + /// + /// + /// Move if a corner-edge piece in the row with the given spaceValue was + /// found, + /// None otherwise + /// + private MachineAction MoveCornerEdges(int row, double spaceValue) + { + // Given a row, we want to find the corner-edge pieces in that row. + // We know that each row is part of a plane, and that the first + // and last rows of the plane are on the plane edge, while the + // other two rows are in the middle. If we know whether a row is an + // edge or middle, we can determine which spaces in that row are + // corner-edges. + // + // Below is a birds-eye view of a plane in the cube, with rows + // oriented horizontally: + // + // row 0: ( ) (1) (2) ( ) + // row 1: (0) ( ) ( ) (3) + // row 2: (0) ( ) ( ) (3) + // row 3: ( ) (1) (2) ( ) + // + // The corner edge pieces have their row indices marked. The pattern + // above shows that: + // + // if row == 0 | 3, corner edge spaces = [1, 2] + // if row == 1 | 2, corner edge spaces = [0, 3] + + // The below condition replaces the following BASIC code (2370): + // + // I-(INT(I/4)*4)>1 + // + // which in C# would be: + // + // + // int a = i - (i / 4) * 4 <= 1) + // ? 1 + // : 2; + // + // In the above, i is the one-indexed row in RowsByPlane. + // + // This condition selects a different a value based on whether the + // given row is on the edge or middle of its plane. + int a = (row % 4) switch + { + 0 or 3 => 1, // row is on edge of plane + 1 or 2 => 2, // row is in middle of plane + _ => throw new Exception($"unreachable ({row % 4})"), + }; + + // Iterate through corner edge pieces of the row. + // + // if a = 1 (row is edge), iterate through [0, 3] + // if a = 2 (row is middle), iterate through [1, 2] + for (int space = a - 1; space <= 4 - a; space += 5 - (2 * a)) + { + if (Board[RowsByPlane[row, space]] == spaceValue) + { + // Found a corner-edge to take! + Board[RowsByPlane[row, space]] = MACHINE; + Console.WriteLine($"MACHINE TAKES {IndexToCoord(RowsByPlane[row, space])}"); + return MachineAction.Move; + } + } + + // No valid corner edge to take. + return MachineAction.None; + } + + /// + /// Find the first open corner or center in the board and move there. + /// + /// Original BASIC: 1200-1290 + /// + /// This is the only place where the Z variable from the BASIC code is + /// used; here it is implied in the for loop. + /// + /// + /// Move if an open corner/center was found and moved to, + /// None otherwise + /// + private MachineAction MoveCornerOrCenter() + { + foreach (int space in CornersAndCenters) + { + if (Board[space] == EMPTY) + { + Board[space] = MACHINE; + Console.WriteLine($"MACHINE MOVES TO {IndexToCoord(space)}"); + return MachineAction.Move; + } + } + + return MachineAction.None; + } + + /// + /// Find the first open space in the board and move there. + /// + /// Original BASIC: 1720-1800 + /// + /// + /// Move if an open space was found and moved to, + /// None otherwise + /// + private MachineAction MoveAnyOpenSpace() + { + for (int row = 0; row < 64; row++) + { + if (Board[row] == EMPTY) + { + Board[row] = MACHINE; + Console.WriteLine($"MACHINE LIKES {IndexToCoord(row)}"); + return MachineAction.Move; + } + } + return MachineAction.None; + } + + /// + /// Draw the game in the event that there are no open spaces. + /// + /// Original BASIC: 1810-1820 + /// + /// End + private MachineAction DrawGame() + { + Console.WriteLine("THIS GAME IS A DRAW."); + return MachineAction.End; + } + + #endregion + + /*********************************************************************** + /* Helpers + /**********************************************************************/ + #region Helpers + + /// + /// Attempt to transform a cube coordinate to an index into Board. + /// + /// A valid cube coordinate is a three-digit number, where each digit + /// of the number X satisfies 1 <= X <= 4. + /// + /// Examples: + /// 111 -> 0 + /// 444 -> 63 + /// 232 -> 35 + /// + /// If the coord provided is not valid, the transformation fails. + /// + /// The conversion from coordinate to index is essentially a conversion + /// between base 4 and base 10. + /// + /// Original BASIC: 525-580 + /// + /// This method fixes a bug in the original BASIC (525-526), which only + /// checked whether the given coord satisfied 111 <= coord <= 444. This + /// allows invalid coordinates such as 199 and 437, whose individual + /// digits are out of range. + /// + /// cube coordinate (e.g. "111", "342") + /// trasnformation output + /// + /// true if the transformation was successful, false otherwise + /// + private static bool TryCoordToIndex(int coord, out int index) + { + // parse individual digits, subtract 1 to get base 4 number + var hundreds = (coord / 100) - 1; + var tens = ((coord % 100) / 10) - 1; + var ones = (coord % 10) - 1; + + // bounds check for each digit + foreach (int digit in new int[] { hundreds, tens, ones }) + { + if (digit < 0 || digit > 3) + { + index = -1; + return false; + } + } + + // conversion from base 4 to base 10 + index = (16 * hundreds) + (4 * tens) + ones; + return true; + } + + /// + /// Transform a Board index into a valid cube coordinate. + /// + /// Examples: + /// 0 -> 111 + /// 63 -> 444 + /// 35 -> 232 + /// + /// The conversion from index to coordinate is essentially a conversion + /// between base 10 and base 4. + /// + /// Original BASIC: 1570-1610 + /// + /// Board index + /// the corresponding cube coordinate + private static int IndexToCoord(int index) + { + // check that index is valid + if (index < 0 || index > 63) + { + // runtime exception; all uses of this method are with + // indices provided by the program, so this should never fail + throw new Exception($"index {index} is out of range"); + } + + // convert to base 4, add 1 to get cube coordinate + var hundreds = (index / 16) + 1; + var tens = ((index % 16) / 4) + 1; + var ones = (index % 4) + 1; + + // concatenate digits + int coord = (hundreds * 100) + (tens * 10) + ones; + return coord; + } + + /// + /// Refresh the values in RowSums to account for any changes. + /// + /// Original BASIC: 1640-1710 + /// + private void RefreshRowSums() + { + for (var row = 0; row < 76; row++) + { + RefreshRowSum(row); + } + } + + /// + /// Refresh a row in RowSums to reflect changes. + /// + /// row in RowSums to refresh + /// row sum after refresh + private double RefreshRowSum(int row) + { + double rowSum = 0; + for (int space = 0; space < 4; space++) + { + rowSum += Board[RowsByPlane[row, space]]; + } + RowSums[row] = rowSum; + return rowSum; + } + + /// + /// Calculate the sum of spaces in one of the 18 cube planes in RowSums. + /// + /// Original BASIC: 1840-1890 + /// + /// the desired plane + /// sum of spaces in plane + private double PlaneSum(int plane) + { + double planeSum = 0; + for (int row = (4 * (plane - 1)); row < (4 * plane); row++) + { + for (int space = 0; space < 4; space++) + { + planeSum += Board[RowsByPlane[row, space]]; + } + } + return planeSum; + } + + /// + /// Check whether the board is in a draw state, that is all spaces are + /// full and neither the player nor the machine has won. + /// + /// The original BASIC contains a bug that if the player moves first, a + /// draw will go undetected. An example series of player inputs + /// resulting in such a draw (assuming player goes first): + /// + /// 114, 414, 144, 444, 122, 221, 112, 121, + /// 424, 332, 324, 421, 231, 232, 244, 311, + /// 333, 423, 331, 134, 241, 243, 143, 413, + /// 142, 212, 314, 341, 432, 412, 431, 442 + /// + /// whether the game is a draw + private bool CheckDraw() + { + for (var i = 0; i < 64; i++) + { + if (Board[i] != PLAYER && Board[i] != MACHINE) + { + return false; + } + } + + RefreshRowSums(); + + for (int row = 0; row < 76; row++) + { + var rowSum = RowSums[row]; + if (rowSum == PLAYER * 4 || rowSum == MACHINE * 4) + { + return false; + } + } + + + return true; + } + + /// + /// Reset POTENTIAL spaces in Board to EMPTY. + /// + /// Original BASIC: 2500-2540 + /// + private void ClearPotentialMoves() + { + for (var i = 0; i < 64; i++) + { + if (Board[i] == POTENTIAL) + { + Board[i] = EMPTY; + } + } + } + + /// + /// Reset all spaces in Board to EMPTY. + /// + /// Original BASIC: 400-420 + /// + private void ClearBoard() + { + for (var i = 0; i < 64; i++) + { + Board[i] = EMPTY; + } + } + + #endregion + } +} diff --git a/88_3-D_Tic-Tac-Toe/csharp/QubicData.cs b/88_3-D_Tic-Tac-Toe/csharp/QubicData.cs new file mode 100644 index 00000000..298ee933 --- /dev/null +++ b/88_3-D_Tic-Tac-Toe/csharp/QubicData.cs @@ -0,0 +1,559 @@ +namespace ThreeDTicTacToe +{ + /// + /// Data in this class was originally given by the following DATA section in + /// the BASIC program: + /// + /// 2030 DATA 1,49,52,4,13,61,64,16,22,39,23,38,26,42,27,43 + /// 2040 DATA 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 + /// 2050 DATA 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38 + /// 2060 DATA 39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56 + /// 2070 DATA 57,58,59,60,61,62,63,64 + /// 2080 DATA 1,17,33,49,5,21,37,53,9,25,41,57,13,29,45,61 + /// 2090 DATA 2,18,34,50,6,22,38,54,10,26,42,58,14,30,46,62 + /// 2100 DATA 3,19,35,51,7,23,39,55,11,27,43,59,15,31,47,63 + /// 2110 DATA 4,20,36,52,8,24,40,56,12,28,44,60,16,32,48,64 + /// 2120 DATA 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61 + /// 2130 DATA 2,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62 + /// 2140 DATA 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63 + /// 2150 DATA 4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64 + /// 2160 DATA 1,6,11,16,17,22,27,32,33,38,43,48,49,54,59,64 + /// 2170 DATA 13,10,7,4,29,26,23,20,45,42,39,36,61,58,55,52 + /// 2180 DATA 1,21,41,61,2,22,42,62,3,23,43,63,4,24,44,64 + /// 2190 DATA 49,37,25,13,50,38,26,14,51,39,27,15,52,40,28,16 + /// 2200 DATA 1,18,35,52,5,22,39,56,9,26,43,60,13,30,47,64 + /// 2210 DATA 49,34,19,4,53,38,23,8,57,42,27,12,61,46,31,16 + /// 2220 DATA 1,22,43,64,16,27,38,49,4,23,42,61,13,26,39,52 + /// + /// In short, each number is an index into the board. The data in this class + /// is zero-indexed, as opposed to the original data which was one-indexed. + /// + internal static class QubicData + { + /// + /// The corners and centers of the Qubic board. They correspond to the + /// following coordinates: + /// + /// [ + /// 111, 411, 414, 114, 141, 441, 444, 144, + /// 222, 323, 223, 322, 232, 332, 233, 333 + /// ] + /// + public static readonly int[] CornersAndCenters = new int[16] + { + // (X) ( ) ( ) (X) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // (X) ( ) ( ) (X) + + // ( ) ( ) ( ) ( ) + // ( ) (X) (X) ( ) + // ( ) (X) (X) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) (X) (X) ( ) + // ( ) (X) (X) ( ) + // ( ) ( ) ( ) ( ) + + // (X) ( ) ( ) (X) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // (X) ( ) ( ) (X) + + 0,48,51,3,12,60,63,15,21,38,22,37,25,41,26,42 + }; + + /// + /// A list of all "winning" rows in the Qubic board; that is, sets of + /// four spaces that, if filled entirely by the player (or machine), + /// would result in a win. + /// + /// Each group of four rows in the list corresponds to a plane in the + /// cube, and each plane is organized so that the first and last rows + /// are on the plane's edges, while the second and third rows are in + /// the middle of the plane. The only exception is the last group of + /// rows, which contains the corners and centers rather than a plane. + /// + /// The order of the rows in this list is key to how the Qubic AI + /// decides its next move. + /// + public static readonly int[,] RowsByPlane = new int[76, 4] + { + // (1) (1) (1) (1) + // (2) (2) (2) (2) + // (3) (3) (3) (3) + // (4) (4) (4) (4) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + { 0, 1, 2, 3, }, + { 4, 5, 6, 7, }, + { 8, 9, 10,11, }, + { 12,13,14,15, }, + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // (1) (1) (1) (1) + // (2) (2) (2) (2) + // (3) (3) (3) (3) + // (4) (4) (4) (4) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + { 16,17,18,19, }, + { 20,21,22,23, }, + { 24,25,26,27, }, + { 28,29,30,31, }, + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // (1) (1) (1) (1) + // (2) (2) (2) (2) + // (3) (3) (3) (3) + // (4) (4) (4) (4) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + { 32,33,34,35, }, + { 36,37,38,39, }, + { 40,41,42,43, }, + { 44,45,46,47, }, + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // (1) (1) (1) (1) + // (2) (2) (2) (2) + // (3) (3) (3) (3) + // (4) (4) (4) (4) + + { 48,49,50,51, }, + { 52,53,54,55, }, + { 56,57,58,59, }, + { 60,61,62,63, }, + + // (1) ( ) ( ) ( ) + // (2) ( ) ( ) ( ) + // (3) ( ) ( ) ( ) + // (4) ( ) ( ) ( ) + + // (1) ( ) ( ) ( ) + // (2) ( ) ( ) ( ) + // (3) ( ) ( ) ( ) + // (4) ( ) ( ) ( ) + + // (1) ( ) ( ) ( ) + // (2) ( ) ( ) ( ) + // (3) ( ) ( ) ( ) + // (4) ( ) ( ) ( ) + + // (1) ( ) ( ) ( ) + // (2) ( ) ( ) ( ) + // (3) ( ) ( ) ( ) + // (4) ( ) ( ) ( ) + + { 0, 16,32,48, }, + { 4, 20,36,52, }, + { 8, 24,40,56, }, + { 12,28,44,60, }, + + // ( ) (1) ( ) ( ) + // ( ) (2) ( ) ( ) + // ( ) (3) ( ) ( ) + // ( ) (4) ( ) ( ) + + // ( ) (1) ( ) ( ) + // ( ) (2) ( ) ( ) + // ( ) (3) ( ) ( ) + // ( ) (4) ( ) ( ) + + // ( ) (1) ( ) ( ) + // ( ) (2) ( ) ( ) + // ( ) (3) ( ) ( ) + // ( ) (4) ( ) ( ) + + // ( ) (1) ( ) ( ) + // ( ) (2) ( ) ( ) + // ( ) (3) ( ) ( ) + // ( ) (4) ( ) ( ) + + { 1, 17,33,49, }, + { 5, 21,37,53, }, + { 9, 25,41,57, }, + { 13,29,45,61, }, + + // ( ) ( ) (1) ( ) + // ( ) ( ) (2) ( ) + // ( ) ( ) (3) ( ) + // ( ) ( ) (4) ( ) + + // ( ) ( ) (1) ( ) + // ( ) ( ) (2) ( ) + // ( ) ( ) (3) ( ) + // ( ) ( ) (4) ( ) + + // ( ) ( ) (1) ( ) + // ( ) ( ) (2) ( ) + // ( ) ( ) (3) ( ) + // ( ) ( ) (4) ( ) + + // ( ) ( ) (1) ( ) + // ( ) ( ) (2) ( ) + // ( ) ( ) (3) ( ) + // ( ) ( ) (4) ( ) + + { 2, 18,34,50, }, + { 6, 22,38,54, }, + { 10,26,42,58, }, + { 14,30,46,62, }, + + // ( ) ( ) ( ) (1) + // ( ) ( ) ( ) (2) + // ( ) ( ) ( ) (3) + // ( ) ( ) ( ) (4) + + // ( ) ( ) ( ) (1) + // ( ) ( ) ( ) (2) + // ( ) ( ) ( ) (3) + // ( ) ( ) ( ) (4) + + // ( ) ( ) ( ) (1) + // ( ) ( ) ( ) (2) + // ( ) ( ) ( ) (3) + // ( ) ( ) ( ) (4) + + // ( ) ( ) ( ) (1) + // ( ) ( ) ( ) (2) + // ( ) ( ) ( ) (3) + // ( ) ( ) ( ) (4) + + { 3, 19,35,51, }, + { 7, 23,39,55, }, + { 11,27,43,59, }, + { 15,31,47,63, }, + + // (1) ( ) ( ) ( ) + // (1) ( ) ( ) ( ) + // (1) ( ) ( ) ( ) + // (1) ( ) ( ) ( ) + + // (2) ( ) ( ) ( ) + // (2) ( ) ( ) ( ) + // (2) ( ) ( ) ( ) + // (2) ( ) ( ) ( ) + + // (3) ( ) ( ) ( ) + // (3) ( ) ( ) ( ) + // (3) ( ) ( ) ( ) + // (3) ( ) ( ) ( ) + + // (4) ( ) ( ) ( ) + // (4) ( ) ( ) ( ) + // (4) ( ) ( ) ( ) + // (4) ( ) ( ) ( ) + + { 0, 4, 8, 12, }, + { 16,20,24,28, }, + { 32,36,40,44, }, + { 48,52,56,60, }, + + // ( ) (1) ( ) ( ) + // ( ) (1) ( ) ( ) + // ( ) (1) ( ) ( ) + // ( ) (1) ( ) ( ) + + // ( ) (2) ( ) ( ) + // ( ) (2) ( ) ( ) + // ( ) (2) ( ) ( ) + // ( ) (2) ( ) ( ) + + // ( ) (3) ( ) ( ) + // ( ) (3) ( ) ( ) + // ( ) (3) ( ) ( ) + // ( ) (3) ( ) ( ) + + // ( ) (4) ( ) ( ) + // ( ) (4) ( ) ( ) + // ( ) (4) ( ) ( ) + // ( ) (4) ( ) ( ) + + { 1, 5, 9, 13, }, + { 17,21,25,29, }, + { 33,37,41,45, }, + { 49,53,57,61, }, + + // ( ) ( ) (1) ( ) + // ( ) ( ) (1) ( ) + // ( ) ( ) (1) ( ) + // ( ) ( ) (1) ( ) + + // ( ) ( ) (2) ( ) + // ( ) ( ) (2) ( ) + // ( ) ( ) (2) ( ) + // ( ) ( ) (2) ( ) + + // ( ) ( ) (3) ( ) + // ( ) ( ) (3) ( ) + // ( ) ( ) (3) ( ) + // ( ) ( ) (3) ( ) + + // ( ) ( ) (4) ( ) + // ( ) ( ) (4) ( ) + // ( ) ( ) (4) ( ) + // ( ) ( ) (4) ( ) + + { 2, 6, 10,14, }, + { 18,22,26,30, }, + { 34,38,42,46, }, + { 50,54,58,62, }, + + // ( ) ( ) ( ) (1) + // ( ) ( ) ( ) (1) + // ( ) ( ) ( ) (1) + // ( ) ( ) ( ) (1) + + // ( ) ( ) ( ) (2) + // ( ) ( ) ( ) (2) + // ( ) ( ) ( ) (2) + // ( ) ( ) ( ) (2) + + // ( ) ( ) ( ) (3) + // ( ) ( ) ( ) (3) + // ( ) ( ) ( ) (3) + // ( ) ( ) ( ) (3) + + // ( ) ( ) ( ) (4) + // ( ) ( ) ( ) (4) + // ( ) ( ) ( ) (4) + // ( ) ( ) ( ) (4) + + { 3, 7, 11,15, }, + { 19,23,27,31, }, + { 35,39,43,47, }, + { 51,55,59,63, }, + + // (1) ( ) ( ) ( ) + // ( ) (1) ( ) ( ) + // ( ) ( ) (1) ( ) + // ( ) ( ) ( ) (1) + + // (2) ( ) ( ) ( ) + // ( ) (2) ( ) ( ) + // ( ) ( ) (2) ( ) + // ( ) ( ) ( ) (2) + + // (3) ( ) ( ) ( ) + // ( ) (3) ( ) ( ) + // ( ) ( ) (3) ( ) + // ( ) ( ) ( ) (3) + + // (4) ( ) ( ) ( ) + // ( ) (4) ( ) ( ) + // ( ) ( ) (4) ( ) + // ( ) ( ) ( ) (4) + + { 0, 5, 10,15, }, + { 16,21,26,31, }, + { 32,37,42,47, }, + { 48,53,58,63, }, + + // ( ) ( ) ( ) (1) + // ( ) ( ) (1) ( ) + // ( ) (1) ( ) ( ) + // (1) ( ) ( ) ( ) + + // ( ) ( ) ( ) (2) + // ( ) ( ) (2) ( ) + // ( ) (2) ( ) ( ) + // (2) ( ) ( ) ( ) + + // ( ) ( ) ( ) (3) + // ( ) ( ) (3) ( ) + // ( ) (3) ( ) ( ) + // (3) ( ) ( ) ( ) + + // ( ) ( ) ( ) (4) + // ( ) ( ) (4) ( ) + // ( ) (4) ( ) ( ) + // (4) ( ) ( ) ( ) + + { 12,9, 6, 3, }, + { 28,25,22,19, }, + { 44,41,38,35, }, + { 60,57,54,51, }, + + // (1) (2) (3) (4) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // (1) (2) (3) (4) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // (1) (2) (3) (4) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // (1) (2) (3) (4) + + { 0, 20,40,60, }, + { 1, 21,41,61, }, + { 2, 22,42,62, }, + { 3, 23,43,63, }, + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // (1) (2) (3) (4) + + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // (1) (2) (3) (4) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // (1) (2) (3) (4) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + // (1) (2) (3) (4) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + + { 48,36,24,12, }, + { 49,37,25,13, }, + { 50,38,26,14, }, + { 51,39,27,15, }, + + // (1) ( ) ( ) ( ) + // (2) ( ) ( ) ( ) + // (3) ( ) ( ) ( ) + // (4) ( ) ( ) ( ) + + // ( ) (1) ( ) ( ) + // ( ) (2) ( ) ( ) + // ( ) (3) ( ) ( ) + // ( ) (4) ( ) ( ) + + // ( ) ( ) (1) ( ) + // ( ) ( ) (2) ( ) + // ( ) ( ) (3) ( ) + // ( ) ( ) (4) ( ) + + // ( ) ( ) ( ) (1) + // ( ) ( ) ( ) (2) + // ( ) ( ) ( ) (3) + // ( ) ( ) ( ) (4) + + { 0, 17,34,51, }, + { 4, 21,38,55, }, + { 8, 25,42,59, }, + { 12,29,46,63, }, + + // ( ) ( ) ( ) (1) + // ( ) ( ) ( ) (2) + // ( ) ( ) ( ) (3) + // ( ) ( ) ( ) (4) + + // ( ) ( ) (1) ( ) + // ( ) ( ) (2) ( ) + // ( ) ( ) (3) ( ) + // ( ) ( ) (4) ( ) + + // ( ) (1) ( ) ( ) + // ( ) (2) ( ) ( ) + // ( ) (3) ( ) ( ) + // ( ) (4) ( ) ( ) + + // (1) ( ) ( ) ( ) + // (2) ( ) ( ) ( ) + // (3) ( ) ( ) ( ) + // (4) ( ) ( ) ( ) + + { 48,33,18,3, }, + { 52,37,22,7, }, + { 56,41,26,11, }, + { 60,45,30,15, }, + + // (1) ( ) ( ) (3) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // (4) ( ) ( ) (2) + + // ( ) ( ) ( ) ( ) + // ( ) (1) (3) ( ) + // ( ) (4) (2) ( ) + // ( ) ( ) ( ) ( ) + + // ( ) ( ) ( ) ( ) + // ( ) (2) (4) ( ) + // ( ) (3) (1) ( ) + // ( ) ( ) ( ) ( ) + + // (2) ( ) ( ) (4) + // ( ) ( ) ( ) ( ) + // ( ) ( ) ( ) ( ) + // (3) ( ) ( ) (1) + + { 0, 21,42,63, }, + { 15,26,37,48, }, + { 3, 22,41,60, }, + { 12,25,38,51, }, + }; + } +} From 46c80ea8932d0cc224034f7aeea7fd5873f50c08 Mon Sep 17 00:00:00 2001 From: Noah Pauls Date: Mon, 17 Jan 2022 19:47:44 -0800 Subject: [PATCH 65/82] updated comments with better details --- 88_3-D_Tic-Tac-Toe/csharp/Qubic.cs | 104 ++++++++++++++++------------- 1 file changed, 59 insertions(+), 45 deletions(-) diff --git a/88_3-D_Tic-Tac-Toe/csharp/Qubic.cs b/88_3-D_Tic-Tac-Toe/csharp/Qubic.cs index 595db661..513651d6 100644 --- a/88_3-D_Tic-Tac-Toe/csharp/Qubic.cs +++ b/88_3-D_Tic-Tac-Toe/csharp/Qubic.cs @@ -568,9 +568,15 @@ namespace ThreeDTicTacToe /// /// If a player trap is not possible, but a row is found that is /// particularly advantageous for the machine to move to, the machine - /// will try and move to a corner-edge in that row. + /// will try and move to a plane edge in that row. /// /// Original BASIC: 1300-1480 + /// + /// Lines 1440/50 of the BASIC call 2360 (MovePlaneEdge). Because it + /// goes to this code only after it has found an open space marked as + /// potential, it cannot reach line 2440 of that code, as that is only + /// reached if an open space failed to be found in the row on which + /// that code was called. /// /// /// Move if a trap was created, @@ -618,11 +624,11 @@ namespace ThreeDTicTacToe // A row may be particularly advantageous for the machine to // move to at this point; this is the case if a row is entirely // filled with POTENTIAL or has one MACHINE and others - // POTENTIAL. + // POTENTIAL. Such rows may help set up trapping opportunities. if (RowSums[row] == (POTENTIAL * 4) || RowSums[row] == MACHINE + (POTENTIAL * 3)) { - // Try moving to a corner-edge in an advantageous row. - return MoveCornerEdges(row, POTENTIAL); + // Try moving to a plane edge in an advantageous row. + return MovePlaneEdge(row, POTENTIAL); } } @@ -637,9 +643,15 @@ namespace ThreeDTicTacToe /// /// If there are no player traps to block, but a row is found that is /// particularly advantageous for the player to move to, the machine - /// will try and move to a corner-edge in that row. + /// will try and move to a plane edge in that row. /// /// Original BASIC: 1030-1190 + /// + /// Lines 1160/1170 of the BASIC call 2360 (MovePlaneEdge). As with + /// MakePlayerTrap, because it goes to this code only after it has + /// found an open space marked as potential, it cannot reach line 2440 + /// of that code, as that is only reached if an open space failed to be + /// found in the row on which that code was called. /// /// /// Move if a trap was created, @@ -685,11 +697,12 @@ namespace ThreeDTicTacToe { // A row may be particularly advantageous for the player to move // to at this point, indicated by a row containing all POTENTIAL - // moves or one PLAYER and rest POTENTIAL. + // moves or one PLAYER and rest POTENTIAL. Such rows may aid in + // in the later creation of traps. if (RowSums[row] == (POTENTIAL * 4) || RowSums[row] == PLAYER + (POTENTIAL * 3)) { - // Try moving to a corner-edge in an advantageous row. - return MoveCornerEdges(row, POTENTIAL); + // Try moving to a plane edge in an advantageous row. + return MovePlaneEdge(row, POTENTIAL); } } @@ -743,24 +756,20 @@ namespace ThreeDTicTacToe /// /// Find a satisfactory plane on the board and move to one if that - /// plane's corner-edges. + /// plane's plane edges. /// /// A plane on the board is satisfactory if it meets the following /// conditions: /// 1. Player has made exactly 4 moves on the plane. /// 2. Machine has made either 0 or one moves on the plane. - /// The machine then attempts to move to a corner-edge in that plane, - /// first finding any potential moves from the previous action it took - /// and moving there, and moving to any open corner-edge if there are - /// no potential moves found. - /// - /// This action by the machine tries to prevent the player from having - /// exclusive control over any plane in the board. + /// Such a plane is one that the player could likely use to form traps. /// /// Original BASIC: 1830-2020 /// - /// The BASIC code for this action is tightly bound with base code for - /// MoveCornerEdges. + /// Line 1990 of the original basic calls 2370 (MovePlaneEdge). Only on + /// this call to MovePlaneEdge can line 2440 of that method be reached, + /// which surves to help this method iterate through the rows of a + /// plane. /// /// /// Move if a move in a plane was found, @@ -781,21 +790,21 @@ namespace ThreeDTicTacToe (planeSum >= P4_M1 && planeSum < P4_M1 + 1) ) { - // Try to move to corner edges in each row of plane - // First, check for corner edges marked as POTENTIAL. + // Try to move to plane edges in each row of plane + // First, check for plane edges marked as POTENTIAL. for (int row = (4 * plane) - 4; row < (4 * plane); row++) { - var moveResult = MoveCornerEdges(row, POTENTIAL); + var moveResult = MovePlaneEdge(row, POTENTIAL); if (moveResult != MachineAction.None) { return moveResult; } } - // If no POTENTIAL corner-edge found, look for an EMPTY one. + // If no POTENTIAL plane edge found, look for an EMPTY one. for (int row = (4 * plane) - 4; row < (4 * plane); row++) { - var moveResult = MoveCornerEdges(row, EMPTY); + var moveResult = MovePlaneEdge(row, EMPTY); if (moveResult != MachineAction.None) { return moveResult; @@ -804,48 +813,53 @@ namespace ThreeDTicTacToe } } - // No good corner edges found by plane. + // No satisfactory planes with open plane edges found. ClearPotentialMoves(); return MachineAction.None; } /// - /// Given a row, move to the first corner-edge of the cube that has the - /// given value. + /// Given a row, move to the first space in that row that: + /// 1. is a plane edge, and + /// 2. has the given value in Board /// - /// Corner edges are pieces of the cube that have two faces. The AI + /// Plane edges are any spaces on a plane with one face exposed. The AI /// prefers to move to these spaces before others, presumably - /// because they are powerful moves: a corner edge space is contained - /// in 3 rows on the cube. + /// because they are powerful moves: a plane edge is contained on 3-4 + /// winning rows of the cube. /// /// Original BASIC: 2360-2490 /// /// In the original BASIC, this code is pointed to from three different - /// locations by GOTOs (1440/50, or MakePlayerTrap; 1160/70, or - /// BlockMachineTrap; and 1990, or MoveByPlane). Interestingly, line - /// 2440 can only be reached if the code proceeds after a call from - /// 1990. In short, this means that the code flow is incredibly - /// difficult to understand; the block of code at 2360 acts like a - /// generalized subroutine, but contains bits of code that belong - /// to specific pieces of calling code. + /// locations by GOTOs: + /// - 1440/50, or MakePlayerTrap; + /// - 1160/70, or BlockMachineTrap; and + /// - 1990, or MoveByPlane. + /// At line 2440, this code jumps back to line 2000, which is in + /// MoveByPlane. This makes it appear as though calling MakePlayerTrap + /// or BlockPlayerTrap in the BASIC could jump into the middle of the + /// MoveByPlane method; were this to happen, not all of MoveByPlane's + /// variables would be defined! However, the program logic prevents + /// this from ever occurring; see each method's description for why + /// this is the case. /// /// the row to try to move to /// /// what value the space to move to should have in Board /// /// - /// Move if a corner-edge piece in the row with the given spaceValue was + /// Move if a plane edge piece in the row with the given spaceValue was /// found, /// None otherwise /// - private MachineAction MoveCornerEdges(int row, double spaceValue) + private MachineAction MovePlaneEdge(int row, double spaceValue) { - // Given a row, we want to find the corner-edge pieces in that row. + // Given a row, we want to find the plane edge pieces in that row. // We know that each row is part of a plane, and that the first // and last rows of the plane are on the plane edge, while the // other two rows are in the middle. If we know whether a row is an // edge or middle, we can determine which spaces in that row are - // corner-edges. + // plane edges. // // Below is a birds-eye view of a plane in the cube, with rows // oriented horizontally: @@ -855,11 +869,11 @@ namespace ThreeDTicTacToe // row 2: (0) ( ) ( ) (3) // row 3: ( ) (1) (2) ( ) // - // The corner edge pieces have their row indices marked. The pattern + // The plane edge pieces have their row indices marked. The pattern // above shows that: // - // if row == 0 | 3, corner edge spaces = [1, 2] - // if row == 1 | 2, corner edge spaces = [0, 3] + // if row == 0 | 3, plane edge spaces = [1, 2] + // if row == 1 | 2, plane edge spaces = [0, 3] // The below condition replaces the following BASIC code (2370): // @@ -883,7 +897,7 @@ namespace ThreeDTicTacToe _ => throw new Exception($"unreachable ({row % 4})"), }; - // Iterate through corner edge pieces of the row. + // Iterate through plane edge pieces of the row. // // if a = 1 (row is edge), iterate through [0, 3] // if a = 2 (row is middle), iterate through [1, 2] @@ -891,7 +905,7 @@ namespace ThreeDTicTacToe { if (Board[RowsByPlane[row, space]] == spaceValue) { - // Found a corner-edge to take! + // Found a plane edge to take! Board[RowsByPlane[row, space]] = MACHINE; Console.WriteLine($"MACHINE TAKES {IndexToCoord(RowsByPlane[row, space])}"); return MachineAction.Move; From e016f785deab31369f0b27b9adc19f29e9ece5ff Mon Sep 17 00:00:00 2001 From: openback Date: Tue, 18 Jan 2022 00:26:34 -0500 Subject: [PATCH 66/82] Add Battle in python --- 09_Battle/python/battle.py | 165 +++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 09_Battle/python/battle.py diff --git a/09_Battle/python/battle.py b/09_Battle/python/battle.py new file mode 100644 index 00000000..8c992458 --- /dev/null +++ b/09_Battle/python/battle.py @@ -0,0 +1,165 @@ +#!/usr/bin/env python3 +from random import randrange +from typing import List, Tuple + +PointType = Tuple[int, int] +VectorType = PointType +SeaType = Tuple[List[int], ...] + +SEA_WIDTH = 6 +DESTROYER_LENGTH = 2 +CRUISER_LENGTH = 3 +AIRCRAFT_CARRIER_LENGTH = 4 + + +def random_vector() -> Tuple[int, int]: + while True: + vector = (randrange(-1, 2), randrange(-1, 2)) + + if vector == (0, 0): + # We can't have a zero vector, so try again + continue + + return vector + + +def add_vector(point: PointType, vector: VectorType) -> PointType: + return (point[0] + vector[0], point[1] + vector[1]) + + +def place_ship(sea: SeaType, size: int, code: int) -> None: + while True: + start = (randrange(1, SEA_WIDTH + 1), randrange(1, SEA_WIDTH + 1)) + vector = random_vector() + + # Get potential ship points + point = start + points = [] + + for _ in range(size): + point = add_vector(point, vector) + points.append(point) + + if not (all([is_within_sea(point, sea) for point in points]) and + all([value_at(point, sea) == 0 for point in points])): + # ship out of bounds or crosses other ship, trying again + continue + + # We found a valid spot, so actually place it now + for point in points: + set_value_at(code, point, sea) + + break + + +def print_encoded_sea(sea: SeaType) -> None: + for x in range(len(sea)): + print(' '.join([str(sea[y][x]) for y in range(len(sea) - 1, -1, -1)])) + + +def is_within_sea(point: PointType, sea: SeaType) -> bool: + return (1 <= point[0] <= len(sea)) and (1 <= point[1] <= len(sea)) + + +def has_ship(sea: SeaType, code: int) -> bool: + return any(code in row for row in sea) + + +def count_sunk(sea: SeaType, codes: Tuple[int, ...]) -> int: + return sum(not has_ship(sea, code) for code in codes) + + +def value_at(point: PointType, sea: SeaType) -> int: + return sea[point[1] - 1][point[0] -1] + + +def set_value_at(value: int, point: PointType, sea: SeaType) -> None: + sea[point[1] - 1][point[0] -1] = value + + +def get_next_target(sea: SeaType) -> PointType: + while True: + try: + guess = input('? ') + point = guess.split(',') + + if len(point) != 2: + raise ValueError() + + point = (int(point[0]), int(point[1])) + + if not is_within_sea(point, sea): + raise ValueError() + + return point + except ValueError: + print(f'INVALID. SPECIFY TWO NUMBERS FROM 1 TO {len(sea)}, SEPARATED BY A COMMA.') + + +def setup_ships(sea: SeaType): + place_ship(sea, DESTROYER_LENGTH, 1) + place_ship(sea, DESTROYER_LENGTH, 2) + place_ship(sea, CRUISER_LENGTH, 3) + place_ship(sea, CRUISER_LENGTH, 4) + place_ship(sea, AIRCRAFT_CARRIER_LENGTH, 5) + place_ship(sea, AIRCRAFT_CARRIER_LENGTH, 6) + + +def main() -> None: + print(' BATTLE') + print('CREATIVE COMPUTING MORRISTOWN, NEW JERSEY') + print() + sea = tuple(([0 for _ in range(SEA_WIDTH)] for _ in range(SEA_WIDTH))) + setup_ships(sea) + print('THE FOLLOWING CODE OF THE BAD GUYS\' FLEET DISPOSITION') + print('HAS BEEN CAPTURED BUT NOT DECODED:') + print() + print_encoded_sea(sea) + print() + print('DE-CODE IT AND USE IT IF YOU CAN') + print('BUT KEEP THE DE-CODING METHOD A SECRET.') + print() + print('START GAME') + splashes = 0 + hits = 0 + + while True: + target = get_next_target(sea) + target_value = value_at(target, sea) + + if target_value < 0: + print(f'YOU ALREADY PUT A HOLE IN SHIP NUMBER {abs(target_value)} AT THAT POINT.') + + if target_value <= 0: + print('SPLASH! TRY AGAIN.') + splashes += 1 + continue + + print(f'A DIRECT HIT ON SHIP NUMBER {target_value}') + hits += 1 + set_value_at(-target_value, target, sea) + + if not has_ship(sea, target_value): + print('AND YOU SUNK IT. HURRAH FOR THE GOOD GUYS.') + print('SO FAR, THE BAD GUYS HAVE LOST') + print(f'{count_sunk(sea, (1, 2))} DESTROYER(S),', + f'{count_sunk(sea, (3, 4))} CRUISER(S),', + f'AND {count_sunk(sea, (5, 6))} AIRCRAFT CARRIER(S).') + + if any(has_ship(sea, code) for code in range(1, SEA_WIDTH + 1)): + print(f'YOUR CURRENT SPLASH/HIT RATIO IS {splashes}/{hits}') + continue + + print('YOU HAVE TOTALLY WIPED OUT THE BAD GUYS\' FLEET ' + f'WITH A FINAL SPLASH/HIT RATIO OF {splashes}/{hits}') + + if not splashes: + print('CONGRATULATIONS -- A DIRECT HIT EVERY TIME.') + + print() + print('****************************') + break + + +if __name__ == "__main__": + main() From 241c1f19597919df1625094e93f1a4ad34cfb895 Mon Sep 17 00:00:00 2001 From: Nezumi Ronin Date: Tue, 18 Jan 2022 10:56:57 -0600 Subject: [PATCH 67/82] Create life.pl --- 55_Life/perl/life.pl | 95 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 55_Life/perl/life.pl diff --git a/55_Life/perl/life.pl b/55_Life/perl/life.pl new file mode 100644 index 00000000..972cb322 --- /dev/null +++ b/55_Life/perl/life.pl @@ -0,0 +1,95 @@ +#!/usr/bin/perl +#use strict; + +print ' 'x 34 . "LIFE\n"; +print ' 'x 15 . "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n"; +print "\n"; print "\n"; print "\n"; +print "ENTER YOUR PATTERN; \n"; +$X1=1; $Y1=1; $X2=24; $Y2=70; +@A; +$C=1; + +@B; +Line30: +print "? "; chomp($B[$C] = uc()); +if ($B[$C] eq "DONE") { $B[$C]=""; goto Line80; } +$B[$C]=~ s/\./ /g; +$C=$C+1; +goto Line30; + + +Line80: + +$C=$C-1; $L=0; $G=0; +for ($X=1; $X<=$C-1; $X++) { + if (length($B[$X])>$L) { $L=length($B[$X]); } + } + +$X1=11-$C/2; +$Y1=33-$L/2; +for ($X=1; $X<=$C; $X++) { + for ($Y=1; $Y<=length($B[$X]); $Y++) { + if (substr($B[$X],$Y-1,1) ne " ") { $A[$X1+$X][$Y1+$Y]=1; $P=$P+1; } + } + } +print "\n"; print "\n"; print "\n"; + +Line210: +print "GENERATION: ".$G."\t\tPOPULATION: ".$P; if ($I9) { print "\tINVALID!"; } +print "\n"; +$X3=24; $Y3=70; $X4=1; $Y4=1; $P=0; +$G=$G+1; +for ($X=1; $X<=$X1-1; $X++) { print "\n"; } +for ($X=$X1; $X<=$X2; $X++) { + $Row= " "x 80; + for ($Y=$Y1; $Y<=$Y2; $Y++) { + if ($A[$X][$Y]==2) { $A[$X][$Y]=0; goto Line270; } + if ($A[$X][$Y]==3) { $A[$X][$Y]=1; goto Line261; } + if ($A[$X][$Y]!=1) { goto Line270; } + + Line261: + substr($Row, $Y, 1, "*"); + if ($X<$X3) { $X3=$X; } + if ($X>$X4) { $X4=$X; } + if ($Y<$Y3) { $Y3=$Y; } + if ($Y>$Y4) { $Y4=$Y; } + + Line270: + } + print "$Row\n"; + } + +for ($X=$X2+1; $X<=24; $X++) { print "\n"; } +$X1=$X3; $X2=$X4; $Y1=$Y3; $Y2=$Y4; +if ($X1<3) { $X1=3; $I9=-1; } +if ($X2>22) { $X2=22; $I9=-1; } +if ($Y1<3) { $Y1=3; $I9=-1; } +if ($Y2>68) { $Y2=68; $I9=-1; } +$P=0; + +for ($X=$X1-1; $X<=$X2+1; $X++) { + for ($Y=$Y1-1; $Y<=$Y2+1; $Y++) { + $C=0; + for ($I=$X-1; $I<=$X+1; $I++) { + for ($J=$Y-1; $J<=$Y+1; $J++) { + if ($A[$I][$J]==1 || $A[$I][$J]==2) { $C=$C+1; } + } + } + if ($A[$X][$Y]==0) { goto Line610; } + if ($C<3 || $C>4) { $A[$X][$Y]=2; goto Line600; } + $P=$P+1; + + Line600: + goto Line620; + + Line610: + if ($C==3) { $A[$X][$Y]=3; $P=$P+1; } + + Line620: + } + } +$X1=$X1-1; $Y1=$Y1-1; $X2=$X2+1; $Y2=$Y2+1; +goto Line210; +exit; + + From 853f1078daaa172a11ab3b9b4a294927cfe14f22 Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Wed, 19 Jan 2022 18:41:24 -0800 Subject: [PATCH 68/82] Update README.md add notes about difficulty of porting 3d tic tac toe due to extensive use of `GOTO` for complex logic. --- 88_3-D_Tic-Tac-Toe/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/88_3-D_Tic-Tac-Toe/README.md b/88_3-D_Tic-Tac-Toe/README.md index df9cabf4..678bac6b 100644 --- a/88_3-D_Tic-Tac-Toe/README.md +++ b/88_3-D_Tic-Tac-Toe/README.md @@ -6,6 +6,15 @@ Each move is indicated by a 3-digit number (digits not separated by commas), wit This version of 3-D TIC-TAC-TOE is from Dartmouth College. +### Conversion notes + +The AI code for TicTacToe2 depends quite heavily on the non-structured GOTO (I can almost hear Dijkstra now) and translation is quite challenging. This code relies very heavily on GOTOs that bind the code tightly together. Comments explain where that happens in the original. + +There are at least two bugs from the original BASIC: + +1. Code should only allow player to input valid 3D coordinates where every digit is between 1 and 4, but the original code allows any value between 111 and 444 (such as 297, for instance). +2. If the player moves first and the game ends in a draw, the original program will still prompt the player for a move instead of calling for a draw. + --- As published in Basic Computer Games (1978): From 37c469abb94fbb204293beb7cceac94d8c92e558 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Thu, 20 Jan 2022 10:55:46 +0200 Subject: [PATCH 69/82] Detect Option Strict for VB projects --- 00_Utilities/DotnetUtils/DotnetUtils/Program.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index 560a7207..6e51d4f1 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -232,13 +232,15 @@ void printProjectWarnings(PortInfo info) { nullable, implicitUsing, rootNamespace, - langVersion + langVersion, + optionStrict ) = ( getValue(parent, "TargetFramework", "TargetFrameworks"), getValue(parent, "Nullable"), getValue(parent, "ImplicitUsings"), getValue(parent, "RootNamespace"), - getValue(parent, "LangVersion") + getValue(parent, "LangVersion"), + getValue(parent, "OptionStrict") ); if (framework != "net6.0") { @@ -267,6 +269,9 @@ void printProjectWarnings(PortInfo info) { if (langVersion != "16.9") { warnings.Add($"LangVersion: {langVersion}"); } + if (optionStrict != "On") { + warnings.Add($"OptionStrict: {optionStrict}"); + } } if (warnings.Any()) { From fc934970e9533acee1581c449d706a636667c5b7 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Thu, 20 Jan 2022 10:56:19 +0200 Subject: [PATCH 70/82] Animal (VB.NET) implementation --- 03_Animal/vbnet/Animal.vbproj | 1 + 03_Animal/vbnet/Branch.vb | 28 +++++ 03_Animal/vbnet/Game.vb | 126 +++++++++++++++++++ 03_Animal/vbnet/Program.vb | 6 + 03_Animal/vbnet/Shared/ConsoleAdapter.vb | 28 +++++ 03_Animal/vbnet/Shared/ConsoleAdapterBase.vb | 9 ++ 03_Animal/vbnet/Shared/Extensions.vb | 21 ++++ 7 files changed, 219 insertions(+) create mode 100644 03_Animal/vbnet/Branch.vb create mode 100644 03_Animal/vbnet/Game.vb create mode 100644 03_Animal/vbnet/Program.vb create mode 100644 03_Animal/vbnet/Shared/ConsoleAdapter.vb create mode 100644 03_Animal/vbnet/Shared/ConsoleAdapterBase.vb create mode 100644 03_Animal/vbnet/Shared/Extensions.vb diff --git a/03_Animal/vbnet/Animal.vbproj b/03_Animal/vbnet/Animal.vbproj index f54e4e3d..f01d7b62 100644 --- a/03_Animal/vbnet/Animal.vbproj +++ b/03_Animal/vbnet/Animal.vbproj @@ -4,5 +4,6 @@ Animal net6.0 16.9 + On diff --git a/03_Animal/vbnet/Branch.vb b/03_Animal/vbnet/Branch.vb new file mode 100644 index 00000000..6734e39d --- /dev/null +++ b/03_Animal/vbnet/Branch.vb @@ -0,0 +1,28 @@ +Public Class Branch + Public Property Text As String + + Public ReadOnly Property IsEnd As Boolean + Get + Return Yes Is Nothing AndAlso No Is Nothing + End Get + End Property + + Public Property Yes As Branch + Public Property No As Branch + + Public Iterator Function DescendantTexts() As IEnumerable(Of String) + If Yes IsNot Nothing Then + Yield Yes.Text + For Each childText In Yes.DescendantTexts + Yield childText + Next + End If + + If No IsNot Nothing Then + Yield No.Text + For Each childText In No.DescendantTexts + Yield childText + Next + End If + End Function +End Class diff --git a/03_Animal/vbnet/Game.vb b/03_Animal/vbnet/Game.vb new file mode 100644 index 00000000..3bc2b2f6 --- /dev/null +++ b/03_Animal/vbnet/Game.vb @@ -0,0 +1,126 @@ +Option Compare Text + +Public Class Game + Private Shared ReadOnly YesNoResponses As New Dictionary(Of String, Boolean)(StringComparer.InvariantCultureIgnoreCase) From { + {"yes", True}, + {"y", True}, + {"true", True}, + {"t", True}, + {"1", True}, + {"no", False}, + {"n", False}, + {"false", False}, + {"f", False}, + {"0", False} + } + + ReadOnly console As ConsoleAdapterBase + ReadOnly root As New Branch With { + .Text = "DOES IT SWIM?", + .Yes = New Branch With {.Text = "FISH"}, + .No = New Branch With {.Text = "BIRD"} + } + + ''' Reduces a string or console input to True, False or Nothing. Case-insensitive. + ''' Optional String to reduce via the same logic. If not passed in, will use console.ReadLine + ''' + ''' Returns True for a "yes" response (yes, y, true, t, 1) and False for a "no" response (no, n, false, f, 0).
+ ''' Returns Nothing if the response doesn't match any of these. + '''
+ Private Function GetYesNo(Optional s As String = Nothing) As Boolean? + s = If(s, console.ReadLine) + Dim ret As Boolean + If YesNoResponses.TryGetValue(s, ret) Then Return ret + Return Nothing + End Function + + Sub New(console As ConsoleAdapterBase) + If console Is Nothing Then Throw New ArgumentNullException(NameOf(console)) + Me.console = console + End Sub + + + Sub BeginLoop() + console.WriteCenteredLine("ANIMAL") + console.WriteCenteredLine("CREATIVE COMPUTING MORRISTOWN, NEW JERSEY") + console.Write( +" + + +PLAY 'GUESS THE ANIMAL' + +THINK OF AN ANIMAL AND THE COMPUTER WILL TRY TO GUESS IT. + +") + + Do + console.Write("ARE YOU THINKING OF AN ANIMAL? ") + + Dim response = console.ReadLine + If response = "list" Then + console.WriteLine( +" +ANIMALS I ALREADY KNOW ARE:") + root.DescendantTexts.ForEach(Sub(text, index) + If index > 0 AndAlso index Mod 4 = 0 Then console.WriteLine() + console.Write($"{text.MaxLength(15),-15}") + End Sub) + console.WriteLine( +" +") + Continue Do + End If + + Dim ynResponse = GetYesNo(response) + If ynResponse Is Nothing OrElse Not ynResponse Then Continue Do + + Dim currentBranch = root + Do While Not currentBranch.IsEnd + console.Write($"{currentBranch.Text} ") + Do + ynResponse = GetYesNo() + Loop While ynResponse Is Nothing + currentBranch = If( + ynResponse, + currentBranch.Yes, + currentBranch.No + ) + Loop + + 'at end + console.Write($"IS IT A {currentBranch.Text}? ") + ynResponse = GetYesNo() + If ynResponse Then ' No difference between False or Nothing + console.WriteLine("WHY NOT TRY ANOTHER ANIMAL?") + Continue Do + End If + + console.Write("THE ANIMAL YOU WERE THINKING OF WAS A ? ") + Dim newAnimal = console.ReadLine + + console.WriteLine( +$"PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A +{newAnimal} FROM A {currentBranch.Text}") + Dim newQuestion = console.ReadLine + + console.Write( +$"FOR A {newAnimal} THE ANSWER WOULD BE ? ") + Do + ynResponse = GetYesNo() + Loop While ynResponse Is Nothing + + Dim newBranch = New Branch With {.Text = newAnimal} + Dim currentBranchCopy = New Branch With {.Text = currentBranch.Text} + currentBranch.Text = newQuestion + If ynResponse Then + currentBranch.Yes = newBranch + currentBranch.No = currentBranchCopy + Else + currentBranch.No = newBranch + currentBranch.Yes = currentBranchCopy + End If + + ' TODO how do we exit? + Loop + End Sub +End Class diff --git a/03_Animal/vbnet/Program.vb b/03_Animal/vbnet/Program.vb new file mode 100644 index 00000000..adb34932 --- /dev/null +++ b/03_Animal/vbnet/Program.vb @@ -0,0 +1,6 @@ +Module Program + Sub Main() + Dim game As New Game(New ConsoleAdapter) + game.BeginLoop() + End Sub +End Module diff --git a/03_Animal/vbnet/Shared/ConsoleAdapter.vb b/03_Animal/vbnet/Shared/ConsoleAdapter.vb new file mode 100644 index 00000000..132f1968 --- /dev/null +++ b/03_Animal/vbnet/Shared/ConsoleAdapter.vb @@ -0,0 +1,28 @@ +Public Class ConsoleAdapter + Inherits ConsoleAdapterBase + + Public Overrides Sub Write(value As Object) + Console.Write(value) + End Sub + + Public Overrides Sub WriteLine(value As Object) + Console.WriteLine(value) + End Sub + + Public Overrides Sub WriteLine() + Console.WriteLine() + End Sub + + Public Overrides Sub WriteCenteredLine(value As Object) + Dim toWrite = If(value?.ToString, "") + Console.WriteLine($"{Space((Console.WindowWidth - toWrite.Length) \ 2)}{toWrite}") + End Sub + + Public Overrides Function ReadLine() As String + Dim response As String + Do + response = Console.ReadLine + Loop While response Is Nothing + Return response.Trim + End Function +End Class diff --git a/03_Animal/vbnet/Shared/ConsoleAdapterBase.vb b/03_Animal/vbnet/Shared/ConsoleAdapterBase.vb new file mode 100644 index 00000000..4c9166bf --- /dev/null +++ b/03_Animal/vbnet/Shared/ConsoleAdapterBase.vb @@ -0,0 +1,9 @@ +Public MustInherit Class ConsoleAdapterBase + Public MustOverride Sub Write(value As Object) + Public MustOverride Sub WriteLine(value As Object) + Public MustOverride Sub WriteLine() + Public MustOverride Sub WriteCenteredLine(value As Object) + + ''' Implementations should always return a String without leading or trailing whitespace, never Nothng + Public MustOverride Function ReadLine() As String +End Class diff --git a/03_Animal/vbnet/Shared/Extensions.vb b/03_Animal/vbnet/Shared/Extensions.vb new file mode 100644 index 00000000..83d1914b --- /dev/null +++ b/03_Animal/vbnet/Shared/Extensions.vb @@ -0,0 +1,21 @@ +Imports System.Runtime.CompilerServices + +Public Module Extensions + Public Sub ForEach(Of T)(src As IEnumerable(Of T), action As Action(Of T, Integer)) + Dim index As Integer + For Each x In src + action(x, index) + index += 1 + Next + End Sub + + Public Function MaxLength(s As String, value As Integer) As String + If s Is Nothing Then Return Nothing + Return s.Substring(0, Math.Min(s.Length, value)) + End Function + + Public Function ForceEndsWith(s As String, toAppend As String) As String + If Not s.EndsWith(toAppend, StringComparison.OrdinalIgnoreCase) Then s += toAppend + Return s + End Function +End Module From eda88e358c2a886f8ced8c8f984749000dffb973 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Thu, 20 Jan 2022 11:03:38 +0200 Subject: [PATCH 71/82] Create test project --- .../vbnet/Animal.Tests/Animal.Tests.vbproj | 23 +++++++++++++++++ 03_Animal/vbnet/Animal.Tests/UnitTest1.vb | 12 +++++++++ 03_Animal/vbnet/Animal.sln | 25 +++++++++++++------ 03_Animal/vbnet/{ => Animal}/Animal.vbproj | 0 03_Animal/vbnet/{ => Animal}/Branch.vb | 0 03_Animal/vbnet/{ => Animal}/Game.vb | 0 03_Animal/vbnet/{ => Animal}/Program.vb | 0 .../{ => Animal}/Shared/ConsoleAdapter.vb | 0 .../{ => Animal}/Shared/ConsoleAdapterBase.vb | 0 .../vbnet/{ => Animal}/Shared/Extensions.vb | 0 10 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 03_Animal/vbnet/Animal.Tests/Animal.Tests.vbproj create mode 100644 03_Animal/vbnet/Animal.Tests/UnitTest1.vb rename 03_Animal/vbnet/{ => Animal}/Animal.vbproj (100%) rename 03_Animal/vbnet/{ => Animal}/Branch.vb (100%) rename 03_Animal/vbnet/{ => Animal}/Game.vb (100%) rename 03_Animal/vbnet/{ => Animal}/Program.vb (100%) rename 03_Animal/vbnet/{ => Animal}/Shared/ConsoleAdapter.vb (100%) rename 03_Animal/vbnet/{ => Animal}/Shared/ConsoleAdapterBase.vb (100%) rename 03_Animal/vbnet/{ => Animal}/Shared/Extensions.vb (100%) diff --git a/03_Animal/vbnet/Animal.Tests/Animal.Tests.vbproj b/03_Animal/vbnet/Animal.Tests/Animal.Tests.vbproj new file mode 100644 index 00000000..05d00314 --- /dev/null +++ b/03_Animal/vbnet/Animal.Tests/Animal.Tests.vbproj @@ -0,0 +1,23 @@ + + + + Animal.Tests + net6.0 + + false + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + diff --git a/03_Animal/vbnet/Animal.Tests/UnitTest1.vb b/03_Animal/vbnet/Animal.Tests/UnitTest1.vb new file mode 100644 index 00000000..fe32490e --- /dev/null +++ b/03_Animal/vbnet/Animal.Tests/UnitTest1.vb @@ -0,0 +1,12 @@ +Imports System +Imports Xunit + +Namespace Animal.Tests + Public Class UnitTest1 + + Sub TestSub() + + End Sub + End Class +End Namespace + diff --git a/03_Animal/vbnet/Animal.sln b/03_Animal/vbnet/Animal.sln index eaaf1b67..f3b48076 100644 --- a/03_Animal/vbnet/Animal.sln +++ b/03_Animal/vbnet/Animal.sln @@ -1,22 +1,31 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30114.105 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32112.339 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Animal", "Animal.vbproj", "{147D66D5-D817-4024-9447-9F5B9A6D2B7D}" +Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Animal", "Animal\Animal.vbproj", "{5517E4CE-BCF9-4D1F-9A17-B620C1B96B0D}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Animal.Tests", "Animal.Tests\Animal.Tests.vbproj", "{3986C6A2-77D4-4F00-B3CF-F5736C623B1E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5517E4CE-BCF9-4D1F-9A17-B620C1B96B0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5517E4CE-BCF9-4D1F-9A17-B620C1B96B0D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5517E4CE-BCF9-4D1F-9A17-B620C1B96B0D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5517E4CE-BCF9-4D1F-9A17-B620C1B96B0D}.Release|Any CPU.Build.0 = Release|Any CPU + {3986C6A2-77D4-4F00-B3CF-F5736C623B1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3986C6A2-77D4-4F00-B3CF-F5736C623B1E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3986C6A2-77D4-4F00-B3CF-F5736C623B1E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3986C6A2-77D4-4F00-B3CF-F5736C623B1E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {147D66D5-D817-4024-9447-9F5B9A6D2B7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {147D66D5-D817-4024-9447-9F5B9A6D2B7D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {147D66D5-D817-4024-9447-9F5B9A6D2B7D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {147D66D5-D817-4024-9447-9F5B9A6D2B7D}.Release|Any CPU.Build.0 = Release|Any CPU + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {88469A47-E30C-4763-A325-074101D16608} EndGlobalSection EndGlobal diff --git a/03_Animal/vbnet/Animal.vbproj b/03_Animal/vbnet/Animal/Animal.vbproj similarity index 100% rename from 03_Animal/vbnet/Animal.vbproj rename to 03_Animal/vbnet/Animal/Animal.vbproj diff --git a/03_Animal/vbnet/Branch.vb b/03_Animal/vbnet/Animal/Branch.vb similarity index 100% rename from 03_Animal/vbnet/Branch.vb rename to 03_Animal/vbnet/Animal/Branch.vb diff --git a/03_Animal/vbnet/Game.vb b/03_Animal/vbnet/Animal/Game.vb similarity index 100% rename from 03_Animal/vbnet/Game.vb rename to 03_Animal/vbnet/Animal/Game.vb diff --git a/03_Animal/vbnet/Program.vb b/03_Animal/vbnet/Animal/Program.vb similarity index 100% rename from 03_Animal/vbnet/Program.vb rename to 03_Animal/vbnet/Animal/Program.vb diff --git a/03_Animal/vbnet/Shared/ConsoleAdapter.vb b/03_Animal/vbnet/Animal/Shared/ConsoleAdapter.vb similarity index 100% rename from 03_Animal/vbnet/Shared/ConsoleAdapter.vb rename to 03_Animal/vbnet/Animal/Shared/ConsoleAdapter.vb diff --git a/03_Animal/vbnet/Shared/ConsoleAdapterBase.vb b/03_Animal/vbnet/Animal/Shared/ConsoleAdapterBase.vb similarity index 100% rename from 03_Animal/vbnet/Shared/ConsoleAdapterBase.vb rename to 03_Animal/vbnet/Animal/Shared/ConsoleAdapterBase.vb diff --git a/03_Animal/vbnet/Shared/Extensions.vb b/03_Animal/vbnet/Animal/Shared/Extensions.vb similarity index 100% rename from 03_Animal/vbnet/Shared/Extensions.vb rename to 03_Animal/vbnet/Animal/Shared/Extensions.vb From f783a817ca296516c57cb48c66a62ef461569772 Mon Sep 17 00:00:00 2001 From: Claus Volko <49327712+adokhugi@users.noreply.github.com> Date: Thu, 20 Jan 2022 10:38:04 +0100 Subject: [PATCH 72/82] Create aceyducey.kt --- 01_Acey_Ducey/kotlin/aceyducey.kt | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 01_Acey_Ducey/kotlin/aceyducey.kt diff --git a/01_Acey_Ducey/kotlin/aceyducey.kt b/01_Acey_Ducey/kotlin/aceyducey.kt new file mode 100644 index 00000000..fe7c32c7 --- /dev/null +++ b/01_Acey_Ducey/kotlin/aceyducey.kt @@ -0,0 +1,74 @@ +import java.util.Random + +fun printCard(a: Int) { + if (a < 11) println(a) + if (a == 11) println("JACK") + if (a == 12) println("QUEEN") + if (a == 13) println("KING") + if (a == 14) println("ACE") +} + +fun main() { + println("ACEY DUCEY CARD GAME") + println("CREATIVE COMPUTING MORRISTOWN, NEW JERSEY") + println() + println() + println("ACEY-DUCEY IS PLAYED IN THE FOLLOWING MANNER ") + println("THE DEALER (COMPUTER) DEALS TWO CARDS FACE UP") + println("YOU HAVE AN OPTION TO BET OR NOT BET DEPENDING") + println("ON WHETHER OR NOT YOU FEEL THE CARD WILL HAVE") + println("A VALUE BETWEEN THE FIRST TWO.") + println("IF YOU DO NOT WANT TO BET, INPUT A 0") + var random = Random() + do { + var q = 100 + var a : Int + var b : Int + var m : Int + println("YOU NOW HAVE " + q + " DOLLARS.") + println() + do { + do { + do { + println("HERE ARE YOUR NEXT TWO CARDS: ") + do { + a = random.nextInt(12) + 2 + b = random.nextInt(12) + 2 + } while (a >= b); + printCard(a) + printCard(b) + println() + println() + print("WHAT IS YOUR BET") + m = readLine()!!.toInt() + if (m == 0) { + println("CHICKEN!!") + println() + } + } while (m == 0); + if (m > q) { + println("SORRY, MY FRIEND, BUT YOU BET TOO MUCH.") + println("YOU HAVE ONLY " + q + " DOLLARS TO BET.") + } + } while (m > q); + var c = random.nextInt(12) + 2 + printCard(c) + println() + if (c > a && c < b) { + println("YOU WIN!!!") + q += m + } + else { + println("SORRY, YOU LOSE") + if (m < q) q -= m + } + } while (m < q); + println() + println() + println("SORRY, FRIEND, BUT YOU BLEW YOUR WAD.") + println() + println() + println("TRY AGAIN (YES OR NO)") + } while (readLine() == "YES"); + println("O.K., HOPE YOU HAD FUN!") +} From 431ab13fc12cf89d0e22235b84eae7f6a32ce531 Mon Sep 17 00:00:00 2001 From: Claus Volko <49327712+adokhugi@users.noreply.github.com> Date: Thu, 20 Jan 2022 10:38:20 +0100 Subject: [PATCH 73/82] Delete aceyducey.kt --- 01_Acey_Ducey/aceyducey.kt | 74 -------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 01_Acey_Ducey/aceyducey.kt diff --git a/01_Acey_Ducey/aceyducey.kt b/01_Acey_Ducey/aceyducey.kt deleted file mode 100644 index ccc5eb0a..00000000 --- a/01_Acey_Ducey/aceyducey.kt +++ /dev/null @@ -1,74 +0,0 @@ -import java.util.Random - -fun printCard(a: Int) { - if (a < 11) println(a) - if (a == 11) println("JACK") - if (a == 12) println("QUEEN") - if (a == 13) println("KING") - if (a == 14) println("ACE") -} - -fun main() { - println("ACEY DUCEY CARD GAME") - println("CREATIVE COMPUTING MORRISTOWN, NEW JERSEY") - println() - println() - println("ACEY-DUCEY IS PLAYED IN THE FOLLOWING MANNER ") - println("THE DEALER (COMPUTER) DEALS TWO CARDS FACE UP") - println("YOU HAVE AN OPTION TO BET OR NOT BET DEPENDING") - println("ON WHETHER OR NOT YOU FEEL THE CARD WILL HAVE") - println("A VALUE BETWEEN THE FIRST TWO.") - println("IF YOU DO NOT WANT TO BET, INPUT A 0") - var random = Random() - do { - var q = 100 - var a : Int - var b : Int - var m : Int - println("YOU NOW HAVE " + q + " DOLLARS.") - println() - do { - do { - do { - println("HERE ARE YOUR NEXT TWO CARDS: ") - do { - a = random.nextInt(12) + 2 - b = random.nextInt(12) + 2 - } while (a >= b); - printCard(a) - printCard(b) - println() - println() - print("WHAT IS YOUR BET") - m = readLine()!!.toInt() - if (m == 0) { - println("CHICKEN!!") - println() - } - } while (m == 0); - if (m > q) { - println("SORRY, MY FRIEND, BUT YOU BET TOO MUCH.") - println("YOU HAVE ONLY " + q + " DOLLARS TO BET.") - } - } while (m > q); - var c = random.nextInt(12) + 2 - printCard(c) - println() - if (c > a && c < b) { - println("YOU WIN!!!") - q += m - } - else { - println("SORRY, YOU LOSE") - if (m < q) q -= m - } - } while (m < q); - println() - println() - println("SORRY, FRIEND, BUT YOU BLEW YOUR WAD.") - println() - println() - println("TRY AGAIN (YES OR NO)") - } while (readLine() == "YES"); - println("O.K., HOPE YOU HAD FUN!") -} From 14775aa17f4f3f6bb571033e46895f637901cbad Mon Sep 17 00:00:00 2001 From: Nezumi Ronin Date: Thu, 20 Jan 2022 16:02:04 -0600 Subject: [PATCH 74/82] Create yatol.pl YATOL: Yet Another TOdo List Get list of basic files ordered by number or lines. This way you can do the easier ones first. --- 00_Utilities/yatol.pl | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 00_Utilities/yatol.pl diff --git a/00_Utilities/yatol.pl b/00_Utilities/yatol.pl new file mode 100644 index 00000000..71861209 --- /dev/null +++ b/00_Utilities/yatol.pl @@ -0,0 +1,35 @@ +#!/usr/bin/perl +#YATOL: Yet Another TOdo List +use strict; + +#REM: Get list of basic files ordered by number or lines. +#REM: This way you can do the easier ones first. +my @Ret=`find .. -iname '*.bas' -exec wc -l \{\} \\; | sort -h`; + + +my @Langs= qw(PL JS VB PAS RB C# JAVA PY); +my @Dirs= qw(perl javascript vbnet pascal ruby csharp java python); + +print " "x 25 ."LINES\t"; +foreach my $Dir (@Langs) { + print "$Dir\t"; + } +print "\n"; + +foreach my $Lin (@Ret) { + chomp $Lin; + my ($Num, $File)= split (" ", $Lin); + my @Parts= split(/\//, $File); + my $Base= $Parts[1]; + + my $Tab= 25-length($Base); + print "$Base".(" "x$Tab)."$Num\t"; + + foreach my $Dir (@Dirs) { + my $Path= "../$Base/$Dir/"; + my $Ret= `ls $Path | wc -l`; + if ($Ret>1) { print "YES"; } + else { print " ";} + print "\t"; + } + print "\n"; From 2d0acf8b1402ae0745a7ab5bed68b49e181522e2 Mon Sep 17 00:00:00 2001 From: Nezumi Ronin Date: Thu, 20 Jan 2022 16:07:19 -0600 Subject: [PATCH 75/82] Update yatol.pl --- 00_Utilities/yatol.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/00_Utilities/yatol.pl b/00_Utilities/yatol.pl index 71861209..136c3d67 100644 --- a/00_Utilities/yatol.pl +++ b/00_Utilities/yatol.pl @@ -33,3 +33,4 @@ foreach my $Lin (@Ret) { print "\t"; } print "\n"; + } From 7e5e29b9849a7e2817260b9690f394c3ec55a007 Mon Sep 17 00:00:00 2001 From: Alex Gomez Date: Thu, 20 Jan 2022 18:05:52 -0600 Subject: [PATCH 76/82] Execute bit now --- 00_Utilities/yatol.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 00_Utilities/yatol.pl diff --git a/00_Utilities/yatol.pl b/00_Utilities/yatol.pl old mode 100644 new mode 100755 From 2ee1c9aaee941d5f7ad2e812b990287f8d661618 Mon Sep 17 00:00:00 2001 From: Alex Gomez Date: Thu, 20 Jan 2022 18:10:04 -0600 Subject: [PATCH 77/82] Sorry, I'm learning git --- 00_Utilities/yatol.pl | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/00_Utilities/yatol.pl b/00_Utilities/yatol.pl index 136c3d67..0f4ef111 100755 --- a/00_Utilities/yatol.pl +++ b/00_Utilities/yatol.pl @@ -2,21 +2,24 @@ #YATOL: Yet Another TOdo List use strict; -#REM: Get list of basic files ordered by number or lines. +#REM: Get list of basic files ordered by number of lines. #REM: This way you can do the easier ones first. my @Ret=`find .. -iname '*.bas' -exec wc -l \{\} \\; | sort -h`; my @Langs= qw(PL JS VB PAS RB C# JAVA PY); my @Dirs= qw(perl javascript vbnet pascal ruby csharp java python); +my %Sum; -print " "x 25 ."LINES\t"; +print " "x 25 ."BAS\t"; foreach my $Dir (@Langs) { print "$Dir\t"; } print "\n"; +my $Count; foreach my $Lin (@Ret) { + $Count++; chomp $Lin; my ($Num, $File)= split (" ", $Lin); my @Parts= split(/\//, $File); @@ -28,9 +31,25 @@ foreach my $Lin (@Ret) { foreach my $Dir (@Dirs) { my $Path= "../$Base/$Dir/"; my $Ret= `ls $Path | wc -l`; - if ($Ret>1) { print "YES"; } + if ($Ret>1) { print "YES"; $Sum{$Dir}++; } else { print " ";} print "\t"; } print "\n"; + } + +print "\t\tFILES:\t\t"; +foreach my $Dir (@Dirs) { + print "$Sum{$Dir}\t"; + } +print "\n"; + + +print "\t\tADVANCE:\t"; +foreach my $Dir (@Dirs) { + my $Per= int($Sum{$Dir}/$Count*100)."%"; + print "$Per\t"; + } +print "\n"; + From 6820681857f71d1631aa68e1cce946419c0a7638 Mon Sep 17 00:00:00 2001 From: openback Date: Thu, 20 Jan 2022 21:05:43 -0500 Subject: [PATCH 78/82] 09_Battle/python - Add multi-line strings and *args --- 09_Battle/python/battle.py | 42 ++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/09_Battle/python/battle.py b/09_Battle/python/battle.py index 8c992458..d9449b77 100644 --- a/09_Battle/python/battle.py +++ b/09_Battle/python/battle.py @@ -40,8 +40,8 @@ def place_ship(sea: SeaType, size: int, code: int) -> None: point = add_vector(point, vector) points.append(point) - if not (all([is_within_sea(point, sea) for point in points]) and - all([value_at(point, sea) == 0 for point in points])): + if (not all([is_within_sea(point, sea) for point in points]) or + any([value_at(point, sea) for point in points])): # ship out of bounds or crosses other ship, trying again continue @@ -65,7 +65,7 @@ def has_ship(sea: SeaType, code: int) -> bool: return any(code in row for row in sea) -def count_sunk(sea: SeaType, codes: Tuple[int, ...]) -> int: +def count_sunk(sea: SeaType, *codes: int) -> int: return sum(not has_ship(sea, code) for code in codes) @@ -106,20 +106,23 @@ def setup_ships(sea: SeaType): def main() -> None: - print(' BATTLE') - print('CREATIVE COMPUTING MORRISTOWN, NEW JERSEY') - print() sea = tuple(([0 for _ in range(SEA_WIDTH)] for _ in range(SEA_WIDTH))) setup_ships(sea) - print('THE FOLLOWING CODE OF THE BAD GUYS\' FLEET DISPOSITION') - print('HAS BEEN CAPTURED BUT NOT DECODED:') - print() + print(f''' + BATTLE +CREATIVE COMPUTING MORRISTOWN, NEW JERSEY + +THE FOLLOWING CODE OF THE BAD GUYS' FLEET DISPOSITION +HAS BEEN CAPTURED BUT NOT DECODED: + +''') print_encoded_sea(sea) - print() - print('DE-CODE IT AND USE IT IF YOU CAN') - print('BUT KEEP THE DE-CODING METHOD A SECRET.') - print() - print('START GAME') + print(''' + +DE-CODE IT AND USE IT IF YOU CAN +BUT KEEP THE DE-CODING METHOD A SECRET. + +START GAME''') splashes = 0 hits = 0 @@ -142,11 +145,11 @@ def main() -> None: if not has_ship(sea, target_value): print('AND YOU SUNK IT. HURRAH FOR THE GOOD GUYS.') print('SO FAR, THE BAD GUYS HAVE LOST') - print(f'{count_sunk(sea, (1, 2))} DESTROYER(S),', - f'{count_sunk(sea, (3, 4))} CRUISER(S),', - f'AND {count_sunk(sea, (5, 6))} AIRCRAFT CARRIER(S).') + print(f'{count_sunk(sea, 1, 2)} DESTROYER(S),', + f'{count_sunk(sea, 3, 4)} CRUISER(S),', + f'AND {count_sunk(sea, 5, 6)} AIRCRAFT CARRIER(S).') - if any(has_ship(sea, code) for code in range(1, SEA_WIDTH + 1)): + if any(has_ship(sea, code) for code in range(1, 7)): print(f'YOUR CURRENT SPLASH/HIT RATIO IS {splashes}/{hits}') continue @@ -156,8 +159,7 @@ def main() -> None: if not splashes: print('CONGRATULATIONS -- A DIRECT HIT EVERY TIME.') - print() - print('****************************') + print("\n****************************") break From 82781ef40bd24c523396bafbe3d4b5649d2e93ed Mon Sep 17 00:00:00 2001 From: openback Date: Thu, 20 Jan 2022 21:06:27 -0500 Subject: [PATCH 79/82] 09_Battle/python - Add OO version --- 09_Battle/python/battle_oo.py | 203 ++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 09_Battle/python/battle_oo.py diff --git a/09_Battle/python/battle_oo.py b/09_Battle/python/battle_oo.py new file mode 100644 index 00000000..dc35efa6 --- /dev/null +++ b/09_Battle/python/battle_oo.py @@ -0,0 +1,203 @@ +#!/usr/bin/env python3 +from dataclasses import dataclass +from random import randrange + + +DESTROYER_LENGTH = 2 +CRUISER_LENGTH = 3 +AIRCRAFT_CARRIER_LENGTH = 4 + + +@dataclass(frozen=True) +class Point: + x: int + y: int + + @classmethod + def random(cls, start: int, stop: int) -> 'Point': + return Point(randrange(start, stop), randrange(start, stop)) + + def __add__(self, vector: 'Vector') -> 'Point': + return Point(self.x + vector.x, self.y + vector.y) + + +@dataclass(frozen=True) +class Vector: + x: int + y: int + + @staticmethod + def random() -> 'Vector': + return Vector(randrange(-1, 2, 2), randrange(-1, 2, 2)) + + def __mul__(self, factor: int) -> 'Vector': + return Vector(self.x * factor, self.y * factor) + + +class Sea: + WIDTH = 6 + + def __init__(self): + self._graph = tuple(([0 for _ in range(self.WIDTH)] for _ in range(self.WIDTH))) + + def _validate_item_indices(self, point: Point) -> None: + if not isinstance(point, Point): + raise ValueError(f'Sea indices must be Points, not {type(point).__name__}') + + if not((1 <= point.x <= self.WIDTH) and (1 <= point.y <= self.WIDTH)): + raise IndexError('Sea index out of range') + + # Allows us to get the value using a point as a key, for example, `sea[Point(3,2)]` + def __getitem__(self, point: Point) -> int: + self._validate_item_indices(point) + + return self._graph[point.y - 1][point.x -1] + + # Allows us to get the value using a point as a key, for example, `sea[Point(3,2)] = 3` + def __setitem__(self, point: Point, value: int) -> None: + self._validate_item_indices(point) + self._graph[point.y - 1][point.x -1] = value + + # Allows us to check if a point exists in the sea for example, `if Point(3,2) in sea:` + def __contains__(self, point: Point) -> bool: + try: + self._validate_item_indices(point) + except IndexError: + return False + + return True + + # Redefines how python will render this object when asked as a str + def __str__(self): + # Display it encoded + return "\n".join([' '.join([str(self._graph[y][x]) + for y in range(self.WIDTH - 1, -1, -1)]) + for x in range(self.WIDTH)]) + + def has_ship(self, ship_code: int) -> bool: + return any(ship_code in row for row in self._graph) + + def count_sunk(self, *ship_codes: int) -> int: + return sum(not self.has_ship(ship_code) for ship_code in ship_codes) + + +class Battle: + def __init__(self) -> None: + self.sea = Sea() + self.place_ship(DESTROYER_LENGTH, 1) + self.place_ship(DESTROYER_LENGTH, 2) + self.place_ship(CRUISER_LENGTH, 3) + self.place_ship(CRUISER_LENGTH, 4) + self.place_ship(AIRCRAFT_CARRIER_LENGTH, 5) + self.place_ship(AIRCRAFT_CARRIER_LENGTH, 6) + self.splashes = 0 + self.hits = 0 + + def _next_target(self) -> Point: + while True: + try: + guess = input('? ') + coordinates = guess.split(',') + + if len(coordinates) != 2: + raise ValueError() + + point = Point(int(coordinates[0]), int(coordinates[1])) + + if point not in self.sea: + raise ValueError() + + return point + except ValueError: + print(f'INVALID. SPECIFY TWO NUMBERS FROM 1 TO {Sea.WIDTH}, SEPARATED BY A COMMA.') + + @property + def splash_hit_ratio(self) -> str: + return f'{self.splashes}/{self.hits}' + + @property + def _is_finished(self) -> bool: + return self.sea.count_sunk(*(i for i in range(1, 7))) == 6 + + def place_ship(self, size: int, ship_code: int) -> None: + while True: + start = Point.random(1, self.sea.WIDTH + 1) + vector = Vector.random() + # Get potential ship points + points = [start + vector * i for i in range(size)] + + if not (all([point in self.sea for point in points]) and + not any([self.sea[point] for point in points])): + # ship out of bounds or crosses other ship, trying again + continue + + # We found a valid spot, so actually place it now + for point in points: + self.sea[point] = ship_code + + break + + + def loop(self): + while True: + target = self._next_target() + target_value = self.sea[target] + + if target_value < 0: + print(f'YOU ALREADY PUT A HOLE IN SHIP NUMBER {abs(target_value)} AT THAT POINT.') + + if target_value <= 0: + print('SPLASH! TRY AGAIN.') + self.splashes += 1 + continue + + print(f'A DIRECT HIT ON SHIP NUMBER {target_value}') + self.hits += 1 + self.sea[target] = -target_value + + if not self.sea.has_ship(target_value): + print('AND YOU SUNK IT. HURRAH FOR THE GOOD GUYS.') + self._display_sunk_report() + + if self._is_finished: + self._display_game_end() + break + + print(f'YOUR CURRENT SPLASH/HIT RATIO IS {self.splash_hit_ratio}') + + def _display_sunk_report(self): + print('SO FAR, THE BAD GUYS HAVE LOST', + f'{self.sea.count_sunk(1, 2)} DESTROYER(S),', + f'{self.sea.count_sunk(3, 4)} CRUISER(S),', + f'AND {self.sea.count_sunk(5, 6)} AIRCRAFT CARRIER(S).') + + def _display_game_end(self): + print('YOU HAVE TOTALLY WIPED OUT THE BAD GUYS\' FLEET ' + f'WITH A FINAL SPLASH/HIT RATIO OF {self.splash_hit_ratio}') + + if not self.splashes: + print('CONGRATULATIONS -- A DIRECT HIT EVERY TIME.') + + print("\n****************************") + + +def main() -> None: + game = Battle() + print(f''' + BATTLE +CREATIVE COMPUTING MORRISTOWN, NEW JERSEY + +THE FOLLOWING CODE OF THE BAD GUYS' FLEET DISPOSITION +HAS BEEN CAPTURED BUT NOT DECODED: + +{game.sea} + +DE-CODE IT AND USE IT IF YOU CAN +BUT KEEP THE DE-CODING METHOD A SECRET. + +START GAME''') + game.loop() + + +if __name__ == "__main__": + main() From 4ae1a50bb977429ac9ba13869e0c713fb2ca966b Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Fri, 21 Jan 2022 04:31:55 +0200 Subject: [PATCH 80/82] Added tests project --- .../vbnet/Animal.Tests/Animal.Tests.vbproj | 8 +- 03_Animal/vbnet/Animal.Tests/MockConsole.vb | 65 +++++++++++++++ 03_Animal/vbnet/Animal.Tests/TestContainer.vb | 80 +++++++++++++++++++ 03_Animal/vbnet/Animal.Tests/UnitTest1.vb | 12 --- .../vbnet/Animal/Shared/ConsoleAdapter.vb | 1 + 03_Animal/vbnet/Animal/Shared/Extensions.vb | 29 +++++++ 6 files changed, 181 insertions(+), 14 deletions(-) create mode 100644 03_Animal/vbnet/Animal.Tests/MockConsole.vb create mode 100644 03_Animal/vbnet/Animal.Tests/TestContainer.vb delete mode 100644 03_Animal/vbnet/Animal.Tests/UnitTest1.vb diff --git a/03_Animal/vbnet/Animal.Tests/Animal.Tests.vbproj b/03_Animal/vbnet/Animal.Tests/Animal.Tests.vbproj index 05d00314..62a341e9 100644 --- a/03_Animal/vbnet/Animal.Tests/Animal.Tests.vbproj +++ b/03_Animal/vbnet/Animal.Tests/Animal.Tests.vbproj @@ -3,12 +3,12 @@ Animal.Tests net6.0 - false + On - + runtime; build; native; contentfiles; analyzers; buildtransitive @@ -20,4 +20,8 @@ + + + + diff --git a/03_Animal/vbnet/Animal.Tests/MockConsole.vb b/03_Animal/vbnet/Animal.Tests/MockConsole.vb new file mode 100644 index 00000000..a78dc50f --- /dev/null +++ b/03_Animal/vbnet/Animal.Tests/MockConsole.vb @@ -0,0 +1,65 @@ +Imports System.IO + +Public Class MockConsole + Inherits ConsoleAdapterBase + + Private inputs As Queue(Of String) + Public ReadOnly Lines As New List(Of (line As String, centered As Boolean)) From { + ("", False) + } + + ' TODO it's possible to clear all the lines, and we'd have to check once again in WriteString and WriteCenteredLine if there are any lines + + Sub New(Inputs As IEnumerable(Of String)) + Me.inputs = New Queue(Of String)(Inputs) + End Sub + + Private Sub CheckLinesInitialized() + If Lines.Count = 0 Then Lines.Add(("", False)) + End Sub + + Private Sub WriteString(s As String, Optional centered As Boolean = False) + If s Is Nothing Then Return + CheckLinesInitialized() + s.Split(Environment.NewLine).ForEach(Sub(line, index) + If index = 0 Then + Dim currentLast = Lines(Lines.Count - 1) + ' centered should never come from the current last line + ' if WriteCenteredLine is called, it immediately creates a new line + Lines(Lines.Count - 1) = (currentLast.line + line, centered) + Else + Lines.Add((line, centered)) + End If + End Sub) + End Sub + + Public Overrides Sub Write(value As Object) + WriteString(value?.ToString) + End Sub + + Public Overrides Sub WriteLine(value As Object) + WriteString(value?.ToString) + WriteLine() + End Sub + + Public Overrides Sub WriteLine() + Lines.Add(("", False)) + End Sub + + Public Overrides Sub WriteCenteredLine(value As Object) + If Lines.Count = 0 Then Lines.Add(("", False)) + Dim currentLast = Lines(Lines.Count - 1).line + If currentLast.Length > 0 Then Throw New InvalidOperationException("Can only write centered line if cursor is at start of line.") + WriteString(value?.ToString, True) + WriteLine() + End Sub + + Public Overrides Function ReadLine() As String + ' Indicates the end of a test run, for programs which loop endlessly + If inputs.Count = 0 Then Throw New EndOfStreamException("End of inputs") + + Dim nextInput = inputs.Dequeue.Trim + WriteLine(nextInput) + Return nextInput + End Function +End Class diff --git a/03_Animal/vbnet/Animal.Tests/TestContainer.vb b/03_Animal/vbnet/Animal.Tests/TestContainer.vb new file mode 100644 index 00000000..3aed862a --- /dev/null +++ b/03_Animal/vbnet/Animal.Tests/TestContainer.vb @@ -0,0 +1,80 @@ +Imports Xunit +Imports Animal +Imports System.IO + +Public Class TestContainer + Private Shared Function ResponseVariantExpander(src As IEnumerable(Of String)) As TheoryData(Of String) + Dim theoryData = New TheoryData(Of String) + src. + SelectMany(Function(x) {x, x.Substring(0, 1)}). + SelectMany(Function(x) { + x, + x.ToUpperInvariant, + x.ToLowerInvariant, + x.ToTitleCase, + x.ToReverseCase + }). + Distinct. + ForEach(Sub(x) theoryData.Add(x)) + Return theoryData + End Function + Private Shared YesVariantsThepryData As TheoryData(Of String) = ResponseVariantExpander({"yes", "true", "1"}) + Private Shared Function YesVariants() As TheoryData(Of String) + Return YesVariantsThepryData + End Function + Private Shared NoVariantsThepryData As TheoryData(Of String) = ResponseVariantExpander({"no", "false", "0"}) + Private Shared Function NoVariants() As TheoryData(Of String) + Return NoVariantsThepryData + End Function + + ''' Test LIST variants + + + + + + Sub List(listResponse As String) + Dim console As New MockConsole({listResponse}) + Dim game As New Game(console) + Assert.Throws(Of EndOfStreamException)(Sub() game.BeginLoop()) + Assert.Equal( + { + "ANIMALS I ALREADY KNOW ARE:", + "FISH BIRD " + }, + console.Lines.Slice(-4, -2).Select(Function(x) x.line) + ) + End Sub + + '' Test YES variants + + + Sub YesVariant(yesVariant As String) + Dim console As New MockConsole({yesVariant}) + Dim game As New Game(console) + Assert.Throws(Of EndOfStreamException)(Sub() game.BeginLoop()) + Assert.Equal( + { + $"ARE YOU THINKING OF AN ANIMAL? {yesVariant}", + "DOES IT SWIM? " + }, + console.Lines.Slice(-2, 0).Select(Function(x) x.line) + ) + End Sub + + '' Test NO variants + + + Sub NoVariant(noVariant As String) + Dim console As New MockConsole({"y", noVariant}) + Dim game As New Game(console) + Assert.Throws(Of EndOfStreamException)(Sub() game.BeginLoop()) + Assert.Equal( + { + $"DOES IT SWIM? {noVariant}", + "IS IT A BIRD? " + }, + console.Lines.Slice(-2, 0).Select(Function(x) x.line) + ) + End Sub +End Class diff --git a/03_Animal/vbnet/Animal.Tests/UnitTest1.vb b/03_Animal/vbnet/Animal.Tests/UnitTest1.vb deleted file mode 100644 index fe32490e..00000000 --- a/03_Animal/vbnet/Animal.Tests/UnitTest1.vb +++ /dev/null @@ -1,12 +0,0 @@ -Imports System -Imports Xunit - -Namespace Animal.Tests - Public Class UnitTest1 - - Sub TestSub() - - End Sub - End Class -End Namespace - diff --git a/03_Animal/vbnet/Animal/Shared/ConsoleAdapter.vb b/03_Animal/vbnet/Animal/Shared/ConsoleAdapter.vb index 132f1968..f49394e0 100644 --- a/03_Animal/vbnet/Animal/Shared/ConsoleAdapter.vb +++ b/03_Animal/vbnet/Animal/Shared/ConsoleAdapter.vb @@ -14,6 +14,7 @@ End Sub Public Overrides Sub WriteCenteredLine(value As Object) + If Console.CursorLeft <> 0 Then Throw New InvalidOperationException("Can only write centered line if cursor is at start of line.") Dim toWrite = If(value?.ToString, "") Console.WriteLine($"{Space((Console.WindowWidth - toWrite.Length) \ 2)}{toWrite}") End Sub diff --git a/03_Animal/vbnet/Animal/Shared/Extensions.vb b/03_Animal/vbnet/Animal/Shared/Extensions.vb index 83d1914b..e10df441 100644 --- a/03_Animal/vbnet/Animal/Shared/Extensions.vb +++ b/03_Animal/vbnet/Animal/Shared/Extensions.vb @@ -1,6 +1,11 @@ Imports System.Runtime.CompilerServices Public Module Extensions + Public Sub ForEach(Of T)(src As IEnumerable(Of T), action As Action(Of T)) + For Each x In src + action(x) + Next + End Sub Public Sub ForEach(Of T)(src As IEnumerable(Of T), action As Action(Of T, Integer)) Dim index As Integer For Each x In src @@ -18,4 +23,28 @@ Public Module Extensions If Not s.EndsWith(toAppend, StringComparison.OrdinalIgnoreCase) Then s += toAppend Return s End Function + + Public Function ToTitleCase(s As String) As String + If s Is Nothing Then Return Nothing + Return Char.ToUpperInvariant(s(0)) + s.Substring(1).ToUpperInvariant + End Function + + ' https://stackoverflow.com/a/3681580/111794 + Public Function ToReverseCase(s As String) As String + If s Is Nothing Then Return Nothing + Return New String(s.Select(Function(c) If( + Not Char.IsLetter(c), + c, + If( + Char.IsUpper(c), Char.ToLowerInvariant(c), Char.ToUpperInvariant(c) + ) + )).ToArray) + End Function + + ' https://stackoverflow.com/a/58132204/111794 + Public Function Slice(Of T)(lst As IList(Of T), start As Integer, [end] As Integer) As T() + start = If(start >= 0, start, lst.Count + start) + [end] = If([end] > 0, [end], lst.Count + [end]) + Return lst.Skip(start).Take([end] - start).ToArray + End Function End Module From e778138ec388258fe0cd7cc8faa41ad5bb7615ef Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Fri, 21 Jan 2022 04:52:44 +0200 Subject: [PATCH 81/82] Update README and add comments --- 03_Animal/vbnet/Animal/Branch.vb | 1 + 03_Animal/vbnet/Animal/Game.vb | 30 ++++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/03_Animal/vbnet/Animal/Branch.vb b/03_Animal/vbnet/Animal/Branch.vb index 6734e39d..4af369bb 100644 --- a/03_Animal/vbnet/Animal/Branch.vb +++ b/03_Animal/vbnet/Animal/Branch.vb @@ -10,6 +10,7 @@ Public Property Yes As Branch Public Property No As Branch + ' Allows walking all the descendants recursively Public Iterator Function DescendantTexts() As IEnumerable(Of String) If Yes IsNot Nothing Then Yield Yes.Text diff --git a/03_Animal/vbnet/Animal/Game.vb b/03_Animal/vbnet/Animal/Game.vb index 3bc2b2f6..bca72005 100644 --- a/03_Animal/vbnet/Animal/Game.vb +++ b/03_Animal/vbnet/Animal/Game.vb @@ -1,6 +1,8 @@ Option Compare Text Public Class Game + ' This Dictionary holds the corresponding value for each of the variants of "YES" and "NO" we accept + ' Note that the Dictionary is case-insensitive, meaning it maps "YES", "yes" and even "yEs" to True Private Shared ReadOnly YesNoResponses As New Dictionary(Of String, Boolean)(StringComparer.InvariantCultureIgnoreCase) From { {"yes", True}, {"y", True}, @@ -15,6 +17,8 @@ Public Class Game } ReadOnly console As ConsoleAdapterBase + + ' The pre-initialized root branch ReadOnly root As New Branch With { .Text = "DOES IT SWIM?", .Yes = New Branch With {.Text = "FISH"}, @@ -41,6 +45,7 @@ Public Class Game Sub BeginLoop() + ' Print the program heading console.WriteCenteredLine("ANIMAL") console.WriteCenteredLine("CREATIVE COMPUTING MORRISTOWN, NEW JERSEY") console.Write( @@ -58,10 +63,16 @@ THINK OF AN ANIMAL AND THE COMPUTER WILL TRY TO GUESS IT. Dim response = console.ReadLine If response = "list" Then + ' List all the stored animals console.WriteLine( " ANIMALS I ALREADY KNOW ARE:") + + ' We're using a ForEach extension method instead of the regular For Each loop to provide the index alongside the text root.DescendantTexts.ForEach(Sub(text, index) + ' We want to move to the next line after every four animals + ' But for the first animal, where the index is 0, 0 Mod 4 will also return 0 + ' So we have to explicitly exclude the first animal If index > 0 AndAlso index Mod 4 = 0 Then console.WriteLine() console.Write($"{text.MaxLength(15),-15}") End Sub) @@ -76,10 +87,14 @@ ANIMALS I ALREADY KNOW ARE:") Dim currentBranch = root Do While Not currentBranch.IsEnd + ' Branches can either be questions, or end branches + ' We have to walk the questions, prompting each time for "yes" or "no" console.Write($"{currentBranch.Text} ") Do ynResponse = GetYesNo() Loop While ynResponse Is Nothing + + ' Depending on the answer, we'll follow either the branch at "Yes" or "No" currentBranch = If( ynResponse, currentBranch.Yes, @@ -87,31 +102,42 @@ ANIMALS I ALREADY KNOW ARE:") ) Loop - 'at end + ' Now we're at an end branch console.Write($"IS IT A {currentBranch.Text}? ") ynResponse = GetYesNo() - If ynResponse Then ' No difference between False or Nothing + If ynResponse Then ' Only if ynResponse = True will we go into this If Then console.WriteLine("WHY NOT TRY ANOTHER ANIMAL?") Continue Do End If + ' Get the new animal console.Write("THE ANIMAL YOU WERE THINKING OF WAS A ? ") Dim newAnimal = console.ReadLine + ' Get the question used to distinguish the new animal from the current end branch console.WriteLine( $"PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A {newAnimal} FROM A {currentBranch.Text}") Dim newQuestion = console.ReadLine + ' Get the answer to that question, for the new animal + ' for the old animal, the answer would be the opposite console.Write( $"FOR A {newAnimal} THE ANSWER WOULD BE ? ") Do ynResponse = GetYesNo() Loop While ynResponse Is Nothing + ' Create the new end branch for the new animal Dim newBranch = New Branch With {.Text = newAnimal} + + ' Copy over the current animal to another new end branch Dim currentBranchCopy = New Branch With {.Text = currentBranch.Text} + + ' Make the current branch into the distinguishing question currentBranch.Text = newQuestion + + ' Set the Yes and No branches of the current branch according to the answer If ynResponse Then currentBranch.Yes = newBranch currentBranch.No = currentBranchCopy From f3b681b5005d5f65249ed5d925b7c6b20a6abbec Mon Sep 17 00:00:00 2001 From: 0phios Date: Fri, 21 Jan 2022 14:19:16 -0400 Subject: [PATCH 82/82] Update AceyDucey.vb - reduce nested do/loop and if/else statements by utilizing subs and functions. --- 01_Acey_Ducey/vbnet/AceyDucey.vb | 242 +++++++++++++++++++++++++++++++ 01_Acey_Ducey/vbnet/Program.vb | 169 +-------------------- 2 files changed, 248 insertions(+), 163 deletions(-) create mode 100644 01_Acey_Ducey/vbnet/AceyDucey.vb diff --git a/01_Acey_Ducey/vbnet/AceyDucey.vb b/01_Acey_Ducey/vbnet/AceyDucey.vb new file mode 100644 index 00000000..8727e6b2 --- /dev/null +++ b/01_Acey_Ducey/vbnet/AceyDucey.vb @@ -0,0 +1,242 @@ +Public Class AceyDucey + ''' + ''' Create a single instance of the Random class to be used + ''' throughout the program. + ''' + Private ReadOnly Property Rnd As New Random() + + ''' + ''' Define a varaible to store the the player balance.
+ ''' Defaults to 0 + '''
+ ''' + ''' Since is a value type, and no value + ''' has been explicitly set, the default value of the type is used. + ''' + Private _balance As Integer + + Public Sub New() + DisplayIntroduction() + End Sub + + ''' + ''' Play multiple games of Acey Ducey until the player chooses to quit. + ''' + Public Sub Play() + Do + PlayGame() + Loop While TryAgain() 'Loop (play again) based on the Boolean value returned by TryAgain + + Console.WriteLine("O.K., HOPE YOU HAD FUN!") + End Sub + + ''' + ''' Play a game of Acey Ducey, which ends when the player balance reaches 0 + ''' + Private Sub PlayGame() + _balance = 100 'At the start of the game, set the player balance to 100 + + Console.WriteLine() + Console.WriteLine($"YOU NOW HAVE {_balance} DOLLARS.") + + Do + PlayTurn() + Loop While _balance > 0 'Continue playing while the user has a balance + + Console.WriteLine() + Console.WriteLine("SORRY, FRIEND, BUT YOU BLEW YOUR WAD.") + End Sub + + ''' + ''' Play one turn of Acey Ducey + ''' + ''' + ''' A turn consists of displaying to cards, making a wager + ''' and determining the result (win/lose) + ''' + Private Sub PlayTurn() + Console.WriteLine() + Console.WriteLine("HERE ARE YOUR NEXT TWO CARDS: ") + + Dim cards = GetOrderedCards() + + For Each card In cards + DisplayCard(card) + Next + + Dim wager As Integer = GetWager() + Dim finalCard As Integer = GetCard() + + If wager = 0 Then + Console.WriteLine("CHICKEN!!") + Return + End If + + DisplayCard(finalCard) + + Console.WriteLine() + + '''Check if the value of the final card is between the first and second cards. + ''' + '''The use of AndAlso is used to short-circuit the evaluation of the IF condition. + '''Short-circuiting means that both sides of the condition do not need to be + '''evaluated. In this case, if the left criteria returns FALSE, the right criteria + '''is ignored and the evaluation result is returned as FALSE. + ''' + '''This works because AndAlso requires both condition to return TRUE in order to be + '''evaluated as TRUE. If the first condition is FALSE we already know the evaluation result. + If finalCard >= cards.First() AndAlso finalCard <= cards.Last() Then + Console.WriteLine("YOU WIN!!!") + _balance += wager 'Condensed version of _balance = _balance + wager + Else + Console.WriteLine("SORRY, YOU LOSE.") + _balance -= wager 'Condensed version of _balance = _balance - wager + End If + End Sub + + ''' + ''' Get two cards in ascending order + ''' + ''' + ''' The original version generates two cards (A and B) + ''' If A is greater than or equal to B, both cards are regenerated. + '''

+ ''' This version generates the two cards, but only regenerates A + ''' if A is equal to B. The cards are then returned is ascending order, + ''' ensuring that A is less than B (maintaining the original end result) + '''
+ Private Function GetOrderedCards() As Integer() + '''When declaring fixed size arrays in VB.NET you declare the MAX INDEX of the array + '''and NOT the SIZE (number of elements) of the array. + '''As such, card(1) gives you and array with index 0 and index 1, which means + '''the array stores two elements and not one + Dim cards(1) As Integer + + cards(0) = GetCard() + cards(1) = GetCard() + + 'Perform this action as long as the first card is equal to the second card + While cards(0) = cards(1) + cards(0) = GetCard() + End While + + Array.Sort(cards) 'Sort the values in ascending order + + Return cards + End Function + + ''' + ''' Get a random number (card) ranked 2 to 14 + ''' + Private Function GetCard() As Integer + Return Rnd.Next(2, 15) + End Function + + ''' + ''' Display the face value of the card + ''' + Private Sub DisplayCard(card As Integer) + Dim output As String + + Select Case card + Case 2 To 10 + output = card.ToString() + Case 11 + output = "JACK" + Case 12 + output = "QUEEN" + Case 13 + output = "KING" + Case 14 + output = "ACE" + Case Else + Throw New ArgumentOutOfRangeException(NameOf(card), "Value must be between 2 and 14") + End Select + + Console.WriteLine(output) + End Sub + + ''' + ''' Prompt the user to make a bet + ''' + ''' + ''' The function will not return until a valid bet is made.
+ ''' is used to validate that the user input is a valid + '''
+ Private Function GetWager() As Integer + Dim wager As Integer + Do + Console.WriteLine() + Console.Write("WHAT IS YOUR BET? ") + + Dim input As String = Console.ReadLine() + + '''Determine if the user input is an Integer + '''If it is an Integer, store the value in the variable wager + If Not Integer.TryParse(input, wager) Then + Console.WriteLine("SORRY, I DID'T QUITE GET THAT.") + Continue Do 'restart the loop + End If + + 'Prevent the user from betting more than their current balance + If _balance < wager Then + Console.WriteLine("SORRY, MY FRIEND, BUT YOU BET TOO MUCH.") + Console.WriteLine($"YOU HAVE ONLY {_balance} DOLLARS TO BET.") + Continue Do 'restart the loop + End If + + 'Prevent the user from betting negative values + If wager < 0 Then + Console.WriteLine("FUNNY GUY! YOU CANNOT MAKE A NEGATIVE BET.") + Continue Do 'restart the loop + End If + + Exit Do 'If we get to this line, exit the loop as all above validations passed + Loop + + Return wager + End Function + + ''' + ''' Prompt the user to try again + ''' + ''' + ''' This function will not return until a valid reponse is given + ''' + Private Function TryAgain() As Boolean + Dim response As String + Do + Console.Write("TRY AGAIN (YES OR NO) ") + + response = Console.ReadLine() + + If response.Equals("YES", StringComparison.OrdinalIgnoreCase) Then Return True + If response.Equals("NO", StringComparison.OrdinalIgnoreCase) Then Return False + + Console.WriteLine("SORRY, I DID'T QUITE GET THAT.") + Loop + End Function + + ''' + ''' Display the opening title and instructions + ''' + ''' + ''' Refer to + ''' + ''' Interpolated Strings + ''' documentation for the use of $ and { } with strings + ''' + Private Sub DisplayIntroduction() + Console.WriteLine($"{Space((Console.WindowWidth \ 2) - 10)}ACEY DUCEY CARD GAME") + Console.WriteLine($"{Space((Console.WindowWidth \ 2) - 21)}CREATIVE COMPUTING MORRISTOWN, NEW JERSEY") + Console.WriteLine("") + Console.WriteLine("") + Console.WriteLine("ACEY-DUCEY IS PLAYED IN THE FOLLOWING MANNER") + Console.WriteLine("THE DEALER (COMPUTER) DEALS TWO CARDS FACE UP") + Console.WriteLine("YOU HAVE AN OPTION TO BET OR NOT BET DEPENDING") + Console.WriteLine("ON WHETHER OR NOT YOU FEEL THE CARD WILL HAVE") + Console.WriteLine("A VALUE BETWEEN THE FIRST TWO.") + Console.WriteLine("IF YOU DO NOT WANT TO BET, INPUT A 0") + Console.WriteLine("") + End Sub +End Class diff --git a/01_Acey_Ducey/vbnet/Program.vb b/01_Acey_Ducey/vbnet/Program.vb index bfa518ca..2f82fd60 100644 --- a/01_Acey_Ducey/vbnet/Program.vb +++ b/01_Acey_Ducey/vbnet/Program.vb @@ -6,173 +6,16 @@ Imports System ''' The structural changes primarily consist of replacing the many GOTOs with ''' Do/Loop constructs to force the continual execution of the program. ''' -''' Because modern Basic allows multi-line If/Then blocks, many GOTO jumps were -''' able to be eliminated and the logic was able to be moved to more relevant areas, -''' For example, the increment/decrement of the player's balance could be in the same -''' area as the notification of win/loss. +''' Some modern improvements were added, primarily the inclusion of a multiple +''' subroutines and functions, which eliminates repeated logic and reduces +''' then need for nested loops. ''' -''' Some modern improvements were added, primarily the inclusion of a function, which -''' eliminated a thrice-repeated block of logic to display the card value. The archaic -''' RND function is greatly simplified with the .NET Framework's Random class. +''' The archaic RND function is greatly simplified with the .NET Framework's Random class. ''' ''' Elementary comments are provided for non-programmers or novices. ''' Module Program - Sub Main(args As String()) - ' These are the variables that will hold values during the program's execution - Dim input As String - Dim rnd As New Random ' You can create a new instance of an object during declaration - Dim currentBalance As Integer = 100 ' You can set a initial value at declaration - Dim currentWager As Integer - Dim cardA, cardB, cardC As Integer ' You can specify multiple variables of the same type in one declaration statement - - ' Display the opening title and instructions - ' Use a preceding $ to insert calculated values within the string using {} - Console.WriteLine($"{Space((Console.WindowWidth \ 2) - 10)}ACEY DUCEY CARD GAME") - Console.WriteLine($"{Space((Console.WindowWidth \ 2) - 21)}CREATIVE COMPUTING MORRISTOWN, NEW JERSEY") - Console.WriteLine("") - Console.WriteLine("") - Console.WriteLine("ACEY-DUCEY IS PLAYED IN THE FOLLOWING MANNER") - Console.WriteLine("THE DEALER (COMPUTER) DEALS TWO CARDS FACE UP") - Console.WriteLine("YOU HAVE AN OPTION TO BET OR NOT BET DEPENDING") - Console.WriteLine("ON WHETHER OR NOT YOU FEEL THE CARD WILL HAVE") - Console.WriteLine("A VALUE BETWEEN THE FIRST TWO.") - Console.WriteLine("IF YOU DO NOT WANT TO BET, INPUT A 0") - - Do ' This loop continues as long as the player wants to keep playing - - Do ' This loop continues as long as the player has money to play - - Console.WriteLine("") - Console.WriteLine($"YOU NOW HAVE {currentBalance} DOLLARS.") - Console.WriteLine("") - - Console.WriteLine("HERE ARE YOUR NEXT TWO CARDS:") - - ' We need to ensure that card B is a higher value for our later comparison, - ' so we will loop until we have two cards that meet this criteria - Do - cardA = rnd.Next(2, 14) - cardB = rnd.Next(2, 14) - - Loop While cardA > cardB - - ' We use a function to display the text value of the numeric card value - ' because we do this 3 times and a function reduces repetition of code - Console.WriteLine(DisplayCard(cardA)) - Console.WriteLine(DisplayCard(cardB)) - - Do ' This loop continues until the player provides a valid wager value - Console.WriteLine("") - Console.WriteLine("WHAT IS YOUR BET") - - currentWager = 0 - input = Console.ReadLine - - ' Any input from the console is a string, but we require a number. - ' Test the input to make sure it is a numeric value. - If Integer.TryParse(input, currentWager) Then - ' Test to ensure the player has not wagered more than their balance - If currentWager > currentBalance Then - Console.WriteLine("SORRY, MY FRIEND, BUT YOU BET TOO MUCH.") - Console.WriteLine($"YOU HAVE ONLY {currentBalance} DOLLARS TO BET.") - - Else - ' The player has provided a numeric value that is less/equal to their balance, - ' exit the loop and continue play - Exit Do - - End If ' check player balance - - End If ' check numeric input - - Loop ' wager loop - - ' If the player is wagering, draw the third card, otherwise, mock them. - If currentWager > 0 Then - cardC = rnd.Next(2, 14) - - Console.WriteLine(DisplayCard(cardC)) - - ' The effort we made to have two cards in numeric order earlier makes this check easier, - ' otherwise we would have to have a second check in the opposite direction - If cardC < cardA OrElse cardC >= cardB Then - Console.WriteLine("SORRY, YOU LOSE") - currentBalance -= currentWager ' Shorthand code to decrement a number (currentBalance=currentBalance - currentWager) - - Else - Console.WriteLine("YOU WIN!!!") - currentBalance += currentWager ' Shorthand code to increment a number (currentBalance=currentBalance + currentWager) - - End If - - Else - Console.WriteLine("CHICKEN!!") - Console.WriteLine("") - - End If - - Loop While currentBalance > 0 ' loop as long as the player has money - - ' At this point, the player has no money (currentBalance=0). Inform them of such. - Console.WriteLine("") - Console.WriteLine("SORRY, FRIEND, BUT YOU BLEW YOUR WAD.") - Console.WriteLine("") - Console.WriteLine("") - - ' We will loop to ensure the player provides some answer. - Do - Console.WriteLine("TRY AGAIN (YES OR NO)") - Console.WriteLine("") - - input = Console.ReadLine - - Loop While String.IsNullOrWhiteSpace(input) - - ' We will assume that the player wants to play again only if they answer yes. - ' (yeah and ya are valid as well, because we only check the first letter) - If input.Substring(0, 1).Equals("y", StringComparison.CurrentCultureIgnoreCase) Then ' This allows upper and lower case to be entered. - currentBalance = 100 ' Reset the players balance before restarting - - Else - ' Exit the outer loop which will end the game. - Exit Do - - End If - - Loop ' The full game loop - - Console.WriteLine("O.K., HOPE YOU HAD FUN!") - + Sub Main() + Call New AceyDucey().Play() End Sub - - ' This function is called for each of the 3 cards used in the game. - ' The input and the output are both consistent, making it a good candidate for a function. - Private Function DisplayCard(value As Integer) As String - ' We check the value of the input and run a block of code for whichever - ' evaluation matches - Select Case value - Case 2 To 10 ' Case statements can be ranges of values, also multiple values (Case 2,3,4,5,6,7,8,9,10) - Return value.ToString - - Case 11 - Return "JACK" - - Case 12 - Return "QUEEN" - - Case 13 - Return "KING" - - Case 14 - Return "ACE" - - End Select - - ' Although we have full knowledge of the program and never plan to send an invalid - ' card value, it's important to provide a message for the next developer who won't - Throw New ArgumentOutOfRangeException("Card value must be between 2 and 14") - - End Function - End Module