From 3188022394970a1c1b26eb651980975dd2a1e53c Mon Sep 17 00:00:00 2001 From: "michael.divia" <michael.divia@etu.hesge.ch> Date: Thu, 7 Dec 2023 11:16:49 +0100 Subject: [PATCH] Part 3 0% --- Partie_3/.vscode/c_cpp_properties.json | 18 + Partie_3/.vscode/launch.json | 24 + Partie_3/.vscode/settings.json | 59 ++ Partie_3/pom.xml | 71 ++ Partie_3/src/main/java/ch/hepia/App.java | 118 +++ Partie_3/src/main/java/ch/hepia/Carte.java | 86 ++ .../src/main/java/ch/hepia/GameManager.java | 414 ++++++++++ Partie_3/src/main/java/ch/hepia/Hand.java | 216 +++++ .../src/main/java/ch/hepia/JeudeCarte.java | 123 +++ Partie_3/src/main/java/ch/hepia/Joueur.java | 754 ++++++++++++++++++ Partie_3/src/main/java/ch/hepia/Paquet.java | 25 + .../src/test/java/ch/hepia/CarteTest.java | 49 ++ Partie_3/target/classes/ch/hepia/App.class | Bin 0 -> 2431 bytes .../target/classes/ch/hepia/COULEUR.class | Bin 0 -> 1044 bytes Partie_3/target/classes/ch/hepia/Carte.class | Bin 0 -> 2722 bytes .../target/classes/ch/hepia/GameManager.class | Bin 0 -> 7799 bytes Partie_3/target/classes/ch/hepia/Hand$1.class | Bin 0 -> 1128 bytes Partie_3/target/classes/ch/hepia/Hand.class | Bin 0 -> 4921 bytes .../classes/ch/hepia/JeudeCarte$1.class | Bin 0 -> 1160 bytes .../target/classes/ch/hepia/JeudeCarte.class | Bin 0 -> 3261 bytes Partie_3/target/classes/ch/hepia/Joueur.class | Bin 0 -> 663 bytes .../classes/ch/hepia/JoueurCroupier.class | Bin 0 -> 3338 bytes .../classes/ch/hepia/JoueurHumain.class | Bin 0 -> 4874 bytes .../classes/ch/hepia/JoueurOrdinateur.class | Bin 0 -> 4837 bytes Partie_3/target/classes/ch/hepia/Paquet.class | Bin 0 -> 900 bytes .../compile/default-compile/createdFiles.lst | 7 + .../compile/default-compile/inputFiles.lst | 7 + .../test-classes/ch/hepia/CarteTest.class | Bin 0 -> 1821 bytes 28 files changed, 1971 insertions(+) create mode 100644 Partie_3/.vscode/c_cpp_properties.json create mode 100644 Partie_3/.vscode/launch.json create mode 100644 Partie_3/.vscode/settings.json create mode 100644 Partie_3/pom.xml create mode 100644 Partie_3/src/main/java/ch/hepia/App.java create mode 100644 Partie_3/src/main/java/ch/hepia/Carte.java create mode 100644 Partie_3/src/main/java/ch/hepia/GameManager.java create mode 100644 Partie_3/src/main/java/ch/hepia/Hand.java create mode 100644 Partie_3/src/main/java/ch/hepia/JeudeCarte.java create mode 100644 Partie_3/src/main/java/ch/hepia/Joueur.java create mode 100644 Partie_3/src/main/java/ch/hepia/Paquet.java create mode 100644 Partie_3/src/test/java/ch/hepia/CarteTest.java create mode 100644 Partie_3/target/classes/ch/hepia/App.class create mode 100644 Partie_3/target/classes/ch/hepia/COULEUR.class create mode 100644 Partie_3/target/classes/ch/hepia/Carte.class create mode 100644 Partie_3/target/classes/ch/hepia/GameManager.class create mode 100644 Partie_3/target/classes/ch/hepia/Hand$1.class create mode 100644 Partie_3/target/classes/ch/hepia/Hand.class create mode 100644 Partie_3/target/classes/ch/hepia/JeudeCarte$1.class create mode 100644 Partie_3/target/classes/ch/hepia/JeudeCarte.class create mode 100644 Partie_3/target/classes/ch/hepia/Joueur.class create mode 100644 Partie_3/target/classes/ch/hepia/JoueurCroupier.class create mode 100644 Partie_3/target/classes/ch/hepia/JoueurHumain.class create mode 100644 Partie_3/target/classes/ch/hepia/JoueurOrdinateur.class create mode 100644 Partie_3/target/classes/ch/hepia/Paquet.class create mode 100644 Partie_3/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst create mode 100644 Partie_3/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst create mode 100644 Partie_3/target/test-classes/ch/hepia/CarteTest.class diff --git a/Partie_3/.vscode/c_cpp_properties.json b/Partie_3/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..c2098a2 --- /dev/null +++ b/Partie_3/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "linux-gcc-x64", + "includePath": [ + "${workspaceFolder}/**" + ], + "compilerPath": "/usr/bin/gcc", + "cStandard": "${default}", + "cppStandard": "${default}", + "intelliSenseMode": "linux-gcc-x64", + "compilerArgs": [ + "" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/Partie_3/.vscode/launch.json b/Partie_3/.vscode/launch.json new file mode 100644 index 0000000..7f873a9 --- /dev/null +++ b/Partie_3/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "C/C++ Runner: Debug Session", + "type": "cppdbg", + "request": "launch", + "args": [], + "stopAtEntry": false, + "externalConsole": false, + "cwd": "/home/padi/Tรฉlรฉchargements", + "program": "/home/padi/Tรฉlรฉchargements/build/Debug/outDebug", + "MIMode": "gdb", + "miDebuggerPath": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/Partie_3/.vscode/settings.json b/Partie_3/.vscode/settings.json new file mode 100644 index 0000000..3e5eb95 --- /dev/null +++ b/Partie_3/.vscode/settings.json @@ -0,0 +1,59 @@ +{ + "C_Cpp_Runner.cCompilerPath": "gcc", + "C_Cpp_Runner.cppCompilerPath": "g++", + "C_Cpp_Runner.debuggerPath": "gdb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "", + "C_Cpp_Runner.msvcBatchPath": "", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wcast-align", + "-Wconversion", + "-Wsign-conversion", + "-Wnull-dereference" + ], + "C_Cpp_Runner.msvcWarnings": [ + "/W4", + "/permissive-", + "/w14242", + "/w14287", + "/w14296", + "/w14311", + "/w14826", + "/w44062", + "/w44242", + "/w14905", + "/w14906", + "/w14263", + "/w44265", + "/w14928" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ], + "C_Cpp_Runner.useAddressSanitizer": false, + "C_Cpp_Runner.useUndefinedSanitizer": false, + "C_Cpp_Runner.useLeakSanitizer": false, + "C_Cpp_Runner.showCompilationTime": false, + "C_Cpp_Runner.useLinkTimeOptimization": false, + "C_Cpp_Runner.msvcSecureNoWarnings": false +} \ No newline at end of file diff --git a/Partie_3/pom.xml b/Partie_3/pom.xml new file mode 100644 index 0000000..7cb8921 --- /dev/null +++ b/Partie_3/pom.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>ch.hepia</groupId> + <artifactId>Java_Card_Game</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Java_Card_Game</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>20</maven.compiler.source> + <maven.compiler.target>20</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.11</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.openjfx</groupId> + <artifactId>javafx-controls</artifactId> + <version>19</version> + </dependency> + </dependencies> + + <build> + <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> + <plugins> + <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle --> + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <version>3.1.0</version> + </plugin> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.0</version> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.22.1</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.4.1</version> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>3.1.0</version> + <executions> + <execution> + <goals> + <goal>java</goal> + </goals> + </execution> + </executions> + <configuration> + <mainClass>ch.hepia.App</mainClass> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> \ No newline at end of file diff --git a/Partie_3/src/main/java/ch/hepia/App.java b/Partie_3/src/main/java/ch/hepia/App.java new file mode 100644 index 0000000..000bcec --- /dev/null +++ b/Partie_3/src/main/java/ch/hepia/App.java @@ -0,0 +1,118 @@ +package ch.hepia; + +import java.util.Scanner; + +public class App { + + // Scanner will be used all along to take user inputs in the terminal + public static final Scanner in = new Scanner(System.in); + + // All Color choices to be used in terminal prints + public static final String ANSI_RESET = "\u001B[0m"; + public static final String ANSI_BLACK = "\u001B[30m"; + public static final String ANSI_RED = "\u001B[31m"; + public static final String ANSI_GREEN = "\u001B[32m"; + public static final String ANSI_YELLOW = "\u001B[33m"; + public static final String ANSI_BLUE = "\u001B[34m"; + public static final String ANSI_PURPLE = "\u001B[35m"; + public static final String ANSI_CYAN = "\u001B[36m"; + public static final String ANSI_WHITE = "\u001B[37m"; + + public static void BlackJack() { + + System.out.print("\033[H\033[2J"); + System.out.flush(); + + System.out.println("*~-~* " + App.ANSI_RED + "BlackJack" + App.ANSI_RESET + " *~-~*\n"); + + int numPlayers; + int startMoney; + + // Ask the number of players until a valide answer is given + while (true) { + + System.out.print("How many players ? "); + + // Check that the input is an valid int + while (!App.in.hasNextInt()) { + System.out.println( + App.ANSI_YELLOW + "Please enter a valid number for the number of players." + App.ANSI_RESET); + System.out.print("How many players ? "); + App.in.next(); + } + + numPlayers = App.in.nextInt(); + + // Player count must be between 1 and 7 + if (numPlayers >= 1 && numPlayers <= 7) { + System.out.print(""); + break; + } else { + System.out.println( + App.ANSI_YELLOW + "Please enter a number of players between 1 and 7." + App.ANSI_RESET); + } + } + + // Ask the start money count for each players until a valide answer is given + while (true) { + + System.out.print("How much money do you start with ? "); + + // Check that the input is an valid int + while (!App.in.hasNextInt()) { + System.out.println(App.ANSI_YELLOW + "Please enter a valid number for your Money." + App.ANSI_RESET); + System.out.print("How much money do you start with ? "); + App.in.next(); + } + + startMoney = App.in.nextInt(); + + // Starting money must be more or equal to minimum bid amount + if (startMoney >= 10) { + System.out.print(""); + break; + } else { + System.out.println(App.ANSI_YELLOW + "Please enter an amount above 10." + App.ANSI_RESET); + } + } + + // Create a new game + GameManager BlackJack = new GameManager(numPlayers, startMoney); + + boolean GameOver = false; + + // Game run's in 3 Phases : + // Phase 1 (StartTurn): + // Ask the player how much he wan't to bid + // Phase 2 (PlayTurn): + // Ask the player for all his interactions with this cards + // Phase 3 (ResolveTurn): + // Make the Dealer pick cards + // Do all the math for the player gains and losses + // Check if the player can continue et prepare for the next round + while (!GameOver) { + BlackJack.StartTurn(); + BlackJack.PlayTurn(); + GameOver = BlackJack.ResolveTurn(); + } + + // The player has less than the minimum bid amount allowed = Game Over + + System.out.print("\033[H\033[2J"); + System.out.flush(); + + System.out.println("*~-~* " + App.ANSI_RED + "BlackJack" + App.ANSI_RESET + " *~-~*\n"); + + System.out.println(App.ANSI_PURPLE + "Game Over !" + App.ANSI_RESET); + + App.in.close(); + } + + public static void main(String[] args) { + + // Play 1 BlackJack Game + BlackJack(); + + } + +} diff --git a/Partie_3/src/main/java/ch/hepia/Carte.java b/Partie_3/src/main/java/ch/hepia/Carte.java new file mode 100644 index 0000000..6282220 --- /dev/null +++ b/Partie_3/src/main/java/ch/hepia/Carte.java @@ -0,0 +1,86 @@ +package ch.hepia; + +enum COULEUR { + coeur, + carreau, + pique, + trefle +} + +public class Carte { + + final private COULEUR couleur; + final private int rang; + final private int force; + + private static final int NOMBRE_DE_RANGS = 13; + + String[][] playingCards = { + { "๐", "๐ฑ", "๐ฒ", "๐ณ", "๐ด", "๐ต", "๐ถ", "๐ท", "๐ธ", "๐น", "๐บ", "๐ป", "๐ฝ", "๐พ" }, + { "๐", "๐", "๐", "๐", "๐", "๐ ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐" }, + { "๐", "๐ก", "๐ข", "๐ฃ", "๐ค", "๐ฅ", "๐ฆ", "๐ง", "๐จ", "๐ฉ", "๐ช", "๐ซ", "๐ญ", "๐ฎ" }, + { "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐" } + }; + + public Carte(COULEUR couleur, int rang) { + + if (rang < 0 || rang > NOMBRE_DE_RANGS) { + throw new IllegalArgumentException("Carte invalide : rang incorrect"); + } + + this.couleur = couleur; + this.rang = rang; + + if (rang <= 10) { + this.force = rang; + } else { + this.force = 10; + } + + } + + public COULEUR getCouleur() { + + return this.couleur; + + } + + public int getRang() { + + return this.rang; + + } + + public int getForce() { + + return this.force; + + } + + public String getNomCouleur() { + + String[] NOMS_COULEURS = { "โฅ", "โฆ", "โ ", "โฃ" }; + return NOMS_COULEURS[couleur.ordinal()]; + + } + + public String getNomRang() { + + String[] NOMS_RANGS = { "Joker", "As", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Valet", "Dame", "Roi" }; + return NOMS_RANGS[rang]; + + } + + public String getNomComplet() { + if (getRang() == 0) { + + return "๐"; + + } else { + + return playingCards[couleur.ordinal()][rang]; + + } + } + +} diff --git a/Partie_3/src/main/java/ch/hepia/GameManager.java b/Partie_3/src/main/java/ch/hepia/GameManager.java new file mode 100644 index 0000000..ed86be6 --- /dev/null +++ b/Partie_3/src/main/java/ch/hepia/GameManager.java @@ -0,0 +1,414 @@ +package ch.hepia; + +import java.util.ArrayList; + +public class GameManager { + + private JeudeCarte Deck; + private ArrayList<Joueur> Players; + private JoueurCroupier Dealer; + private int Step; + + public GameManager(int nbPlayer, int startMoney) { + + // Create a new BlackJack Deck of card (6 x 52 cards game) + this.Deck = new JeudeCarte(new Paquet(6, 52)); + + this.Players = new ArrayList<>(); + + // First Player is always the humain + this.Players.add(new JoueurHumain(Deck, startMoney)); + + // All other are controlled by the computer + if (nbPlayer > 1) { + for (int x = 1; x < nbPlayer; x++) { + this.Players.add(new JoueurOrdinateur(Deck, startMoney)); + } + } + + this.Dealer = new JoueurCroupier(Deck); + } + + // Phase 1 (StartTurn): + // Ask the player how much he wan't to bid + public void StartTurn() { + + this.Step = 0; + + System.out.print("\033[H\033[2J"); + System.out.flush(); + + System.out.println("*~-~* " + App.ANSI_RED + "BlackJack" + App.ANSI_RESET + " *~-~*\n"); + + double bet; + + System.out.println("Money : " + App.ANSI_BLUE + this.Players.get(0).GetMoney() + App.ANSI_RESET); + + // Ask the bid amount until a valide answer is given + while (true) { + + System.out.print("How much do you want to bet (Min. 10) ? "); + + // Check that the input is an valid double + while (!App.in.hasNextDouble()) { + System.out.println(App.ANSI_YELLOW + "Please enter a valid number to bet." + App.ANSI_RESET); + System.out.print("How much do you want to bet (Min. 10) ?"); + App.in.next(); + } + + bet = App.in.nextDouble(); + + // Check if the player has enough money to place the bid + if (bet <= this.Players.get(0).GetMoney()) { + + // Check if the minimum bid amount it cleared + if (bet < 10) { + System.out.println(App.ANSI_YELLOW + "Minimum bid amount is 10." + App.ANSI_RESET); + } else { + break; + } + + } else { + System.out.println(App.ANSI_YELLOW + "You don't have enough money." + App.ANSI_RESET); + } + } + + // Set the player bid for this turn + Players.get(0).SetBet(bet, 0); + } + + // Phase 2 (PlayTurn): + // Ask the player for all his interactions with this cards + public void PlayTurn() { + + boolean EndTurn = false, CanSplit = false, CanInsure = false, CanDouble = false, CanDraw = false; + + // Continue interacting with the player until all actions have been taken on all + // his hands + while (!EndTurn) { + + char choice = 'x'; + + // Go thew all hands of the player + for (int HandNb = 0; HandNb < this.Players.get(0).GetNbHands(); HandNb++) { + + CanSplit = false; + CanInsure = false; + CanDouble = false; + CanDraw = false; + choice = 'x'; + + System.out.print("\033[H\033[2J"); + System.out.flush(); + + System.out.println("*~-~* " + App.ANSI_RED + "BlackJack" + App.ANSI_RESET + " *~-~*\n"); + + // Show the remaining amount of cards in the deck + System.out.println( + "Cards in Deck : " + App.ANSI_GREEN + this.Deck.GetNbCards() + App.ANSI_RESET + "\n"); + + // Dealer has only 1 card in his hand at this point in time + System.out + .println("Dealer Strength : " + App.ANSI_PURPLE + this.Dealer.GetStrength(0) + App.ANSI_RESET); + + // Show the dealer hand + this.Dealer.ShowHands(); + + // Show the current player balance + System.out.println("\nMoney : " + App.ANSI_BLUE + this.Players.get(0).GetMoney() + App.ANSI_RESET); + + // Check if the player has put down an insurance + if (this.Players.get(0).HasInsured()) { + System.out.println( + "Insured : " + App.ANSI_BLUE + this.Players.get(0).GetInsured() + App.ANSI_RESET); + } + + // Show the hand number of the player + System.out + .println("Bet on Hand " + App.ANSI_GREEN + (HandNb + 1) + App.ANSI_RESET + " : " + App.ANSI_BLUE + + this.Players.get(0).GetBet(HandNb) + App.ANSI_RESET); + + // Show the hand strength of the player + // 99 = BlackJack + // >21 = Busted + // <=21 = show the strength + System.out + .print("Strength of Hand " + App.ANSI_GREEN + (HandNb + 1) + App.ANSI_RESET + " : " + + App.ANSI_PURPLE); + if (this.Players.get(0).GetStrength(HandNb) == 99) { + System.out.println("BlackJack" + App.ANSI_RESET); + } else if (this.Players.get(0).GetStrength(HandNb) > 21) { + System.out.println( + this.Players.get(0).GetStrength(HandNb) + App.ANSI_RED + " [BUSTED]" + App.ANSI_RESET); + } else { + System.out.println(this.Players.get(0).GetStrength(HandNb) + App.ANSI_RESET); + } + + // Show the player hand + this.Players.get(0).ShowHand(HandNb); + + // Choices for player + System.out.println("\n--- " + App.ANSI_GREEN + "Choices" + App.ANSI_RESET + " ---\n"); + + // Insurance + // Can only insure if it's the first thing that the players does + // AND + // That he hasn't already insured during this round + if (this.Step == 0 && this.Dealer.HasOnlyAs() + && !this.Players.get(0).HasInsured()) { + CanInsure = true; + System.out.println(App.ANSI_BLUE + "[i]" + App.ANSI_RESET + " Insurance against Dealer"); + } + + // Split + // Can only split if this hand can be split (if it wasn't already split AND if + // the 2 cards have the same strength) + // AND + // if we have less that 3 hands already (Max 2 splits) + // AND + // if the player has enough money + if (this.Players.get(0).CanSplit(HandNb) + && this.Players.get(0).GetNbHands() < 3 + && this.Players.get(0).GetBet(HandNb) <= this.Players.get(0).GetMoney()) { + CanSplit = true; + System.out.println(App.ANSI_BLUE + "[s]" + App.ANSI_RESET + " Split your Hand"); + } + + // Double + // Can only double if this hand wasn't already doubled + // AND + // if the hand has only 2 cards + // AND + // if the hand is not a BlackJack + // AND + // if the player has enough money + if (!this.Players.get(0).HasDoubled(HandNb) + && this.Players.get(0).GetNbCards(HandNb) == 2 + && this.Players.get(0).GetStrength(HandNb) != 99 + && this.Players.get(0).GetBet(HandNb) <= this.Players.get(0).GetMoney()) { + CanDouble = true; + System.out.println(App.ANSI_BLUE + "[d]" + App.ANSI_RESET + " Double your Hand"); + } + + // Draw a Card (Hit) + // Can NOT draw if this hand was doubled AND has already 3 cards + // AND + // if the hand has been splitted with a pair of Asses + // AND + // if the player has a BlackJack + // AND + // if the strength of the hand is more than 21 + if (!(this.Players.get(0).HasDoubled(HandNb) && this.Players.get(0).GetNbCards(HandNb) == 3) + && !(this.Players.get(0).HasSplit(HandNb) + && this.Players.get(0).GetCardStrength(HandNb, 0) == 1) + && this.Players.get(0).GetStrength(HandNb) < 21) { + CanDraw = true; + System.out.println(App.ANSI_BLUE + "[h]" + App.ANSI_RESET + " Hit"); + } + + // Keep (Stand) + System.out.println(App.ANSI_BLUE + "[k]" + App.ANSI_RESET + " Keep current Hand"); + + // Ask for the player choice until a valide one is given + while (true) { + System.out.print("> "); + + choice = App.in.next().charAt(0); + + // Choices are checked with available one for confirmation + if ((choice == 'i' && CanInsure) || (choice == 's' && CanSplit) || (choice == 'd' && CanDouble) + || (choice == 'h' && CanDraw) + || choice == 'k') { + break; + } else { + System.out.println(App.ANSI_YELLOW + "Please enter a valid choice." + App.ANSI_RESET); + } + } + + // Hit + if (choice == 'h') { + this.Players.get(0).DrawCard(HandNb, this.Deck); + // Go back 1 hand to stay on the same hand in the for loop + HandNb--; + } + // Split + else if (choice == 's') { + this.Players.get(0).Split(HandNb, this.Deck); + // Go back 1 hand to stay on the same hand in the for loop + HandNb--; + } + // Double + else if (choice == 'd') { + this.Players.get(0).Double(HandNb, this.Deck); + // Go back 1 hand to stay on the same hand in the for loop + HandNb--; + } + + Step++; + } + + // Insure + if (choice == 'i') { + this.Players.get(0).Insure(); + EndTurn = false; + } + // If this point is reached (and not because of the insurance), all hands have + // been played + else { + EndTurn = true; + } + } + + } + + // Phase 3 (ResolveTurn): + // Make the Dealer pick cards + // Do all the math for the player gains and losses + // Check if the player can continue et prepare for the next round + public boolean ResolveTurn() { + + // Dealer draws card until he hits 17 or more + while (this.Dealer.GetStrength(0) <= 17) { + this.Dealer.DrawCard(0, this.Deck); + } + + System.out.print("\033[H\033[2J"); + System.out.flush(); + + System.out.println("*~-~* " + App.ANSI_RED + "BlackJack" + App.ANSI_RESET + " *~-~*\n"); + + // Show the remaining amount of cards in the deck + System.out.println( + "Cards in Deck : " + App.ANSI_GREEN + this.Deck.GetNbCards() + App.ANSI_RESET + "\n"); + + // Show the hand strength of the dealer + // 99 = BlackJack + // >21 = Busted + // <=21 = show the strength + System.out.print("Dealer Score : " + App.ANSI_PURPLE); + if (this.Dealer.GetStrength(0) == 99) { + System.out.println("BlackJack" + App.ANSI_RESET); + } else if (this.Dealer.GetStrength(0) > 21) { + System.out.println(this.Dealer.GetStrength(0) + App.ANSI_RED + " [BUSTED]" + App.ANSI_RESET); + } else { + System.out.println(this.Dealer.GetStrength(0) + App.ANSI_RESET); + } + + // Show the dealers hand + this.Dealer.ShowHands(); + + // Check if the player has put down an insurance + if (this.Players.get(0).HasInsured()) { + System.out.println( + "Insured : " + App.ANSI_BLUE + this.Players.get(0).GetInsured() + App.ANSI_RESET); + } + + // Go thew all hands of the player + for (int HandNb = 0; HandNb < this.Players.get(0).GetNbHands(); HandNb++) { + + System.out.println("\nHand " + App.ANSI_GREEN + (HandNb + 1) + App.ANSI_RESET + " :"); + + // Show to bet amount of the hand + System.out.println("\tBet : " + App.ANSI_BLUE + this.Players.get(0).GetBet(HandNb) + App.ANSI_RESET); + + // Show strength of the hand of the player + // 99 = BlackJack + // >21 = Busted + // <=21 = show the strength + System.out.print("\tStrength : " + App.ANSI_PURPLE); + if (this.Players.get(0).GetStrength(HandNb) == 99) { + System.out.println("BlackJack" + App.ANSI_RESET); + } else if (this.Players.get(0).GetStrength(HandNb) > 21) { + System.out.println( + this.Players.get(0).GetStrength(HandNb) + App.ANSI_RED + " [BUSTED]" + App.ANSI_RESET); + } else { + System.out.println(this.Players.get(0).GetStrength(HandNb) + App.ANSI_RESET); + } + + // Show and apply gains and losses + System.out.print("\tResult : "); + // If the player is Busted (strength > 21 but not BlackJack (99)) + if (this.Players.get(0).GetStrength(HandNb) > 21 && this.Players.get(0).GetStrength(HandNb) != 99) { + // Show player loss + System.out.println(App.ANSI_RED + "-" + this.Players.get(0).GetBet(HandNb) + App.ANSI_RESET); + } + // If it's a Draw + else if (this.Dealer.GetStrength(0) == this.Players.get(0).GetStrength(HandNb)) { + // Player get's back his bet + System.out.println(App.ANSI_BLUE + "ยฑ0" + App.ANSI_RESET); + this.Players.get(0).AddMoney(this.Players.get(0).GetBet(HandNb)); + } + // If the player has done a BlackJack + else if (this.Players.get(0).GetStrength(HandNb) == 99) { + // Player gets payed 1.5 to 1 + System.out.println(App.ANSI_GREEN + "+" + (this.Players.get(0).GetBet(HandNb) * 1.5) + App.ANSI_RESET); + this.Players.get(0).AddMoney(this.Players.get(0).GetBet(HandNb) * 2.5); + } + // If the Dealer is Busted (strength > 21 but not BlackJack (99)) + else if (this.Dealer.GetStrength(0) > 21 && this.Dealer.GetStrength(0) != 99) { + // Player wins and get payed 1 to 1 + System.out.println(App.ANSI_GREEN + "+" + this.Players.get(0).GetBet(HandNb) + App.ANSI_RESET); + this.Players.get(0).AddMoney(this.Players.get(0).GetBet(HandNb) * 2); + } + // If the Dealer has a better score + else if (this.Players.get(0).GetStrength(HandNb) < this.Dealer.GetStrength(0)) { + // Show player loss + System.out.println(App.ANSI_RED + "-" + this.Players.get(0).GetBet(HandNb) + App.ANSI_RESET); + } + // If the Player has a better score + else if (this.Players.get(0).GetStrength(HandNb) > this.Dealer.GetStrength(0)) { + // Player wins and get payed 1 to 1 + System.out.println(App.ANSI_GREEN + "+" + this.Players.get(0).GetBet(HandNb) + App.ANSI_RESET); + this.Players.get(0).AddMoney(this.Players.get(0).GetBet(HandNb) * 2); + } + + } + + // Check if the player had insurance + if (this.Players.get(0).HasInsured()) { + + System.out.print("Insurance : "); + + // If the Dealer did a BackJack + if (this.Dealer.GetStrength(0) == 99) { + // Player gets payed back 2 to 1 + System.out.println(App.ANSI_GREEN + "+" + (this.Players.get(0).GetInsured() * 3) + App.ANSI_RESET); + this.Players.get(0).AddMoney(this.Players.get(0).GetInsured() * 3); + } else { + // Show player loss + System.out.println(App.ANSI_RED + "-" + (this.Players.get(0).GetInsured()) + App.ANSI_RESET); + } + } + + // Show the final player balance + System.out.println("\nMoney : " + App.ANSI_BLUE + this.Players.get(0).GetMoney() + App.ANSI_RESET); + + System.out.print("> "); + + // Wait for a simple input of the player + try { + System.in.read(); + } catch (Exception e) { + } + + // If the player has less than the minimum bid amount allowed + if (this.Players.get(0).GetMoney() <= 10) { + return true; + } + + // If more thn 75% of the Deck has been used, reshuffle all cards. In our case: + // simply recreate a new deck + if (this.Deck.GetNbCards() < 78) { + this.Deck = new JeudeCarte(new Paquet(6, 52)); + } + + // Reset all hands + this.Dealer.Reset(this.Deck); + for (Joueur Player : this.Players) { + Player.Reset(this.Deck); + } + + return false; + } + +} diff --git a/Partie_3/src/main/java/ch/hepia/Hand.java b/Partie_3/src/main/java/ch/hepia/Hand.java new file mode 100644 index 0000000..9b5ffe0 --- /dev/null +++ b/Partie_3/src/main/java/ch/hepia/Hand.java @@ -0,0 +1,216 @@ +package ch.hepia; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; + +public class Hand implements Comparable<Hand> { + + private ArrayList<Carte> Hand; + private double Bet; + private boolean Splitted; + private boolean Doubled; + + public Hand(Carte... cartes) { + + this.Hand = new ArrayList<>(); + + for (Carte carte : cartes) { + + Hand.add(carte); + + } + + this.Splitted = false; + this.Doubled = false; + this.Bet = 0; + } + + public Hand(JeudeCarte game, int nb) { + + this.Hand = new ArrayList<>(); + + this.DrawCardFromGame(game, nb); + + this.Splitted = false; + this.Doubled = false; + } + + public boolean HasDoubled() { + return this.Doubled; + } + + public void Double() { + this.Doubled = true; + this.Bet *= 2; + } + + public boolean HasSplit() { + return this.Splitted; + } + + public void Splitted() { + this.Splitted = true; + } + + public int NbCard() { + return this.Hand.size(); + } + + public void SetBet(double amount) { + if (amount < 0) { + throw new RuntimeException("Can't bet negative amount of money."); + } + + this.Bet = amount; + } + + public double GetBet() { + return this.Bet; + } + + public Carte GetCarte(int cardNb) { + return this.Hand.get(cardNb); + } + + public void AddCardToHand(Carte... cartes) { + + for (Carte carte : cartes) { + + this.Hand.add(carte); + + } + } + + public void RemoveCardFromHand(Carte... cartes) { + + for (Carte carte : cartes) { + + this.Hand.remove(carte); + + } + } + + public void DrawCardFromGame(JeudeCarte game) { + + this.AddCardToHand(game.GetTopCarteOfGame()); + + game.RemoveCarteFromGame(game.GetTopCarteOfGame()); + + } + + public void DrawCardFromGame(JeudeCarte game, int nb) { + + for (int x = 0; x < nb; x++) { + this.DrawCardFromGame(game); + } + + } + + public void SortHand() { + + Collections.sort(Hand, new Comparator<Carte>() { + + public int compare(Carte carte1, Carte carte2) { + + int comparaisonCouleur = carte1.getCouleur().compareTo(carte2.getCouleur()); + + if (comparaisonCouleur == 0) { + + return Integer.compare(carte1.getRang(), carte2.getRang()); + + } else { + + return comparaisonCouleur; + } + } + + }); + + } + + public int GetStrength() { + + int force = 0; + int as = 0; + + // Add strength of cards and count how much Asses there is + for (Carte carte : Hand) { + if (carte.getForce() == 1) { + as++; + } + force += carte.getForce(); + } + + // Test how many Asses we can but to 11 without going over 21 + while (force < 21 && as > 0) { + force += 10; + + as--; + + if (force > 21) { + force -= 10; + as = 0; + } + } + + // Edge Case = BlackJack + // Check if a 21 is a BlackJack (As + 10) or a combination of 3 cards + // (simple 21) + if (force == 21) { + + boolean isAs = false; + boolean is10 = false; + boolean isOther = false; + + for (Carte carte : Hand) { + + switch (carte.getForce()) { + case 1: + isAs = true; + break; + case 10: + is10 = true; + break; + default: + isOther = true; + break; + } + } + + if (isAs && is10 && !isOther) { + return 99; + } + } + + return force; + } + + public void ShowHand() { + + for (Carte carte : Hand) { + + System.out.print(carte.getNomComplet() + " "); + + } + + System.out.println(""); + } + + // Not used but asked for Part 2 + @Override + public int compareTo(Hand otherHand) { + + int Hand_1_Strength = this.GetStrength(); + int Hand_2_Strength = otherHand.GetStrength(); + + if (Hand_1_Strength > Hand_2_Strength) { + return 1; + } else if (Hand_1_Strength < Hand_2_Strength) { + return -1; + } else { + return 0; + } + + } +} diff --git a/Partie_3/src/main/java/ch/hepia/JeudeCarte.java b/Partie_3/src/main/java/ch/hepia/JeudeCarte.java new file mode 100644 index 0000000..e6bd3c6 --- /dev/null +++ b/Partie_3/src/main/java/ch/hepia/JeudeCarte.java @@ -0,0 +1,123 @@ +package ch.hepia; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +public class JeudeCarte { + + private List<Carte> jeuDeCartes; + + public JeudeCarte(int nb) { + + jeuDeCartes = new ArrayList<>(); + + for (COULEUR couleur : COULEUR.values()) { + + for (int rang = 7; rang <= (nb / 4) + 6; rang++) { + + if (rang > 13) { + jeuDeCartes.add(new Carte(couleur, rang - 13)); + } else { + jeuDeCartes.add(new Carte(couleur, rang)); + } + + } + + } + + if (nb % 4 != 0) { + + for (int x = 0; x < nb % 4; x++) { + + jeuDeCartes.add(new Carte(COULEUR.carreau, 0)); + + } + } + + Collections.sort(jeuDeCartes, new Comparator<Carte>() { + + public int compare(Carte carte1, Carte carte2) { + + int comparaisonCouleur = carte1.getCouleur().compareTo(carte2.getCouleur()); + + if (comparaisonCouleur == 0) { + + return Integer.compare(carte1.getRang(), carte2.getRang()); + + } else { + + return comparaisonCouleur; + } + } + + }); + + } + + public JeudeCarte(Paquet paquet) { + + jeuDeCartes = new ArrayList<>(); + + List<JeudeCarte> paquets = paquet.getPaquet(); + + for (JeudeCarte deck : paquets) { + List<Carte> cartes = deck.getCartes(); + jeuDeCartes.addAll(cartes); + } + + } + + public List<Carte> getCartes() { + return this.jeuDeCartes; + } + + public Carte GetTopCarteOfGame() { + + return this.jeuDeCartes.get(0); + + } + + public void AddCarteToGame(Carte... cartes) { + + for (Carte carte : cartes) { + + this.jeuDeCartes.add(carte); + + } + } + + public void RemoveCarteFromGame(Carte... cartes) { + + for (Carte carte : cartes) { + + this.jeuDeCartes.remove(carte); + + } + } + + public void shuffle() { + + Collections.shuffle(jeuDeCartes); + + } + + public int GetNbCards() { + return this.jeuDeCartes.size(); + } + + public void ShowPaquet() { + + System.out.println("------- Paquet -------"); + + for (Carte carte : jeuDeCartes) { + + System.out.println(carte.getNomComplet()); + + } + + System.out.println("----------------------"); + } + +} diff --git a/Partie_3/src/main/java/ch/hepia/Joueur.java b/Partie_3/src/main/java/ch/hepia/Joueur.java new file mode 100644 index 0000000..07d9987 --- /dev/null +++ b/Partie_3/src/main/java/ch/hepia/Joueur.java @@ -0,0 +1,754 @@ +package ch.hepia; + +import java.util.ArrayList; + +interface Joueur { + + // Set the Play strategy + public void SetStrategy(); + + // Add amount of money to the player balance + public void AddMoney(double amount); + + // Remove amount of money from the player balance + public void RemoveMoney(double amount); + + // Get the current balance of the player + public double GetMoney(); + + // Set bet amount on specific player hand + public void SetBet(double amount, int handNb); + + // Get the bet amount from specific hand + public double GetBet(int handNb); + + // Draw 1 card in specific hand from specific Deck + public void DrawCard(int handNb, JeudeCarte Jeu); + + // Get a specific card strength from a specific hand + public int GetCardStrength(int handNb, int cardNb); + + // Get number of cards in specific hand + public int GetNbCards(int handNb); + + // Show specific hand in terminal + public void ShowHand(int handNb); + + // Show all hands in terminal + public void ShowHands(); + + // Get the number of hands of the player + public int GetNbHands(); + + // Get the strength of a specific hand + public int GetStrength(int handNb); + + // Double the bet on specific hand + public void Double(int handNb, JeudeCarte Jeu); + + // Check if a specific hand has been doubled + public boolean HasDoubled(int handNb); + + // Check if a specific hand can be split + public boolean CanSplit(int handNb); + + // Split a specific hand + public void Split(int handNb, JeudeCarte Jeu); + + // Check if a specific hand was splitted + public boolean HasSplit(int handNb); + + // Insure the player + public void Insure(); + + // Get player insured amount + public double GetInsured(); + + // Has the player insured himself + public boolean HasInsured(); + + // Reset player for next turn + public void Reset(JeudeCarte Jeu); +} + +// Human Player +class JoueurHumain implements Joueur { + + private ArrayList<Hand> Hands; + private double Money; + private double Insurance; + private boolean Insured; + + public JoueurHumain(JeudeCarte Jeu, int Money) { + + this.Hands = new ArrayList<>(); + + // At creation, player get's 1 hand with 2 cards + this.Hands.add(new Hand(Jeu, 2)); + + this.Hands.get(0).SetBet(0); + + this.Money = Money; + this.Insurance = 0; + this.Insured = false; + } + + public void SetStrategy() { + // Human player has no strategy + throw new RuntimeException("Humain Player has no Strategy."); + } + + public void AddMoney(double amount) { + + // Check if the amount is positif and that it will not create an Overflow + if (amount < 0) { + throw new RuntimeException("Can't add negative amount of Money."); + } else if (this.Money > 0 && this.Money + amount < 0) { + throw new RuntimeException("Money Overflow."); + } + + // Add money to current balance + this.Money += amount; + } + + public void RemoveMoney(double amount) { + + // Check if the amount is positif and that it will not create an Underflow + if (amount < 0) { + throw new RuntimeException("Can't subtract negative amount of Money."); + } else if (this.Money < 0 && this.Money + amount > 0) { + throw new RuntimeException("Money Underflow."); + } + + // Remove money from current balance + this.Money -= amount; + } + + public double GetMoney() { + return this.Money; + } + + public void SetBet(double amount, int handNb) { + + // Check if the amount is positif + if (amount <= 0) { + throw new RuntimeException("Can't bet a negative or null amount."); + } + // Check if the player has enough money in his balance + else if (amount > this.Money) { + throw new RuntimeException("Can't bet more than the Money you have."); + } + + // Check if the hand ID is valide + if (handNb < 0 || handNb > Hands.size()) { + throw new RuntimeException("Hand number not valid."); + } + + // Remove amount from player balance + this.Money -= amount; + + // Set bet on player hand + this.Hands.get(handNb).SetBet(amount); + } + + public double GetBet(int handNb) { + + // Check if the hand ID is valide + if (handNb < 0 || handNb > Hands.size()) { + throw new RuntimeException("Hand number not valid."); + } + + // Get the bet amount on this hand + return this.Hands.get(handNb).GetBet(); + } + + public void DrawCard(int handNb, JeudeCarte Jeu) { + + // Check if the hand ID is valide + if (handNb < 0 || handNb > Hands.size()) { + throw new RuntimeException("Hand number not valid."); + } + + // Draw 1 card from of Deck in hand + this.Hands.get(handNb).DrawCardFromGame(Jeu); + } + + public int GetCardStrength(int handNb, int cardNb) { + return this.Hands.get(handNb).GetCarte(cardNb).getForce(); + } + + public int GetNbCards(int handNb) { + return this.Hands.get(handNb).NbCard(); + } + + public void ShowHand(int handNb) { + + // Check if the hand ID is valide + if (handNb < 0 || handNb > Hands.size()) { + throw new RuntimeException("Hand number not valid."); + } + + // Show hand in terminal + this.Hands.get(handNb).ShowHand(); + } + + public void ShowHands() { + + // Go threw all hands + for (Hand hand : this.Hands) { + + // Show the hand in terminal + hand.ShowHand(); + } + } + + public int GetNbHands() { + return this.Hands.size(); + } + + public int GetStrength(int handNb) { + + // If the strength is a BlackJack + // AND + // The hand was splitted + // OR + // It's not the 1rst hand + // OR + // There are more than 2 cards in the hand + if (this.Hands.get(handNb).GetStrength() == 99 + && (this.Hands.get(handNb).HasSplit() || handNb != 0 || this.Hands.get(handNb).NbCard() != 2)) { + // Than it is not a BlackJack but a simple 21 + return 21; + } else { + return this.Hands.get(handNb).GetStrength(); + } + + } + + public void Double(int handNb, JeudeCarte Jeu) { + + // Remove bet amount from money + this.RemoveMoney(this.Hands.get(handNb).GetBet()); + + // Double the bet in the hand + this.Hands.get(handNb).Double(); + + // If hte player doubles a hand he must draw 1 card + this.Hands.get(handNb).DrawCardFromGame(Jeu); + } + + public boolean HasDoubled(int handNb) { + return this.Hands.get(handNb).HasDoubled(); + } + + public boolean CanSplit(int handNb) { + + // Hand can be split + // If it hasn't already been spit with an As + // AND + // if the 2 cards are the same + // AND + // if there is only 2 cards in the hands + if (!(this.Hands.get(handNb).HasSplit() && this.Hands.get(handNb).GetCarte(0).getForce() == 1) + && this.Hands.get(handNb).GetCarte(0).getForce() == this.Hands.get(handNb).GetCarte(1).getForce() + && this.Hands.get(handNb).NbCard() == 2) { + return true; + } + + return false; + } + + public void Split(int handNb, JeudeCarte Jeu) { + + // Player can only have 3 hands + if (this.Hands.size() == 3) { + throw new RuntimeException("Max number of splits."); + } + + // Get the 2nd card of the hand we want to split + Carte card = this.Hands.get(handNb).GetCarte(1); + + // Create a new hand with this card in it + this.Hands.add(new Hand(card)); + + // Remove the card from the 1rst hand + this.Hands.get(handNb).RemoveCardFromHand(card); + + // Set the hand as splitted + this.Hands.get(handNb).Splitted(); + + // Set the new hand as splitted + this.Hands.get(this.Hands.size() - 1).Splitted(); + + // Set the bet of the new hand to the same as the splitted hand + this.Hands.get(this.Hands.size() - 1).SetBet(this.Hands.get(handNb).GetBet()); + + // Remove the money from the player balance + this.RemoveMoney(this.Hands.get(handNb).GetBet()); + + // Draw 1 card in each hands + this.Hands.get(handNb).DrawCardFromGame(Jeu); + this.Hands.get(this.Hands.size() - 1).DrawCardFromGame(Jeu); + } + + public boolean HasSplit(int handNb) { + return this.Hands.get(handNb).HasSplit(); + } + + public void Insure() { + + this.Insured = true; + + // Set the insurance the half the bet of the only player hand + this.Insurance = this.Hands.get(0).GetBet() / 2; + + // Remove the insurance from the player balance + this.RemoveMoney(this.Insurance); + } + + public double GetInsured() { + return this.Insurance; + } + + public boolean HasInsured() { + return this.Insured; + } + + public void Reset(JeudeCarte Jeu) { + + this.Insured = false; + + // Reset hands + this.Hands = new ArrayList<>(); + + // Draw 2 card from Deck + this.Hands.add(new Hand(Jeu, 2)); + + this.Hands.get(0).SetBet(0); + } +} + +// Computer Player +class JoueurOrdinateur implements Joueur { + + private ArrayList<Hand> Hands; + private double Money; + private double Insurance; + private boolean Insured; + + public JoueurOrdinateur(JeudeCarte Jeu, int Money) { + + this.Hands = new ArrayList<>(); + + // At creation, player get's 1 hand with 2 cards + Hands.add(new Hand(Jeu, 2)); + + Hands.get(0).SetBet(0); + + this.Money = Money; + this.Insurance = 0; + this.Insured = false; + } + + public void SetStrategy() { + // TODO + // Will be implemented in Part 3 of the project + } + + public void AddMoney(double amount) { + + // Check if the amount is positif and that it will not create an Overflow + if (amount < 0) { + throw new RuntimeException("Can't add negative amount of Money."); + } else if (this.Money > 0 && this.Money + amount < 0) { + throw new RuntimeException("Money Overflow."); + } + + // Add amount from current player balance + this.Money += amount; + } + + public void RemoveMoney(double amount) { + + // Check if the amount is positif and that it will not create an Underflow + if (amount < 0) { + throw new RuntimeException("Can't subtract negative amount of Money."); + } else if (this.Money < 0 && this.Money + amount > 0) { + throw new RuntimeException("Money Underflow."); + } + + // Remove amount from current player balance + this.Money -= amount; + } + + public double GetMoney() { + return this.Money; + } + + public void SetBet(double amount, int handNb) { + + // Check if the amount is positif + if (amount <= 0) { + throw new RuntimeException("Can't bet a negative or null amount."); + } + // Check if the player has enough money in his balance + else if (amount > this.Money) { + throw new RuntimeException("Can't bet more than the Money you have."); + } + + // Check if the hand ID is valide + if (handNb < 0 || handNb > Hands.size()) { + throw new RuntimeException("Hand number not valid."); + } + + // Remove amount from player balance + this.Money -= amount; + + // Set bet on player hand + this.Hands.get(handNb).SetBet(amount); + } + + public double GetBet(int handNb) { + + // Check if the hand ID is valide + if (handNb < 0 || handNb > Hands.size()) { + throw new RuntimeException("Hand number not valid."); + } + + // Get the bet amount on this hand + return this.Hands.get(handNb).GetBet(); + } + + public void DrawCard(int handNb, JeudeCarte Jeu) { + + // Check if the hand ID is valide + if (handNb < 0 || handNb > Hands.size()) { + throw new RuntimeException("Hand number not valid."); + } + + // Draw 1 card from of Deck in hand + this.Hands.get(handNb).DrawCardFromGame(Jeu); + } + + public int GetCardStrength(int handNb, int cardNb) { + return this.Hands.get(handNb).GetCarte(cardNb).getForce(); + } + + public int GetNbCards(int handNb) { + return this.Hands.get(handNb).NbCard(); + } + + public void ShowHand(int handNb) { + + // Check if the hand ID is valide + if (handNb < 0 || handNb > Hands.size()) { + throw new RuntimeException("Hand number not valid."); + } + + // Show hand in terminal + this.Hands.get(handNb).ShowHand(); + } + + public void ShowHands() { + + // Go threw all hands + for (Hand hand : this.Hands) { + + // Show the hand in terminal + hand.ShowHand(); + } + } + + public int GetNbHands() { + return this.Hands.size(); + } + + public int GetStrength(int handNb) { + + // If the strength is a BlackJack + // AND + // The hand was splitted + // OR + // It's not the 1rst hand + // OR + // There are more than 2 cards in the hand + if (this.Hands.get(handNb).GetStrength() == 99 + && (this.Hands.get(handNb).HasSplit() || handNb != 0 || this.Hands.get(handNb).NbCard() != 2)) { + // Than it is not a BlackJack but a simple 21 + return 21; + } else { + return this.Hands.get(handNb).GetStrength(); + } + + } + + public void Double(int handNb, JeudeCarte Jeu) { + + // Remove bet amount from money + this.RemoveMoney(this.Hands.get(handNb).GetBet()); + + // Double the bet in the hand + this.Hands.get(handNb).Double(); + + // If hte player doubles a hand he must draw 1 card + this.Hands.get(handNb).DrawCardFromGame(Jeu); + } + + public boolean HasDoubled(int handNb) { + return this.Hands.get(handNb).HasDoubled(); + } + + public boolean CanSplit(int handNb) { + + // Hand can be split + // If it hasn't already been spit with an As + // AND + // if the 2 cards are the same + // AND + // if there is only 2 cards in the hands + if (!(this.Hands.get(handNb).HasSplit() && this.Hands.get(handNb).GetCarte(0).getForce() == 1) + && this.Hands.get(handNb).GetCarte(0).getForce() == this.Hands.get(handNb).GetCarte(1).getForce() + && this.Hands.get(handNb).NbCard() == 2) { + return true; + } + + return false; + } + + public void Split(int handNb, JeudeCarte Jeu) { + + // Player can only have 3 hands + if (this.Hands.size() == 3) { + throw new RuntimeException("Max number of splits."); + } + + // Get the 2nd card of the hand we want to split + Carte card = this.Hands.get(handNb).GetCarte(1); + + // Create a new hand with this card in it + this.Hands.add(new Hand(card)); + + // Remove the card from the 1rst hand + this.Hands.get(handNb).RemoveCardFromHand(card); + + // Set the hand as splitted + this.Hands.get(handNb).Splitted(); + + // Set the new hand as splitted + this.Hands.get(this.Hands.size() - 1).Splitted(); + + // Set the bet of the new hand to the same as the splitted hand + this.Hands.get(this.Hands.size() - 1).SetBet(this.Hands.get(handNb).GetBet()); + + // Remove the money from the player balance + this.RemoveMoney(this.Hands.get(handNb).GetBet()); + + // Draw 1 card in each hands + this.Hands.get(handNb).DrawCardFromGame(Jeu); + this.Hands.get(this.Hands.size() - 1).DrawCardFromGame(Jeu); + } + + public boolean HasSplit(int handNb) { + return this.Hands.get(handNb).HasSplit(); + } + + public void Insure() { + + this.Insured = true; + + // Set the insurance the half the bet of the only player hand + this.Insurance = this.Hands.get(0).GetBet() / 2; + + // Remove the insurance from the player balance + this.RemoveMoney(this.Insurance); + } + + public double GetInsured() { + return this.Insurance; + } + + public boolean HasInsured() { + return this.Insured; + } + + public void Reset(JeudeCarte Jeu) { + + this.Insured = false; + + // Reset hands + this.Hands = new ArrayList<>(); + + // Draw 2 card from Deck + this.Hands.add(new Hand(Jeu, 2)); + + this.Hands.get(0).SetBet(0); + } +} + +// Dealer +class JoueurCroupier implements Joueur { + + private Hand Hand; + + public JoueurCroupier(JeudeCarte Jeu) { + this.Hand = new Hand(Jeu, 1); + } + + public void SetStrategy() { + // Dealer has no strategy + throw new RuntimeException("Dealer has no Strategy."); + } + + public void AddMoney(double amount) { + // Dealer has infinite amount of money + throw new RuntimeException("Dealer has no Money."); + } + + public void RemoveMoney(double amount) { + // Dealer has infinite amount of money + throw new RuntimeException("Dealer has no Money."); + } + + public double GetMoney() { + // Dealer has infinite amount of money + throw new RuntimeException("Dealer has no Money."); + } + + public void SetBet(double amount, int handNb) { + // Dealer doesn't bet + throw new RuntimeException("Dealer doesn't Bet."); + } + + public double GetBet(int handNb) { + // Dealer doesn't bet + throw new RuntimeException("Dealer doesn't Bet."); + } + + public void DrawCard(int handNb, JeudeCarte Jeu) { + + // Dealer has only 1 hand + if (handNb != 0) { + throw new RuntimeException("Dealer has only 1 hand."); + } + + // Draw 1 card from of Deck in hand + this.Hand.DrawCardFromGame(Jeu); + } + + public int GetCardStrength(int handNb, int cardNb) { + return this.Hand.GetCarte(cardNb).getForce(); + } + + public int GetNbCards(int handNb) { + return this.Hand.NbCard(); + } + + public void ShowHand(int handNb) { + + // Dealer has only 1 hand + if (handNb != 0) { + throw new RuntimeException("Dealer has only 1 hand."); + } + + // Show hand in terminal + this.Hand.ShowHand(); + } + + public void ShowHands() { + + // Show hand in terminal (only 1 for the Dealer) + this.Hand.ShowHand(); + } + + public int GetNbHands() { + + // Dealer has only 1 hand + return 1; + } + + public int GetStrength(int handNb) { + + // Dealer has only 1 hand + if (handNb != 0) { + throw new RuntimeException("Bank has only 1 hand."); + } + + // If the strength is a BlackJack + // AND + // The hand was splitted + // OR + // It's not the 1rst hand + // OR + // There are more than 2 cards in the hand + if (this.Hand.GetStrength() == 99 + && (this.Hand.HasSplit() || handNb != 0 || this.Hand.NbCard() != 2)) { + // Than it is not a BlackJack but a simple 21 + return 21; + } else { + return this.Hand.GetStrength(); + } + + } + + public void Double(int handNb, JeudeCarte Jeu) { + // Dealer does not bet + throw new RuntimeException("Dealer can't Double."); + } + + public boolean HasDoubled(int handNb) { + // Dealer does not bet + throw new RuntimeException("Dealer can't Double."); + } + + public boolean CanSplit(int handNb) { + // Dealer can't split + throw new RuntimeException("Dealer can't Split."); + } + + public void Split(int handNb, JeudeCarte Jeu) { + // Dealer can't split + throw new RuntimeException("Dealer can't Split."); + + } + + public boolean HasSplit(int handNb) { + // Dealer can't split + throw new RuntimeException("Dealer can't split."); + } + + public void Insure() { + // Dealer can't insure himself against himself + throw new RuntimeException("Dealer can't get Insurance."); + } + + public double GetInsured() { + // Dealer can't insure himself against himself + throw new RuntimeException("Dealer can't get Insurance."); + } + + public boolean HasInsured() { + // Dealer can't insure himself against himself + throw new RuntimeException("Dealer can't get Insurance."); + + } + + public void Reset(JeudeCarte Jeu) { + + // Create a new hand with 1 card + this.Hand = new Hand(Jeu, 1); + } + + // Check if the Dealer only has an As in this hand (for Insurance) + public boolean HasOnlyAs() { + + // If the first card in hand is an As + // AND + // There is only 1 card in the hand + if (this.Hand.GetCarte(0).getNomRang() == "As" && this.Hand.NbCard() == 1) { + return true; + } + + return false; + } + +} diff --git a/Partie_3/src/main/java/ch/hepia/Paquet.java b/Partie_3/src/main/java/ch/hepia/Paquet.java new file mode 100644 index 0000000..43311c5 --- /dev/null +++ b/Partie_3/src/main/java/ch/hepia/Paquet.java @@ -0,0 +1,25 @@ +package ch.hepia; + +import java.util.List; +import java.util.ArrayList; + +public class Paquet { + + private List<JeudeCarte> paquet; + + public Paquet(int nb_paquet, int nb_carte) { + + paquet = new ArrayList<>(); + + for (int i = 0; i < nb_paquet; ++i) { + JeudeCarte jeuDeCarte = new JeudeCarte(nb_carte); + jeuDeCarte.shuffle(); + paquet.add(jeuDeCarte); + } + + } + + public List<JeudeCarte> getPaquet() { + return paquet; + } +} diff --git a/Partie_3/src/test/java/ch/hepia/CarteTest.java b/Partie_3/src/test/java/ch/hepia/CarteTest.java new file mode 100644 index 0000000..f1ac133 --- /dev/null +++ b/Partie_3/src/test/java/ch/hepia/CarteTest.java @@ -0,0 +1,49 @@ +package ch.hepia; + +import static org.junit.Assert.assertEquals; +import org.junit.Test; + +public class CarteTest { + + @Test + public void testGetCouleur() { + Carte carte = new Carte(COULEUR.coeur, 2); + assertEquals(COULEUR.coeur, carte.getCouleur()); + } + + @Test + public void testGetRang() { + Carte carte = new Carte(COULEUR.carreau, 7); + assertEquals(7, carte.getRang()); + } + + @Test + public void testGetForce() { + Carte carte = new Carte(COULEUR.trefle, 12, 10); + assertEquals(10, carte.getForce()); + } + + @Test + public void testGetNomCouleur() { + Carte carte = new Carte(COULEUR.coeur, 0); + assertEquals("Coeur", carte.getNomCouleur()); + } + + @Test + public void testGetNomRang() { + Carte carte = new Carte(COULEUR.coeur, 2); + assertEquals("2", carte.getNomRang()); + } + + @Test + public void testGetNomComplet() { + Carte carte = new Carte(COULEUR.carreau, 12); + assertEquals("Dame de Carreau", carte.getNomComplet()); + } + + @Test + public void testGetNomComplet_2() { + Carte carte = new Carte(COULEUR.carreau, 0); + assertEquals("Joker", carte.getNomComplet()); + } +} \ No newline at end of file diff --git a/Partie_3/target/classes/ch/hepia/App.class b/Partie_3/target/classes/ch/hepia/App.class new file mode 100644 index 0000000000000000000000000000000000000000..7b2a1df8e106d74a6b78784c9f545cf4350d308a GIT binary patch literal 2431 zcmX^0Z`VEs1_lR)ZgvJHMh2eb4E>DMg3LsH$ASWO1{OvJfvm)`ME#t^ymWp4q^#8B z5=I85%sfU0VIQzWX-Q^|esFSPUS4XEH6sI;qhGLRe2{CfYX~EQ5JU-BZ*WObW?s5A zBLlB<eqM1&VqQsDVoqr)2Lm@F1B-ODK`u<MlaHgbHwObBBLk~+v@uAW18SxV2ZJC) z)DW)PJ;>G7kAp!3B5st+$iNL&9qH=h;~&n!AP$i*&Shla1WP#igt~GtNI`^6;OYZH zg93b9IT&Oi5~gtV&XJCO91IE&VKcbB;U1nLt{e=?5OMQdMg|U><ebdB%o00B24)S- zFh&Lz=lqmZb_NYb20@IF;$+Zb&|zoLMhV{F%HopLTpk8i23<x5QApTj=IeXr6_l0) zmlUNY=2~+xs59vEFc>fxGBU8)K&_L|z^Ya=jFW+p!5Cy78zTe1Pi9`KUukYqYEejH zQcfx;cJh-GbHWmfGC_Q>AQuBOgE`1}RYnGul8nq^Mg~3~<P>4e$iV58lbD?Cm6)6j z@`Mc!gDnHd%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A6AZ45pj z+J75^<8lTm5Hk=-XcL3cHiqDEFcm)Y|6?#C+FFWbA%lpN0Q+JFK9G)hux2nbaT|lr z^8Xt^qRC)Uu#u@yBSAu7BQT7#krv=uh+$ef*tD&?88RcKq_;C<`!d@tXAscY#*nA8 zjiFFy8$*em?9Bh4K(=A`Ryo*Wqiqb8pfF=*00s3X1|0?l25|-s1_=f}1}O$H1|<eL z22}<{1~mp126YBC1~mpv1`P&722BPF22}<}1|0?u27QKL1_Op@21AB824jXq1`~#4 z24jXa1_g#p25W{w20Mll2787Y1_y=~21kZ&20Ml+3@!|_8Qd8bGI%hoWbkBI!{E)Z zg~5_xJ3|1&L53iP!wj(u#~9)mPBFwYoMT8}xXcjCaGfEQ;XXqe!&8O~hPMn^3||>? z7=AP4g5%eYfsMg~L5`t@p_YMxA(LS;lr@_{lA(^FmVuFBJA*5fb&$cD!HS`tfr;TT zgC#=)Ln8w-LlZcYaEoz?{b5jL<N{F&j9h;i_}CdT8F?5u8JZbdAPI)Shyj%P7#LV~ mFtmaKjtLxaTnwNzTExK2Py%)kB*C#Tv@>*o)pvr^Z5IHoXdK}H literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/COULEUR.class b/Partie_3/target/classes/ch/hepia/COULEUR.class new file mode 100644 index 0000000000000000000000000000000000000000..c38a76f38b5f56aec3100849ad749e77c1255bcd GIT binary patch literal 1044 zcmX^0Z`VEs1_lQPGj;|hMh1c84E>DMg3LsHXa7(i*U%t#1{OvJzO2NuME#t^ymWon zywY4o2G->K)Y2kG1|c7G_126G?8%8mMX8CUj0~&=nT4gPj0|igMX6~ysf-NVu707u zDq)U3p{~J<48qaav~$=b=Vaz(me?^eFl%UrF*2|?=clA{FtBnlFfs`8FbFXSGcvH* zK$VDT_#hk?TvC*omu~H;8OF)L$RNtYz{<eJ!N3mUNboSQgE$-@jx-Mg2Z+N7;>htZ za5AugSPDE0TnyZd4E#Qsd8vM-xk;%-A&E&KcMJLCCnx5FB^G6Z_+UXU24)69Mh2FW zjLc$22DY-qoYK@{Mg~z0O)S3RV$fjFVrS4~WDr1dZDnyuYAz3hHiHf$17~7UQDS9s zenBN8gBG%%{FAa$lS`~Uk-P~L@&ttrJJ@FbG)4wBWNpx((8LU3ki!jl7<3s785vBG zwK(S_78hG1*#kEN;bu_uTQf3n1?QI*C8xS&f&z!jIkBiDRS%?yk%2QfGd(Y{q_ilN zkwFE?ERaSUOvl(+I~Xu9GB7hRFt9pEg5ryT!9fxfRbZNffelP^f@lFLQ1mb`Ft9Li zFz_(&GB7gmF)%Q+Ft9LyK*(+e#z-N4=Ismun;AsF95EI!M;y$NWCe4iz#JJiFh`bs zF9TyF^Ckw7;7FED4C29&teY65f+N{BF~|mQW{}^=z`(%7pvb_$AjZH7wwafKl|hPu zjX|A(oxy~GnL!Dx0;EcaK^W>HLk4EBkJz=eWwtXYBMf0<U}Ru`YT^O2*%?$oUSr^7 zP-ReqYBytG1#1`E#2_E(&8)RA(gx&8UuNkY4C*=?z!rj>1Tl>f?gUN-T?Rd<8CncX eVDq_z7`1jV=pSHU#I28s!3b=oF@p)1HU$7;|I5Vy literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/Carte.class b/Partie_3/target/classes/ch/hepia/Carte.class new file mode 100644 index 0000000000000000000000000000000000000000..bb77e1a2cf2b2c55d68d07f73a271f6ad870f1c6 GIT binary patch literal 2722 zcmX^0Z`VEs1_lR)^Xv>vj0}9q8TuKi1(}KZ&WS}Osq73aj0^%<iDilUIf;4c`u<5- zsmUdb4D8AIr8%jkMT`tWJ_sHDp+2smLDq~6EJcZV>5L4Fo{S8vY57ITsf-N#e*V5r zL9X#GuJJ*Re(u4H47|?ydBr7(c_m?qIi;!03=9msj0`*lIf<2-dFjrHMJdIM3?k9d zJ_y@`ONuh{(ybX8*laTMGE3|j8N@U&t@qRnV`N})&QD3@Vqj(v=3(Gx5Mg9s*3b-N zXAom#5XNF6JA(v@Hz5{rFi0^nu)STd=k4bC91Jp0_NI*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6;AUW8U}E3_71a!U3=9nH42%r?3<3;{41x>{Olk}qAafX}Yi(x`(qiAsAR5Um zz_*t{Jd#;RGB}b&NIE!@RY*2Cl1)fHIFemRF*uS#NI5uCfK5m>I8uOJNIf`GfI~<# zI8uO9NIN)EfJ;a>I8uOHNIy7IfJewMI8uOD$T&DSk_E+7Q;@0VAX6<trdoqcwFR4M z4>r{iY^pQZR9CR6?qE|r!KQkHP4x{9j$}nK)gNSPAjs5Ukg1^{Q^UcgMuJU^2AdiS zHZ>k>Y9iRwWU#5JU{lkBgCp5cOw9zDnhi2F7i4Na$kalxsl{MZOTng=gH5djn_3Mv zwH9n@J=oO7;NYzc%`&qYIAsKQmoV_|W@wERYTwS#xnE0rD?^W#%vOdz83C@v4BQ~* zgyjsJS^`{K876FGU|?Won8d)qV8_7Ez`!8Mz``KJz|A1ckjNmyu$@7ak(WV?F@-^z zF^@rpv4TOKv6exBv57&6v4cUGv6n%GaRP%X<1_{hhRF;J3<{8_W|+b-m4ShQfpI!G z=`ey>><k<XObpW)7#M^ZSpGBSF)*_;FtRgDXJlaD6lY~%WSGe?3zB9S^cff#7#SEC zShcn=^lShpFOUn_z=Aqpn|Q!%R;W#kpu~(tbKe>?%|=)?&t;f{Me_u7%@$ZS&tsSm z)f~;h!obA9z@W?yN!|-U$$Jqfa+iQ2cUiEHHpoNU7*-e|JjDgpV#grKU=KE449r)C zdQ6gmi(xf`7&tuEz%7~#wI~{vjMjo|S`V^mBgm%Bpk%Zal#I56lhICaGTIGJMti}@ zXg@d^9Rw$%!{B6e6r7BXL)_Sh;Xqf05C%6S2S!637{b8La1!dkQ*Z}{GcbYUM@DNK z!|7QJY(kP7w6-ub!+fu`g#ls%B<1meQVoMQ13QB+0~bRe*cM3q%0O)ar5a`iMo__Z I796AJ03*At7ytkO literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/GameManager.class b/Partie_3/target/classes/ch/hepia/GameManager.class new file mode 100644 index 0000000000000000000000000000000000000000..deab1ca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07nwGI z>la3rDGXeU7L1k*jNqEajzN-{`!_>~l90(C1{TKO48bPSzZrsmGkE-Fi2cnFYxSEU zhUphWlT;2nqZxyQ;(rEF24;2!Mh139J#Zh7(F)YXWwd6rVPIgG!63=##K6et3?^N{ zq&t}O1e4xi(icqngULWJ84M;N>XAht>O;Y@;b0P3HWDlnjYQ%S@nno;U|`^4U}TJA KOkhl6kOTl3jF=bz literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/Hand$1.class b/Partie_3/target/classes/ch/hepia/Hand$1.class new file mode 100644 index 0000000000000000000000000000000000000000..e2750c39ec1ee0ffda4f715b78a572443a2da898 GIT binary patch literal 1128 zcmX^0Z`VEs1_lQP2X+P~Mh5=m4E>DMg3LsHkHowb6+?Cg7Dfhvti-ZJ{hY+SbbbG% ztkmQZb_O;^1`)7mX-Q^|zH@$VL1Iy2Nq!L{16xT(X0eI^BLlw=idoi-3~V-;d6^}4 zj0{2=XmXlij0`N!`6;QK42%rCJPhm%99#^{4E#I{oD2et49prJ1^hmld8vM-xk;%- zA&E&jsf-LlKKaRsIbn%KnIJw?kOkxbMg~DtD^v`v85!7<!46GjWKc$OfpcO}NvbtM zIfSq2$;BYSAjQrg$;iM5_X${zhe4V_hLM3QJ+;I+zceScw1|;GL_-tF1piPU*U%tq zE(SRU1$G8`Mg{?d2@p9R21N!XMg~r(i$d}l8H6=_z(EQQXxF^bTx*CMRCpLv8PpgV z*wa%>f)ex6!QtV_#h}5U#m=C~$RLQ&<(XHKnx0z3!yw9_&B(y2;pwUA$;iN#4Dz8N zBZB~v6G1|tI04HUF)|22T#}esoSz5x6{9C318;CiVsf@`VgWRK)sdYENe|XY4u^_> zoX*H#0&<BMBLi1(erZv1s#_)~);K{)OAq8|Mh4E{%=Em(lG377Mg}WPQy?N}Y0L)Q z7k1W+4E(Nn$vOGOnR)5HsU;ctDeMf^j10W+PzPDb!(a<aOdP@aMI|6UBLk0TUS4XE zb53G$acVIm1BYK~afwHMaS4M010w@710w?~1EYWdC^a%LFfcPPFmN((F)%W4GcYii zFfcJNF)%Q2X=!g|;L+O7z_*csfq{uZkb!}Lje(JYfuVpwh=GBD2h8ST5M~fzU|?Wm z5M>a9no!5U#K6M9z#yl+jX_*z8-w^Z23b4VSq%Kz+ZdE}wlOI0U{GHpy9R7C$W$S) z>JkPXhB5{Lh6)B5h8nO9T3~TGs0|DZatt~Qx?o%781xu)8JHM&7=#$~84MVh84Mw= z`@<l^DB#E-%3uU_i!K8**nhlQ+6NdUbPg~`Y-2D6S&i%=MzD1tPqQ+Zf<0@-U=F4& f7%UkW7+4sr7;G5qK!L)*2zCGi0|SFSScMe;Lf7x1 literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/Hand.class b/Partie_3/target/classes/ch/hepia/Hand.class new file mode 100644 index 0000000000000000000000000000000000000000..a5d795896fe3549efa725a1873962850a6211e6f GIT binary patch literal 4921 zcmX^0Z`VEs1_lR)!|V)9j10WV8TuKi1(}KZ9*KD=><lc73<6n+Wr_MZiFxVz{z+M> z$tCOzY>W&d2vO(!+=9fS#H5^5Mg|s;Hbw?fAFy<3NoJ0|V^L9JrB7yYi8UhwXK-eE zUSdgUQ7R*YIyN;nK5z#(Cl-~YTH9GOGB7)(mM}6fx-c?u1Q+CFmXxHXFfuSkF*2~b z<d-JpfOu>+nR%Hdc8m-n8qw%RXofK|usG+Zq;fGZGl=jo2r!5;GB9gshOsk<GcpKc zaVZyr7=s8W10#bJ4+A>`2Z$@f!ywBb$H>5(n3BTCAgTdzJW{AwYes=|DDW`wGVp;| zN<0kw5S9uL12+Q?BLlxrW?rgaX>L+#Q3xcsgnaUo6LZ26i!wocs31#8MrJWcH9ROl zfojdjz?KXOl43>%K@2}KGO&Ur85so7z0b(N8(fl@ob8)f0JeagL5q<=QUjsPE44Hw z6%yK>nqgcFj0}c63`Pw4j0^%UMTzCkiA5=HMfthziMgN%P6tz>ShX`UFy$pNGBA2F zGH`h$7Q<tQSwl05k%0}uXLDeH07eE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2L}uzIA8=p%>r()+aR8nU|<BbXCaB4p#z#_rL?v& ztgzMI#<0RpMs^7UE6W-g*+mSjOlz1C=|+x$oq>Vj3<E2}Sq3hK^9=k97Z?N?E;5KQ zTw;)5xB_+xBo|9Tox;E%#juJ&1Kj!&WmpZ4UoHj#hBfe9%)!9)mqCz`kxjsnVHv|( zsH-%g^#!Mv_5lXQZ4B!`j)3G}NLzssY#FHfVr76-BpbmEDkg?a44WAk7&sUh8Fn%- jGVEg5!@$5G#K6Rm1Ia`Tdl~jK9AuDWIK;pJE-P{X>lVmB literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/JeudeCarte$1.class b/Partie_3/target/classes/ch/hepia/JeudeCarte$1.class new file mode 100644 index 0000000000000000000000000000000000000000..e87f2ad85071fb1b622c4a955974eae6caf97a63 GIT binary patch literal 1160 zcmX^0Z`VEs1_lQP2X+P~Mh4O34E>DMg3LsHuhi0%ROiH^l2jE#b_Nzk27#=^vPAuy z#JqHU|D>$c<PvrUHbw>!uxM#XW{$pder`cxQDRAc5hDXzNk(R|iUA{os1Ftstr;2E zY%=pQOY9gKBs8$9&<tZ_U~$e*N#$f<WZ>mtU}xaqVqj+A=V9Pv5MX3r)&MEs_sPsl z^()OyN-YXWOv*`RWDxSnPfpAUODxI+@u7k&AjdE=h-0%z#n76Ofjt@Q^i)O$WhB>t zJ#UTB1mSCXaxq9SNU<|WGBWVN{RWofVUT8!VPxP+Pc3oIFU?6UEn;L4(a=OP!9Uc; zH8jYYi$RV-ft^8~kwE}q0z{67L6Jd;k%1HHqL6$>24M{!a3F(&-Zif@*Basm6&?mv z1~o<o_Vm<}pv1g%aHx24F=#Mou`_5gG6*7cdFGX*rl%J1Fo-f}GcvGhczSAjGBU6w zgQC}vkwE~-i69|R{D9?*7#V~hE=kNR&d-DUiqVsifj77$F*(~eu>cy%>d4N7q!4Q) zheJg`PG@8=0l7qsk%22XzqBYh)h!bgcl?MXrw4L6BLin}W_n&?Noi3kBZC#DSr8Gl zv}c3v7dvZ427cGP<edEC%)E5p)RK(+6m|w{Mh0Pc*dr_kB`;e>1{MuZQ2OHW%*#tH za?VLCE>10GWZ>{iEiUoMFD_wFU|?imW?*DsWndH#0HsX^1_ovZ1_n+BE(S&hZUzPh z69y&*CI$uuE-me?3_M!f8Td9bFfcGN2r@7*urV+)Ffgby2r)1)@POG|48jZ|3=9m6 z45AETP!sAHm>5_X7#QTVw=sz8Y-14L#vp4aJBxu|dmDqY&Nc?+9SrJgWY>Ug2AL`Z zR;|sz!=TF`z@X0{!(a@yK?^J{2epBLL5@L(K^JVR9D^Q%E&~$-4}%bcK7#=RGlL<- zb$=LS7zG>|L>Y{rZqa362K$d!OZxzWgw6p5iERwVAghr*#0a(y<Y`t0Q?O^v7|g-6 g1%o960|N_#6@v|f9Vk#37{Lx;U|?Xd2dl6G07a+zU;qFB literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/JeudeCarte.class b/Partie_3/target/classes/ch/hepia/JeudeCarte.class new file mode 100644 index 0000000000000000000000000000000000000000..7c84a24a016f03fff7d97c2fd8eab208948f7fbf GIT binary patch literal 3261 zcmX^0Z`VEs1_lR)Y3vM4j10ob8TuKi1(}KZUa6%ism_T-C8_KTEQ|~SS&3zd`Z<Yt z>H7XjS*gh-j11gasiiIuCB=*k0zP0Br6rj;`aYS(CDx1#oWYstd5I;ZMX8JoN@&tH zK5(1BmRQ?aGcvH*Waed-*fBD&Xn1OdF*2|?=clA{F)%am@-T2R@G&wlYiNeCGYBv; z2qP?WEGkN@1lh>Nz|X+T$-u}U%)`LSz{bTO${^0pAjZfbfUwFx)W<b6h=)OfL6VVy ztt>I8G_{zKK~zIC8p%BnMb_*L(u@pz2)&@N;9`(skOetLj*&r315=NuW*9ev0)rAe zgCZjXAHtC!_wg_&GpH~!Fej#@fUJZB2vUezYesQ0h%%`0FsL(VFfy<wCl(c@CYCZX z2w~d8&Y;D}APRRIBC=ErxfnDVbU;qjWn_>*aw0;FwPqL>gFb^H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3 zI-!<r3~dmT+!+~smotd#Ky!_h&nAXC?QIM_+Zft(b~1o7%QKLU3ELRjKn{mQrxZ95 z6fkfw6fwv%lrU&A6fqbvR4`aERDzuWO7fsg1t~z}8Mwfa$p}vJf}qG01?O}~Vi#s$ hW|#!_&18lt3=H7nSQAw2FfcGoWnf@nVPIs?1OQQ%ptb-2 literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/Joueur.class b/Partie_3/target/classes/ch/hepia/Joueur.class new file mode 100644 index 0000000000000000000000000000000000000000..5e4728e620596c8ce4d971e1d94e4d16b7f6bac8 GIT binary patch literal 663 zcmX^0Z`VEs1_lQPEp`SbMh5=m4E>DMg3LsHul&-~(js;S7Dfhvti-ZJ{hY+SbbbG% ztkmQZMh5QS)RN$mqQsKa^h!nsW)00SMg|VYloa3mywplY1{Mt$kO+5BYHog6DpZie zJ+%bNWY*AhVPs$nPAzdtEn#F})o}3ysb_PC3b1H+f)sGL6eX5BCl;kJGDvE8`XJnv zTAGsToLE$nY7NrH@19x$QWacMl$w`bk^wT%(^J!vk%7xSwZtz8Bv%Y_6j+QSI3vH@ zBQY-pA`-^PzzGv6hUoxF7lZxf$;iO%4)!b5Xf~Jp(xjYJMg}gA#9{~=YEl#<1BY{B zUT{H9Cdf}vn!_Wp7|LYx%quP}0%>(mErGC8Am+e1%o>_ej0~(nsl}jhk<h^DXRhG< z(xT*4w@i>zxFM0H2Z|>)1_nk3W(E)tV_{@qWng0f#UVQb2bkuB(p(JOU_K86FPP?I z;0MzJ41!=<h(Q=ki!g|SX)y+IFf9Q!Pm)0j%$J7B%Ru$XGRT3&<)O3!R9q3tSAyzS ZhT5;fpbA#6#-Ppsa=8Wr0|OI-CID4gf!hE8 literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/JoueurCroupier.class b/Partie_3/target/classes/ch/hepia/JoueurCroupier.class new file mode 100644 index 0000000000000000000000000000000000000000..1a117b2e6248aecff4b395b75018848c471b8526 GIT binary patch literal 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5Au%8?;X3!%-hXGTtKwUZ%%jlOQ3(2T!zo;4}p)P4nTdiUOBL z43O-?3@+6Qgi4k%2tcxk56c1uR+cr)h@1kcbYC+_GreJuWqJ>`2oh}aP>Z0&g)9Rj KLm4>LmjeLd_62qT literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/JoueurHumain.class b/Partie_3/target/classes/ch/hepia/JoueurHumain.class new file mode 100644 index 0000000000000000000000000000000000000000..733a8e929c37ad44af07e0311c79cabaeee685a9 GIT binary patch literal 4874 zcmX^0Z`VEs1_lR)jqD6ej0~d58TuKi1(}KZUiqb|r9~d4xrv#1><lc73<6n+Wr_MZ ziFxVz{z+M>$tCOzY>W*2Xc`z9SUnQ+Qi>TFM18;-N=q_x^c{<e5-WW&i%YB-890M8 z)AJHbN{dn%8Pu?;vGIYM2{Ovs&YF>d)i*ycwUUv6(S?zL(=)HQv?wtzIhB!t9n4Nm zVPs&8Vq{>m$;`_vv14SA)IgZwm0FsT>YP|ql4|X#8OF%K;+&t7%EiFUAi~2Sz#z)V zz^tJe#?Bzl$RLcx!CVYt3?iHij0{pd4D1XX><luD47@1r<6@9zkOLVd2vV!S!=T8Z z#K^#$n3BTCAgTfJAX2DVYes?8sqiqUGN>^!FsG-MfYf<vVyXn0tii*e$)Lr^z!scZ z;sjF4qT!+$26B)N4+A#?4~V75!@vt+8SpUhG4L}o@cU%urTUfTCZ!gIBqrsgGBODH z<R>TQge4Ybg7{EDmXeIjVnzmWq`*Rob!$cjX0OyzP)x!-j1-uR42+(P4BWw~CBY>{ zi6yD&mFx^wj0{rXKm>a@s5Gx6GdI<>B0067Br`vcgTaQ8K@O6n6asP*D^rUUG7^gw z^70j6M(A-dSTfjwLem};Do9}xTvC*omu?M;K@P{16mWXrU~pn&P<BqtQ!i0SOi5A5 zOHEHK$t+7%NX*SI%_~vJPg4M^)8k-pVPxP3vlaZyQj5}Z^2_xY8Q37|7#VnjOA?c_ zeG?0y0mB`Xnwwvi3f92E;K|6K0k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qt2%QVTRibRt$F;Y#Hu@-2;hXAE<j67<`~H49cV|3`|y_8e$?mn^Zxw ziGdc1Ju%xDCZPySLE^!33lq3lhq&W8gAl_j1_g$<4EhZ3!0v$L76Z6D4502{U@(B@ z7Dk3?4AY@ujXe?10C^W;4WzpI2sRqxMQn+97Tmy1&_tYq<nV0_eKR4IG&DAtA-Rxc zK7$>SGN>q$2n$5r0tRs;!EFphtP2=eS=KOvTnUL3F$Pu!28KTj>I{Dw{22Z*BryDE zNMd9{a&-zkKvJLq0*x4TD+We}*|3OV3}9df7ekjpHg01GW?KL);^%;ictp7ga+@DW z5vbw8vX>z{l36!+JHtF!^8@Ntn9MeYg&@UH(QOP%Ks*rM#t_Vs0xOEKiGmctwZ(v1 zGw347Nd}ZiK=L4rWHd+^k!g)UZ7fC(25v@922n;{231A@1{+3Uh9E{Uh6F}QhB8JO zhFOgA3~Lyb7<Mx%GhAX+0SBcPBxvA4c^Mj%3=Ef{X-k!19m8^l70}9wnSl}1B$@zE z9oUmwA1ES`k{hEs*f!kBZ6&<Sieg{|mlY~nEL$1$!I=r#?%T!?Bf_vMAJpX2+QOi_ zjbReV{}5Zid52Mlft698L7LHsL7CAQY$K#hQGxo8kzozi)`c#pzJwSA&K-<qNSYC? zi?s~x&`hQeEzm$s6Mb~QT4B|^jv*PUxs-twT+JAQTdpKDdJ*0Q=MF}D23AHV1_4G_ f21Q191_MS9u*Hx-HiUYafx!?Qk)Q$?;>!&H<9es+ literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/JoueurOrdinateur.class b/Partie_3/target/classes/ch/hepia/JoueurOrdinateur.class new file mode 100644 index 0000000000000000000000000000000000000000..b83e6a0bea0dd6f64078eaf509636401c3c5324e GIT binary patch literal 4837 zcmX^0Z`VEs1_lR)_3R8xj0}>=8TuKi1(}KZUiqb|rA7WlDVceRC8?!F><lc73<6n+ zWr_MZiFxVz{z+M>$tCOzY>W*2Xqp%qSUnQ+Qi>TFM18;-N=q_x^c{<e5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QJ_W)x(ITT0VNWUJP0Eh4H8CVS|d=? ziiwkfn~94-l!=c)l}V7nhDn4Wh)J9wfk}#?j7gSZ7Lx+Q8YX3i-ApPBmzY$+L8%1^ z8hB7%h6W`A!)0jNQe{}ju#{mLv~pr*U<9><`rxSpdvfamMI=&kW6}WIhC8_}hnHDV z46NX?LPd*ZD}z2bGeMhs+Zdum7*^ziT6$Vr7<9KWOaS>GVhcF$FzGU|G8r&PGZ`}| zGns&Ggp?^NQ2#M9tisy5&;`|(5QD(EgUK98Gop2|nxPe%$@HNG8mMWakM37%teV#_ zBtkWpGO&WH8AEV`m4vn~!n@$y!Q{Ze%H+%-z~siD$mGFbz~l+G7!t^aP%kqu7=j}b LQ~<99*OBW0Q$m}W literal 0 HcmV?d00001 diff --git a/Partie_3/target/classes/ch/hepia/Paquet.class b/Partie_3/target/classes/ch/hepia/Paquet.class new file mode 100644 index 0000000000000000000000000000000000000000..79dc7afd66ab47cc77bb82fcf6c5682425eccc23 GIT binary patch literal 900 zcmX^0Z`VEs1_lQPBX$NRMh5=m4E>DMg3LtyfW*Sm)Dm_E7Dfhvti-ZJ{hY+SbbbG% ztkmQZMh3P5urwosfDc%*v?Mb}-zT%U#F~+TGdMFnFR`SwD3y^x9ZlNC2X28^YH3QU zb7E0Rs<oXpBLkaFW?p8A9U}v)hNq`y7$XCVbAC!H7Xvc`FAoDJ10N#;vxa6EJA(it zgD}EM$D*RdN|3!=4EzkdoD7T%!aNMD3~cNSqKpi}SnT3r5MdAp87RTXz@p))83q!N z;$e^m*}z_$QJR*PlgiB?%OKCrAjinShp-A{3lD<=gCZjXb7D#gBZH_0#B)diW33s* z$iVNDnV0HUnwykb6q1;flgh{-<ddJAm=l&*lnLTP1zAcmGK(1*1Q8(u335;f<|W0$ z0+`X0k%1#GDLxq#Qj83YnT!lvS*fKikf38^5Jl)m3Q<M|-r$nN<ZR!>0;qMI>8T|U z3m6%MG&CVjM~*g43_;wH#TA@iT9lmXmI?A5H^f*yP*5=_GB7eQGcYhPGBAPSfq{{M zoq>UYiGhQGiGh)UlYxtYk%60mfng5=GXpCF1A~Rub_O1;-3<JZ+ZhD6G6*r-EoV^N z%^(sfvz<ZAibaxT8-t|Q76u_nmYobTObp>I%#5<q3;#dZ$iTqB%%H@;z@Wsy!N9=4 z#lXVA!@$qL#~{MM&mhMjz@W?^$e_=_$6(GN!l2B+z+eKgk3oe&l>r1S7}OZl85lus zV9;PtXJBFwWKd(!WKd^dW{_hLWYA*JW?*5^VPIeoU|{;sAi}`H&cMjX$jHDT%fQH> u%b>@=1ofLf*hl&dj9}APLC)O(_B6<OY+ylguoHN|Y*wff7#R$}stf@bS-D#P literal 0 HcmV?d00001 diff --git a/Partie_3/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/Partie_3/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..814b859 --- /dev/null +++ b/Partie_3/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,7 @@ +ch/hepia/Hand.class +ch/hepia/JeudeCarte.class +ch/hepia/Carte.class +ch/hepia/App.class +ch/hepia/COULEUR.class +ch/hepia/Hand$1.class +ch/hepia/Paquet.class diff --git a/Partie_3/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/Partie_3/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..8643c6b --- /dev/null +++ b/Partie_3/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,7 @@ +/home/padi/Git/java-card-game/Partie_2/src/main/java/ch/hepia/Hand.java +/home/padi/Git/java-card-game/Partie_2/src/main/java/ch/hepia/Carte.java +/home/padi/Git/java-card-game/Partie_2/src/main/java/ch/hepia/Joueur.java +/home/padi/Git/java-card-game/Partie_2/src/main/java/ch/hepia/GameManager.java +/home/padi/Git/java-card-game/Partie_2/src/main/java/ch/hepia/App.java +/home/padi/Git/java-card-game/Partie_2/src/main/java/ch/hepia/Paquet.java +/home/padi/Git/java-card-game/Partie_2/src/main/java/ch/hepia/JeudeCarte.java diff --git a/Partie_3/target/test-classes/ch/hepia/CarteTest.class b/Partie_3/target/test-classes/ch/hepia/CarteTest.class new file mode 100644 index 0000000000000000000000000000000000000000..655456ed1f9c7073c51fefd5a6f05ec8d78d542b GIT binary patch literal 1821 zcmX^0Z`VEs1_lR)P<93;Mh2ne4E>DMg3LsH=ft9t)R5HT5_Sd_Mh1bb#Ii*FoW#6z zegCAa)Z`LI1~!|_yv!0iMh0dL%`ip=7U%qwR4xW)22LIZRt7dk27aH+yi~u^+@#c^ zki?{%R7M6NpZw&+oUp{AOb{O`$WoG#S<J{F;)7|kH6sIGNosM4duoYuerZl>X%QoX zWKd~dNoH<pSY~l%QckL4US57lVo7FxUNIwsfKPr=x_(w^US^3t$mQ1T3_^?ye5eL< zGKesUu``G=G6*0f{6l?QLxXr2#2F+Q8Ca9^!Bz<&ISHb`nu|e@K?>wQX+{Py4NQ4Y z%`lJ>Ssn&C26;vXu5=`qi)d(KYT#l}WKd>jP-0{dK)BtpxHz?_goi<eL6wn#ClSnZ zEi6sUDQ09)*YH7)3TsReP=v51gJKXADhPjqM64MZxS^pMl$e(e3J)zF25pef*^?8C zic%9xSs5UJ9po8(9tHyjLq-Pn^wbiN25^LXf*fuPa-s<%1FMFY7sy5)sIhMOMaik` z4Cags{0O(Y78T_eaWGgiGDL*t6{QyE=ai+UC?x0S7G&mtBT%8BC_gDDHP=dki!&r6 zRUtV)uehYBG`S?dNCBJ}HJl-_preqPR{|z96*7wzO7l`u(=zi?Q@FSo%owaev17x? zAc`DL!6ikRdFj?5Hwr@C=$D@hO;a2U_KXay&Y(C4dDoGL!HL0{k%2cowFIGvkpUEa z2;V?WL?lqZ{9I7ra4@(rGB6r}4D#S%@B|qIN(4|@Mg|n?a|?1(OE?&O7#a9o5_3}( zQc^)41w{ZzzaI~SKS)2^Az<Z<48q7h0E@*NaWDiiGO&8(XQvi1GH?awm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