diff --git a/Partie_3_Terminal/save.csv b/Partie_3_Terminal/save.csv index f481abffdbc7df4d1718d6dcc2639b0a4f25b9de..abcb9e6187712bf432e72e32854249feb8a8c861 100644 --- a/Partie_3_Terminal/save.csv +++ b/Partie_3_Terminal/save.csv @@ -1,3 +1,3 @@ -Human,100.0,0 -Player_1,190.0,1 -Player_2,305.0,1 +Human,90.0,0,0 +Player_1,180.0,1,false +Player_2,2.0,1,true diff --git a/Partie_3_Terminal/src/main/java/ch/hepia/App.java b/Partie_3_Terminal/src/main/java/ch/hepia/App.java index b99e87fcaf53d954cec2092e1548f78da9934187..bb58e40db09e0a3a25df75258322879eebcd0317 100644 --- a/Partie_3_Terminal/src/main/java/ch/hepia/App.java +++ b/Partie_3_Terminal/src/main/java/ch/hepia/App.java @@ -65,7 +65,7 @@ public class App { // Load save to create game Save Game = new Save(); - BlackJack = new GameManager(Game.loadMoney(), Game.loadStrategy()); + BlackJack = new GameManager(Game.loadMoney(), Game.loadStrategy(), Game.loadGameOver()); } else { // Ask the number of players until a valide answer is given diff --git a/Partie_3_Terminal/src/main/java/ch/hepia/GameManager.java b/Partie_3_Terminal/src/main/java/ch/hepia/GameManager.java index 2cc3940f7e6485114af15f378c94242b079d1859..906a0f09dae72f6b781c4b3ebc8f255623bac09c 100644 --- a/Partie_3_Terminal/src/main/java/ch/hepia/GameManager.java +++ b/Partie_3_Terminal/src/main/java/ch/hepia/GameManager.java @@ -33,7 +33,7 @@ public class GameManager { this.Dealer = new JoueurCroupier(Deck); } - public GameManager(ArrayList<Double> Money, ArrayList<Integer> Strategy) { + public GameManager(ArrayList<Double> Money, ArrayList<Integer> Strategy, ArrayList<Boolean> GameOver) { // Create a new BlackJack Deck of card (6 x 52 cards game) this.Deck = new JeudeCarte(new Paquet(6, 52)); @@ -48,8 +48,11 @@ public class GameManager { // All other are controlled by the computer if (Money.size() > 1) { for (int x = 1; x < Money.size(); x++) { - ComputerPlayers++; - this.Players.add(new JoueurOrdinateur(Deck, Money.get(x), Strategy.get(x))); + if (!GameOver.get(x)) { + ComputerPlayers++; + this.Players.add(new JoueurOrdinateur(Deck, Money.get(x), Strategy.get(x))); + } + } } @@ -105,7 +108,9 @@ public class GameManager { // Set the Computer players bid for this turn for (int x = 1; x <= this.ComputerPlayers; x++) { - Players.get(x).SetBet(10, 0); + if (!Players.get(x).IsGameOver()) { + Players.get(x).SetBet(10, 0); + } } } @@ -181,23 +186,30 @@ public class GameManager { // Show Computer Players hands for (int x = 1; x <= this.ComputerPlayers; x++) { - for (int HandNbComputer = 0; HandNbComputer < this.Players.get(x).GetNbHands(); HandNbComputer++) { - System.out - .print("\nComputer " + App.ANSI_GREEN + x + App.ANSI_RESET + ", Money " + App.ANSI_BLUE - + this.Players.get(x).GetMoney() + App.ANSI_RESET + ", Hand " - + App.ANSI_GREEN + HandNbComputer + App.ANSI_RESET + ", Bet " + App.ANSI_BLUE - + this.Players.get(x).GetBet(HandNbComputer) + App.ANSI_RESET + ", Strength " - + App.ANSI_PURPLE); - if (this.Players.get(x).GetStrength(HandNbComputer) == 99) { - System.out.println("BlackJack" + App.ANSI_RESET + " :"); - } else if (this.Players.get(x).GetStrength(HandNbComputer) > 21) { - System.out.println( - this.Players.get(x).GetStrength(HandNbComputer) + App.ANSI_RED + " [BUSTED]" - + App.ANSI_RESET + " :"); - } else { - System.out.println(this.Players.get(x).GetStrength(HandNbComputer) + App.ANSI_RESET + " :"); + if (!Players.get(x).IsGameOver()) { + for (int HandNbComputer = 0; HandNbComputer < this.Players.get(x) + .GetNbHands(); HandNbComputer++) { + System.out + .print("\nComputer " + App.ANSI_GREEN + x + App.ANSI_RESET + ", Money " + + App.ANSI_BLUE + + this.Players.get(x).GetMoney() + App.ANSI_RESET + ", Hand " + + App.ANSI_GREEN + HandNbComputer + App.ANSI_RESET + ", Bet " + + App.ANSI_BLUE + + this.Players.get(x).GetBet(HandNbComputer) + App.ANSI_RESET + + ", Strength " + + App.ANSI_PURPLE); + if (this.Players.get(x).GetStrength(HandNbComputer) == 99) { + System.out.println("BlackJack" + App.ANSI_RESET + " :"); + } else if (this.Players.get(x).GetStrength(HandNbComputer) > 21) { + System.out.println( + this.Players.get(x).GetStrength(HandNbComputer) + App.ANSI_RED + " [BUSTED]" + + App.ANSI_RESET + " :"); + } else { + System.out.println( + this.Players.get(x).GetStrength(HandNbComputer) + App.ANSI_RESET + " :"); + } + this.Players.get(x).ShowHand(HandNbComputer); } - this.Players.get(x).ShowHand(HandNbComputer); } } @@ -323,210 +335,212 @@ public class GameManager { // Computer Players take turn to play for (int x = 1; x <= this.ComputerPlayers; x++) { - - // Check there strategy - /* - * 1 = Smart - * 2 = Stupid - */ - if (this.Players.get(x).GetStrategy() == 1) { - - char[][][] Choices_2Cards = { - { - { 'S', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R' }, - { 'R', 'T', 'T', 'T', 'T', 'T', 'T', 'S', 'R', 'R' }, - { 'R', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, - { 'R', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R', 'R' }, - }, - { - { 'S', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R' }, - { 'T', 'T', 'T', 'T', 'D', 'T', 'T', 'R', 'R', 'R' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, - { 'R', 'T', 'T', 'T', 'T', 'R', 'S', 'R', 'R', 'R' }, - { 'R', 'T', 'T', 'T', 'R', 'R', 'R', 'S', 'R', 'R' }, - { 'R', 'T', 'T', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, - { 'R', 'T', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - }, - { - { 'S', 'T', 'T', 'T', 'T', 'D', 'D', 'R', 'R', 'R' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'T', 'R' }, - { 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'T', 'R', 'R' }, - { 'T', 'T', 'T', 'D', 'D', 'D', 'T', 'R', 'R', 'R' }, - { 'D', 'T', 'D', 'D', 'D', 'S', 'R', 'R', 'R', 'R' }, - { 'D', 'D', 'D', 'D', 'T', 'R', 'S', 'R', 'R', 'R' }, - { 'R', 'D', 'D', 'T', 'R', 'R', 'R', 'S', 'R', 'R' }, - { 'R', 'D', 'T', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, - { 'R', 'T', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - }, - { - { 'S', 'T', 'T', 'D', 'D', 'D', 'D', 'R', 'R', 'R' }, - { 'T', 'S', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'R' }, - { 'T', 'T', 'S', 'T', 'T', 'D', 'D', 'D', 'R', 'R' }, - { 'D', 'T', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R' }, - { 'D', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R' }, - { 'D', 'T', 'D', 'D', 'D', 'S', 'R', 'R', 'R', 'R' }, - { 'D', 'D', 'D', 'D', 'R', 'R', 'S', 'R', 'R', 'R' }, - { 'R', 'D', 'D', 'R', 'R', 'R', 'R', 'S', 'R', 'R' }, - { 'R', 'D', 'R', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, - { 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - }, - { - { 'S', 'D', 'D', 'D', 'D', 'D', 'D', 'R', 'R', 'R' }, - { 'D', 'S', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'R' }, - { 'D', 'T', 'S', 'T', 'T', 'D', 'D', 'D', 'R', 'R' }, - { 'D', 'T', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R' }, - { 'D', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R' }, - { 'D', 'T', 'D', 'D', 'D', 'S', 'R', 'R', 'R', 'R' }, - { 'D', 'D', 'D', 'D', 'R', 'R', 'S', 'R', 'R', 'R' }, - { 'R', 'D', 'D', 'R', 'R', 'R', 'R', 'S', 'R', 'R' }, - { 'R', 'D', 'R', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, - { 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - }, - { - { 'S', 'D', 'D', 'D', 'D', 'D', 'D', 'R', 'R', 'R' }, - { 'D', 'S', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'R' }, - { 'D', 'T', 'S', 'T', 'T', 'D', 'D', 'D', 'R', 'R' }, - { 'D', 'T', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R' }, - { 'D', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R' }, - { 'D', 'T', 'D', 'D', 'D', 'S', 'R', 'R', 'R', 'R' }, - { 'D', 'D', 'D', 'D', 'R', 'R', 'S', 'R', 'R', 'R' }, - { 'R', 'D', 'D', 'R', 'R', 'R', 'R', 'S', 'R', 'R' }, - { 'R', 'D', 'R', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, - { 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - }, - { - { 'S', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, - { 'T', 'S', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T' }, - { 'T', 'T', 'S', 'T', 'T', 'T', 'D', 'D', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T' }, - { 'R', 'T', 'D', 'D', 'T', 'T', 'S', 'T', 'T', 'R' }, - { 'R', 'D', 'D', 'T', 'T', 'T', 'T', 'S', 'R', 'R' }, - { 'R', 'D', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R' }, - { 'R', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, - }, - { - { 'S', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T' }, - { 'R', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T', 'R' }, - { 'R', 'D', 'D', 'T', 'T', 'T', 'T', 'S', 'R', 'R' }, - { 'R', 'D', 'T', 'T', 'T', 'T', 'T', 'R', 'S', 'R' }, - { 'R', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, - }, - { - { 'S', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'R' }, - { 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'R', 'R' }, - { 'R', 'D', 'D', 'T', 'T', 'T', 'T', 'S', 'R', 'R' }, - { 'R', 'D', 'T', 'T', 'T', 'T', 'R', 'R', 'S', 'R' }, - { 'R', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R', 'R' }, - }, - { - { 'S', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'T', 'T', 'T' }, - { 'T', 'T', 'T', 'T', 'T', 'D', 'T', 'T', 'T', 'R' }, - { 'T', 'T', 'T', 'T', 'D', 'T', 'T', 'T', 'R', 'R' }, - { 'T', 'T', 'T', 'D', 'T', 'T', 'T', 'R', 'R', 'R' }, - { 'R', 'T', 'D', 'T', 'T', 'T', 'R', 'S', 'R', 'R' }, - { 'R', 'D', 'T', 'T', 'T', 'R', 'R', 'R', 'R', 'R' }, - { 'R', 'T', 'T', 'T', 'R', 'R', 'R', 'R', 'R', 'R' }, - } - }; - - char[][] Choices_MoreThan2Cards = { - { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R' }, - { 'T', 'T', 'D', 'D', 'T', 'R', 'R', 'R', 'R', 'R' }, - { 'T', 'D', 'D', 'D', 'T', 'R', 'R', 'R', 'R', 'R' }, - { 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R', 'R', 'R' }, - { 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R', 'R', 'R' }, - { 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R', 'R', 'R' }, - { 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T', 'R' }, - { 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T', 'R' }, - { 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'R', 'R' }, - { 'T', 'T', 'T', 'D', 'T', 'T', 'T', 'R', 'R', 'R' } - }; - - char Choice = 'R'; - - // Go thew all the hands of the computer player - for (int HandNb = 0; HandNb < this.Players.get(x).GetNbHands(); HandNb++) { - - if (this.Players.get(x).GetNbCards(HandNb) == 2) { - Choice = Choices_2Cards[this.Dealer.GetCardStrength(0, 0) - 1][this.Players.get(x) - .GetCardStrength(HandNb, 0) - 1][this.Players.get(x).GetCardStrength(HandNb, 1) - 1]; - } else { - if (this.Players.get(x).GetStrength(HandNb) <= 8) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][0]; - } else if (this.Players.get(x).GetStrength(HandNb) == 9) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][1]; - } else if (this.Players.get(x).GetStrength(HandNb) == 10) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][2]; - } else if (this.Players.get(x).GetStrength(HandNb) == 11) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][3]; - } else if (this.Players.get(x).GetStrength(HandNb) == 12) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][4]; - } else if (this.Players.get(x).GetStrength(HandNb) == 13) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][5]; - } else if (this.Players.get(x).GetStrength(HandNb) == 14) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][6]; - } else if (this.Players.get(x).GetStrength(HandNb) == 15) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][7]; - } else if (this.Players.get(x).GetStrength(HandNb) == 16) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][8]; - } else if (this.Players.get(x).GetStrength(HandNb) >= 17) { - Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][9]; + if (!Players.get(x).IsGameOver()) { + // Check there strategy + /* + * 1 = Smart + * 2 = Stupid + */ + if (this.Players.get(x).GetStrategy() == 1) { + + char[][][] Choices_2Cards = { + { + { 'S', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R' }, + { 'R', 'T', 'T', 'T', 'T', 'T', 'T', 'S', 'R', 'R' }, + { 'R', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, + { 'R', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R', 'R' }, + }, + { + { 'S', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R' }, + { 'T', 'T', 'T', 'T', 'D', 'T', 'T', 'R', 'R', 'R' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, + { 'R', 'T', 'T', 'T', 'T', 'R', 'S', 'R', 'R', 'R' }, + { 'R', 'T', 'T', 'T', 'R', 'R', 'R', 'S', 'R', 'R' }, + { 'R', 'T', 'T', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, + { 'R', 'T', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + }, + { + { 'S', 'T', 'T', 'T', 'T', 'D', 'D', 'R', 'R', 'R' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'T', 'R' }, + { 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'T', 'R', 'R' }, + { 'T', 'T', 'T', 'D', 'D', 'D', 'T', 'R', 'R', 'R' }, + { 'D', 'T', 'D', 'D', 'D', 'S', 'R', 'R', 'R', 'R' }, + { 'D', 'D', 'D', 'D', 'T', 'R', 'S', 'R', 'R', 'R' }, + { 'R', 'D', 'D', 'T', 'R', 'R', 'R', 'S', 'R', 'R' }, + { 'R', 'D', 'T', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, + { 'R', 'T', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + }, + { + { 'S', 'T', 'T', 'D', 'D', 'D', 'D', 'R', 'R', 'R' }, + { 'T', 'S', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'R' }, + { 'T', 'T', 'S', 'T', 'T', 'D', 'D', 'D', 'R', 'R' }, + { 'D', 'T', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R' }, + { 'D', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R' }, + { 'D', 'T', 'D', 'D', 'D', 'S', 'R', 'R', 'R', 'R' }, + { 'D', 'D', 'D', 'D', 'R', 'R', 'S', 'R', 'R', 'R' }, + { 'R', 'D', 'D', 'R', 'R', 'R', 'R', 'S', 'R', 'R' }, + { 'R', 'D', 'R', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, + { 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + }, + { + { 'S', 'D', 'D', 'D', 'D', 'D', 'D', 'R', 'R', 'R' }, + { 'D', 'S', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'R' }, + { 'D', 'T', 'S', 'T', 'T', 'D', 'D', 'D', 'R', 'R' }, + { 'D', 'T', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R' }, + { 'D', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R' }, + { 'D', 'T', 'D', 'D', 'D', 'S', 'R', 'R', 'R', 'R' }, + { 'D', 'D', 'D', 'D', 'R', 'R', 'S', 'R', 'R', 'R' }, + { 'R', 'D', 'D', 'R', 'R', 'R', 'R', 'S', 'R', 'R' }, + { 'R', 'D', 'R', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, + { 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + }, + { + { 'S', 'D', 'D', 'D', 'D', 'D', 'D', 'R', 'R', 'R' }, + { 'D', 'S', 'T', 'T', 'T', 'T', 'D', 'D', 'D', 'R' }, + { 'D', 'T', 'S', 'T', 'T', 'D', 'D', 'D', 'R', 'R' }, + { 'D', 'T', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R' }, + { 'D', 'T', 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R' }, + { 'D', 'T', 'D', 'D', 'D', 'S', 'R', 'R', 'R', 'R' }, + { 'D', 'D', 'D', 'D', 'R', 'R', 'S', 'R', 'R', 'R' }, + { 'R', 'D', 'D', 'R', 'R', 'R', 'R', 'S', 'R', 'R' }, + { 'R', 'D', 'R', 'R', 'R', 'R', 'R', 'R', 'S', 'R' }, + { 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + }, + { + { 'S', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, + { 'T', 'S', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T' }, + { 'T', 'T', 'S', 'T', 'T', 'T', 'D', 'D', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T' }, + { 'R', 'T', 'D', 'D', 'T', 'T', 'S', 'T', 'T', 'R' }, + { 'R', 'D', 'D', 'T', 'T', 'T', 'T', 'S', 'R', 'R' }, + { 'R', 'D', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R' }, + { 'R', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, + }, + { + { 'S', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T' }, + { 'R', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T', 'R' }, + { 'R', 'D', 'D', 'T', 'T', 'T', 'T', 'S', 'R', 'R' }, + { 'R', 'D', 'T', 'T', 'T', 'T', 'T', 'R', 'S', 'R' }, + { 'R', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R' }, + }, + { + { 'S', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'R' }, + { 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'R', 'R' }, + { 'R', 'D', 'D', 'T', 'T', 'T', 'T', 'S', 'R', 'R' }, + { 'R', 'D', 'T', 'T', 'T', 'T', 'R', 'R', 'S', 'R' }, + { 'R', 'T', 'T', 'T', 'T', 'R', 'R', 'R', 'R', 'R' }, + }, + { + { 'S', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R', 'R' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'T', 'D', 'T', 'T', 'T' }, + { 'T', 'T', 'T', 'T', 'T', 'D', 'T', 'T', 'T', 'R' }, + { 'T', 'T', 'T', 'T', 'D', 'T', 'T', 'T', 'R', 'R' }, + { 'T', 'T', 'T', 'D', 'T', 'T', 'T', 'R', 'R', 'R' }, + { 'R', 'T', 'D', 'T', 'T', 'T', 'R', 'S', 'R', 'R' }, + { 'R', 'D', 'T', 'T', 'T', 'R', 'R', 'R', 'R', 'R' }, + { 'R', 'T', 'T', 'T', 'R', 'R', 'R', 'R', 'R', 'R' }, + } + }; + + char[][] Choices_MoreThan2Cards = { + { 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'R', 'R' }, + { 'T', 'T', 'D', 'D', 'T', 'R', 'R', 'R', 'R', 'R' }, + { 'T', 'D', 'D', 'D', 'T', 'R', 'R', 'R', 'R', 'R' }, + { 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R', 'R', 'R' }, + { 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R', 'R', 'R' }, + { 'T', 'D', 'D', 'D', 'R', 'R', 'R', 'R', 'R', 'R' }, + { 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T', 'R' }, + { 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'T', 'R' }, + { 'T', 'T', 'D', 'D', 'T', 'T', 'T', 'T', 'R', 'R' }, + { 'T', 'T', 'T', 'D', 'T', 'T', 'T', 'R', 'R', 'R' } + }; + + char Choice = 'R'; + + // Go thew all the hands of the computer player + for (int HandNb = 0; HandNb < this.Players.get(x).GetNbHands(); HandNb++) { + + if (this.Players.get(x).GetNbCards(HandNb) == 2) { + Choice = Choices_2Cards[this.Dealer.GetCardStrength(0, 0) - 1][this.Players.get(x) + .GetCardStrength(HandNb, 0) - 1][this.Players.get(x).GetCardStrength(HandNb, 1) + - 1]; + } else { + if (this.Players.get(x).GetStrength(HandNb) <= 8) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][0]; + } else if (this.Players.get(x).GetStrength(HandNb) == 9) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][1]; + } else if (this.Players.get(x).GetStrength(HandNb) == 10) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][2]; + } else if (this.Players.get(x).GetStrength(HandNb) == 11) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][3]; + } else if (this.Players.get(x).GetStrength(HandNb) == 12) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][4]; + } else if (this.Players.get(x).GetStrength(HandNb) == 13) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][5]; + } else if (this.Players.get(x).GetStrength(HandNb) == 14) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][6]; + } else if (this.Players.get(x).GetStrength(HandNb) == 15) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][7]; + } else if (this.Players.get(x).GetStrength(HandNb) == 16) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][8]; + } else if (this.Players.get(x).GetStrength(HandNb) >= 17) { + Choice = Choices_MoreThan2Cards[this.Dealer.GetCardStrength(0, 0) - 1][9]; + } } - } - if (Choice == 'T') { - // Draw + if (Choice == 'T') { + // Draw - this.Players.get(x).DrawCard(HandNb, this.Deck); - // Go back 1 hand to stay on the same hand in the for loop - HandNb--; + this.Players.get(x).DrawCard(HandNb, this.Deck); + // Go back 1 hand to stay on the same hand in the for loop + HandNb--; - } else if (Choice == 'R') { - // Stay + } else if (Choice == 'R') { + // Stay - } else if (Choice == 'D') { - // Double + } else if (Choice == 'D') { + // Double - this.Players.get(x).Double(HandNb, this.Deck); - // Go back 1 hand to stay on the same hand in the for loop - HandNb--; - } else if (Choice == 'S') { - // Split + this.Players.get(x).Double(HandNb, this.Deck); + // Go back 1 hand to stay on the same hand in the for loop + HandNb--; + } else if (Choice == 'S') { + // Split - this.Players.get(x).Split(HandNb, this.Deck); - // Go back 1 hand to stay on the same hand in the for loop - HandNb--; + this.Players.get(x).Split(HandNb, this.Deck); + // Go back 1 hand to stay on the same hand in the for loop + HandNb--; + } } - } - } else if (this.Players.get(x).GetStrategy() == 2) { - while (this.Players.get(x).GetStrength(0) <= 15) { - this.Players.get(x).DrawCard(0, this.Deck); + } else if (this.Players.get(x).GetStrategy() == 2) { + while (this.Players.get(x).GetStrength(0) <= 15) { + this.Players.get(x).DrawCard(0, this.Deck); + } } } } @@ -569,56 +583,60 @@ public class GameManager { // Apply Computer Players Loss/Win for (int x = 1; x <= this.ComputerPlayers; x++) { - for (int HandNbComputer = 0; HandNbComputer < this.Players.get(x).GetNbHands(); HandNbComputer++) { - // If the player is Busted (strength > 21 but not BlackJack (99)) - if (this.Players.get(x).GetStrength(HandNbComputer) > 21 - && this.Players.get(x).GetStrength(HandNbComputer) != 99) { - } - // If it's a Draw - else if (this.Dealer.GetStrength(0) == this.Players.get(x).GetStrength(HandNbComputer)) { - // Player get's back his bet - this.Players.get(x).AddMoney(this.Players.get(x).GetBet(HandNbComputer)); - } - // If the player has done a BlackJack - else if (this.Players.get(x).GetStrength(HandNbComputer) == 99) { - // Player gets payed 1.5 to 1 - this.Players.get(x).AddMoney(this.Players.get(x).GetBet(HandNbComputer) * 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 - this.Players.get(x).AddMoney(this.Players.get(x).GetBet(HandNbComputer) * 2); - } - // If the Dealer has a better score - else if (this.Players.get(x).GetStrength(HandNbComputer) < this.Dealer.GetStrength(0)) { - } - // If the Player has a better score - else if (this.Players.get(x).GetStrength(HandNbComputer) > this.Dealer.GetStrength(0)) { - // Player wins and get payed 1 to 1 - this.Players.get(x).AddMoney(this.Players.get(x).GetBet(HandNbComputer) * 2); + if (!Players.get(x).IsGameOver()) { + for (int HandNbComputer = 0; HandNbComputer < this.Players.get(x).GetNbHands(); HandNbComputer++) { + // If the player is Busted (strength > 21 but not BlackJack (99)) + if (this.Players.get(x).GetStrength(HandNbComputer) > 21 + && this.Players.get(x).GetStrength(HandNbComputer) != 99) { + } + // If it's a Draw + else if (this.Dealer.GetStrength(0) == this.Players.get(x).GetStrength(HandNbComputer)) { + // Player get's back his bet + this.Players.get(x).AddMoney(this.Players.get(x).GetBet(HandNbComputer)); + } + // If the player has done a BlackJack + else if (this.Players.get(x).GetStrength(HandNbComputer) == 99) { + // Player gets payed 1.5 to 1 + this.Players.get(x).AddMoney(this.Players.get(x).GetBet(HandNbComputer) * 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 + this.Players.get(x).AddMoney(this.Players.get(x).GetBet(HandNbComputer) * 2); + } + // If the Dealer has a better score + else if (this.Players.get(x).GetStrength(HandNbComputer) < this.Dealer.GetStrength(0)) { + } + // If the Player has a better score + else if (this.Players.get(x).GetStrength(HandNbComputer) > this.Dealer.GetStrength(0)) { + // Player wins and get payed 1 to 1 + this.Players.get(x).AddMoney(this.Players.get(x).GetBet(HandNbComputer) * 2); + } } } } // Show Computer Players hands for (int x = 1; x <= this.ComputerPlayers; x++) { - for (int HandNbComputer = 0; HandNbComputer < this.Players.get(x).GetNbHands(); HandNbComputer++) { - System.out - .print("\nComputer " + App.ANSI_GREEN + x + App.ANSI_RESET + ", Money " + App.ANSI_BLUE - + this.Players.get(x).GetMoney() + App.ANSI_RESET + ", Hand " - + App.ANSI_GREEN + HandNbComputer + App.ANSI_RESET + ", Bet " + App.ANSI_BLUE - + this.Players.get(x).GetBet(HandNbComputer) + App.ANSI_RESET + ", Strength " - + App.ANSI_PURPLE); - if (this.Players.get(x).GetStrength(HandNbComputer) == 99) { - System.out.println("BlackJack" + App.ANSI_RESET + " :"); - } else if (this.Players.get(x).GetStrength(HandNbComputer) > 21) { - System.out.println( - this.Players.get(x).GetStrength(HandNbComputer) + App.ANSI_RED + " [BUSTED]" - + App.ANSI_RESET + " :"); - } else { - System.out.println(this.Players.get(x).GetStrength(HandNbComputer) + App.ANSI_RESET + " :"); + if (!Players.get(x).IsGameOver()) { + for (int HandNbComputer = 0; HandNbComputer < this.Players.get(x).GetNbHands(); HandNbComputer++) { + System.out + .print("\nComputer " + App.ANSI_GREEN + x + App.ANSI_RESET + ", Money " + App.ANSI_BLUE + + this.Players.get(x).GetMoney() + App.ANSI_RESET + ", Hand " + + App.ANSI_GREEN + HandNbComputer + App.ANSI_RESET + ", Bet " + App.ANSI_BLUE + + this.Players.get(x).GetBet(HandNbComputer) + App.ANSI_RESET + ", Strength " + + App.ANSI_PURPLE); + if (this.Players.get(x).GetStrength(HandNbComputer) == 99) { + System.out.println("BlackJack" + App.ANSI_RESET + " :"); + } else if (this.Players.get(x).GetStrength(HandNbComputer) > 21) { + System.out.println( + this.Players.get(x).GetStrength(HandNbComputer) + App.ANSI_RED + " [BUSTED]" + + App.ANSI_RESET + " :"); + } else { + System.out.println(this.Players.get(x).GetStrength(HandNbComputer) + App.ANSI_RESET + " :"); + } + this.Players.get(x).ShowHand(HandNbComputer); } - this.Players.get(x).ShowHand(HandNbComputer); } } @@ -726,7 +744,7 @@ public class GameManager { if (choice == 'c') { // If the player has less than the minimum bid amount allowed - if (this.Players.get(0).GetMoney() <= 10) { + if (this.Players.get(0).GetMoney() < 10) { return true; } diff --git a/Partie_3_Terminal/src/main/java/ch/hepia/Joueur.java b/Partie_3_Terminal/src/main/java/ch/hepia/Joueur.java index e69d341308e200397ff706a20aab3267e9d0019c..6d4b712dbb09111ec219239ace551883d9c525b6 100644 --- a/Partie_3_Terminal/src/main/java/ch/hepia/Joueur.java +++ b/Partie_3_Terminal/src/main/java/ch/hepia/Joueur.java @@ -67,6 +67,12 @@ interface Joueur { // Has the player insured himself public boolean HasInsured(); + // Set the player game status + public void SetGameOver(boolean state); + + // Is the player game status + public boolean IsGameOver(); + // Reset player for next turn public void Reset(JeudeCarte Jeu); } @@ -314,6 +320,16 @@ class JoueurHumain implements Joueur { return this.Insured; } + public void SetGameOver(boolean state) { + // Human Player doesn't GameOver like That + throw new RuntimeException("Human Player doesn't GameOver like That."); + } + + public boolean IsGameOver() { + // Human Player can't be in state GameOver + throw new RuntimeException("Human Player can't be in state GameOver."); + } + public void Reset(JeudeCarte Jeu) { this.Insured = false; @@ -335,6 +351,7 @@ class JoueurOrdinateur implements Joueur { private double Money; private double Insurance; private boolean Insured; + private boolean GameOver; /* * 1 = Smart @@ -354,6 +371,24 @@ class JoueurOrdinateur implements Joueur { this.Money = Money; this.Insurance = 0; this.Insured = false; + this.GameOver = false; + + this.Strategy = Strategy; + } + + public JoueurOrdinateur(JeudeCarte Jeu, double Money, int Strategy, boolean GameOver) { + + 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; + this.GameOver = GameOver; this.Strategy = Strategy; } @@ -578,17 +613,31 @@ class JoueurOrdinateur implements Joueur { return this.Insured; } + public void SetGameOver(boolean state) { + this.GameOver = state; + } + + public boolean IsGameOver() { + return this.GameOver; + } + public void Reset(JeudeCarte Jeu) { - this.Insured = false; + if (!this.IsGameOver() && this.GetMoney() >= 10) { - // Reset hands - this.Hands = new ArrayList<>(); + this.Insured = false; - // Draw 2 card from Deck - this.Hands.add(new Hand(Jeu, 2)); + // Reset hands + this.Hands = new ArrayList<>(); + + // Draw 2 card from Deck + this.Hands.add(new Hand(Jeu, 2)); + + this.Hands.get(0).SetBet(0); + } else { + this.SetGameOver(true); + } - this.Hands.get(0).SetBet(0); } } @@ -739,6 +788,16 @@ class JoueurCroupier implements Joueur { } + public void SetGameOver(boolean state) { + // Dealer can't GameOver + throw new RuntimeException("Dealer can't GameOver."); + } + + public boolean IsGameOver() { + // Dealer can't GameOver + throw new RuntimeException("Dealer can't GameOver."); + } + public void Reset(JeudeCarte Jeu) { // Create a new hand with 1 card diff --git a/Partie_3_Terminal/src/main/java/ch/hepia/Save.java b/Partie_3_Terminal/src/main/java/ch/hepia/Save.java index d66eaa2917f5d6490e862edd6cc920a6ecb9043b..084c583d067b1eaa68dddf41649ed3f7991c3351 100644 --- a/Partie_3_Terminal/src/main/java/ch/hepia/Save.java +++ b/Partie_3_Terminal/src/main/java/ch/hepia/Save.java @@ -28,7 +28,7 @@ public class Save { CSVWriter.DEFAULT_ESCAPE_CHARACTER, CSVWriter.DEFAULT_LINE_END); - String[] data = { "Human", Double.toString(Players.get(0).GetMoney()), "0" }; + String[] data = { "Human", Double.toString(Players.get(0).GetMoney()), "0", "false" }; writer.writeNext(data); @@ -37,6 +37,7 @@ public class Save { data[0] = "Player_" + x; data[1] = Double.toString(Players.get(x).GetMoney()); data[2] = Integer.toString(Players.get(x).GetStrategy()); + data[3] = Boolean.toString(Players.get(x).IsGameOver()); writer.writeNext(data); } @@ -97,4 +98,28 @@ public class Save { return Strategy; } + + public ArrayList<Boolean> loadGameOver() { + + File file = new File("save.csv"); + + ArrayList<Boolean> Strategy = new ArrayList<>(); + + try { + + List<String> lines = Files.readAllLines(file.toPath(), StandardCharsets.UTF_8); + + for (String string : lines) { + + String[] array = string.split(","); + + Strategy.add(Boolean.valueOf(array[3])); + } + + } catch (IOException e) { + e.printStackTrace(); + } + + return Strategy; + } } diff --git a/Partie_3_Terminal/target/classes/ch/hepia/App.class b/Partie_3_Terminal/target/classes/ch/hepia/App.class index 6f9ea08bede892bdaffb0daee17453c3e7b99324..5d6fb6e95fd5a516610eaf2f431f22de73384865 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/App.class and b/Partie_3_Terminal/target/classes/ch/hepia/App.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/COULEUR.class b/Partie_3_Terminal/target/classes/ch/hepia/COULEUR.class index c582fd28bd308c74abcc31d7c543625ab96af75b..c38a76f38b5f56aec3100849ad749e77c1255bcd 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/COULEUR.class and b/Partie_3_Terminal/target/classes/ch/hepia/COULEUR.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/Carte.class b/Partie_3_Terminal/target/classes/ch/hepia/Carte.class index f2e1b3556ab535a9579d8c800c12eb799aff3d01..bb77e1a2cf2b2c55d68d07f73a271f6ad870f1c6 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/Carte.class and b/Partie_3_Terminal/target/classes/ch/hepia/Carte.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/GameManager.class b/Partie_3_Terminal/target/classes/ch/hepia/GameManager.class index e282ad70f389211acf3598dce6c56617b197d996..ac24e886c079f40286ef1739cac91ca262db1410 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/GameManager.class and b/Partie_3_Terminal/target/classes/ch/hepia/GameManager.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/Hand$1.class b/Partie_3_Terminal/target/classes/ch/hepia/Hand$1.class index 2214bf48295c2e99569934bb083314370d6c1499..e2750c39ec1ee0ffda4f715b78a572443a2da898 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/Hand$1.class and b/Partie_3_Terminal/target/classes/ch/hepia/Hand$1.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/Hand.class b/Partie_3_Terminal/target/classes/ch/hepia/Hand.class index 6e99640898ba7d7dacac297d9754b15afd0dc13e..a5d795896fe3549efa725a1873962850a6211e6f 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/Hand.class and b/Partie_3_Terminal/target/classes/ch/hepia/Hand.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/JeudeCarte$1.class b/Partie_3_Terminal/target/classes/ch/hepia/JeudeCarte$1.class index 2735eb7c27de1aa52aa4584d2c1ef9d746a2b524..e87f2ad85071fb1b622c4a955974eae6caf97a63 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/JeudeCarte$1.class and b/Partie_3_Terminal/target/classes/ch/hepia/JeudeCarte$1.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/JeudeCarte.class b/Partie_3_Terminal/target/classes/ch/hepia/JeudeCarte.class index ef19fe3892611f8ced9c139e6ced49f24319685c..7c84a24a016f03fff7d97c2fd8eab208948f7fbf 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/JeudeCarte.class and b/Partie_3_Terminal/target/classes/ch/hepia/JeudeCarte.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/Joueur.class b/Partie_3_Terminal/target/classes/ch/hepia/Joueur.class index cec581d3b0582175934534582a999fa29a5d8288..bc4ada492603b64d2400c04c8fecad81e607a372 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/Joueur.class and b/Partie_3_Terminal/target/classes/ch/hepia/Joueur.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/JoueurCroupier.class b/Partie_3_Terminal/target/classes/ch/hepia/JoueurCroupier.class index a6d7be41a8badd1a6b17940cba326b7982c5ed9e..d493f855e4e2e79c4c77a889ffc93ab217636f1f 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/JoueurCroupier.class and b/Partie_3_Terminal/target/classes/ch/hepia/JoueurCroupier.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/JoueurHumain.class b/Partie_3_Terminal/target/classes/ch/hepia/JoueurHumain.class index 80c3c5720b4dac59c98a4620e9f627ec9d95b149..d1175e83cd83984c021ae8969a93b421195e2ab7 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/JoueurHumain.class and b/Partie_3_Terminal/target/classes/ch/hepia/JoueurHumain.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/JoueurOrdinateur.class b/Partie_3_Terminal/target/classes/ch/hepia/JoueurOrdinateur.class index 7d9b26c3479ba17255924e3dfe272b223229de85..6c354443c4e3936eae553f6e39df41a645166298 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/JoueurOrdinateur.class and b/Partie_3_Terminal/target/classes/ch/hepia/JoueurOrdinateur.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/Paquet.class b/Partie_3_Terminal/target/classes/ch/hepia/Paquet.class index 287773450d9a2e8fcd9120c796067e1f9f2a10cf..79dc7afd66ab47cc77bb82fcf6c5682425eccc23 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/Paquet.class and b/Partie_3_Terminal/target/classes/ch/hepia/Paquet.class differ diff --git a/Partie_3_Terminal/target/classes/ch/hepia/Save.class b/Partie_3_Terminal/target/classes/ch/hepia/Save.class index 4d96235bc2aa0a217a3dee9df8ff67b16df6f5b7..39aa445e9a2eb5d5b6624a59c5c69096c77c1227 100644 Binary files a/Partie_3_Terminal/target/classes/ch/hepia/Save.class and b/Partie_3_Terminal/target/classes/ch/hepia/Save.class differ