Kaynağa Gözat

removed quit

Jonathan Hinds 6 yıl önce
ebeveyn
işleme
1ac18e24c2

+ 0
- 1
src/main/java/io/zipcoder/casino/Game.java Dosyayı Görüntüle

@@ -1,7 +1,6 @@
1 1
 package io.zipcoder.casino;
2 2
 
3 3
 public interface Game {
4
-     void quit();
5 4
      void startGame();
6 5
      void startRound();
7 6
 }

+ 0
- 30
src/main/java/io/zipcoder/casino/Printer.java Dosyayı Görüntüle

@@ -20,22 +20,6 @@ public class Printer {
20 20
         printMessage("Sorry, there is no game with that name, try one of: " + games);
21 21
     }
22 22
 
23
-    public static void getBet(String phrase){
24
-        printMessage("What is the " + phrase + " at the table you're looking for?");
25
-    }
26
-
27
-    public static void unacceptableMaxBet(int minBet){
28
-        printMessage("Your bet must be above " + minBet);
29
-    }
30
-
31
-    public static void unacceptableMinBet(){
32
-        printMessage("Your bet must be above $0");
33
-    }
34
-
35
-    public static void studHandsDealt(){
36
-        printMessage("Each player Dealt 3 cards");
37
-    }
38
-
39 23
     public static void showCard(Player player, Card card){
40 24
         printMessage(player.getName() + " shows a " + card.getName());
41 25
     }
@@ -55,10 +39,6 @@ public class Printer {
55 39
     public static void welcomeTo(String gameName){
56 40
         printMessage("Welcome to " + gameName + "!");
57 41
     }
58
-    
59
-    public static void wrongCommand(){
60
-        printMessage("Sorry, there is no game with that name.");
61
-    }
62 42
 
63 43
     public static void printWarTurnResult(String name, String cardName, int handSize){
64 44
         printMessage(name + " has played " + cardName + " and has " + handSize + " cards left.");
@@ -67,14 +47,4 @@ public class Printer {
67 47
     public static void playedFaceDown(String name){
68 48
         printMessage(name + " has played a card face down.");
69 49
     }
70
-
71
-    public static void startSlots(){
72
-        printMessage("You are all set to play a new slot game..zrrr..! \n");
73
-    }
74
-
75
-    public static void payOut(int payout){
76
-        printMessage("Your payout amount for slot machine is: $" + payout + "\n");
77
-    }
78
-
79
-
80 50
 }

+ 2
- 2
src/main/java/io/zipcoder/casino/SlotMachine.java Dosyayı Görüntüle

@@ -21,7 +21,7 @@ public class SlotMachine implements Game, Gamble {
21 21
 
22 22
     @Override
23 23
     public void payout(){
24
-        Printer.payOut(payout);
24
+        Printer.printMessage("Your payout amount for slot machine is: $" + payout + "\n");
25 25
     }
26 26
 
27 27
     @Override
@@ -31,7 +31,7 @@ public class SlotMachine implements Game, Gamble {
31 31
 
32 32
     @Override
33 33
     public void startGame() {
34
-        Printer.startSlots();
34
+        Printer.printMessage("You are all set to play a new slot game..zrrr..! \n");
35 35
         try {
36 36
             Thread.sleep(3000);
37 37
         } catch (InterruptedException e) {

+ 1
- 4
src/main/java/io/zipcoder/casino/War.java Dosyayı Görüntüle

@@ -114,8 +114,6 @@ public class War extends CardGame implements Gamble, Game {
114 114
         }
115 115
     }
116 116
 
117
-    public void quit() { }
118
-
119 117
     public void startGame() {
120 118
         Printer.welcomeTo("War");
121 119
         super.chooseStatingPlayer();
@@ -157,6 +155,5 @@ public class War extends CardGame implements Gamble, Game {
157 155
             }
158 156
         }
159 157
         Printer.printMessage(super.getPlayersTurn().getPlayer().getName() + "has: " + super.getPlayersTurn().getHand().size() + " cards.");
160
-
161 158
     }
162
-}
159
+}