Jonathan Hinds 6 年 前
コミット
1ac18e24c2

+ 0
- 1
src/main/java/io/zipcoder/casino/Game.java ファイルの表示

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

+ 0
- 30
src/main/java/io/zipcoder/casino/Printer.java ファイルの表示

20
         printMessage("Sorry, there is no game with that name, try one of: " + games);
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
     public static void showCard(Player player, Card card){
23
     public static void showCard(Player player, Card card){
40
         printMessage(player.getName() + " shows a " + card.getName());
24
         printMessage(player.getName() + " shows a " + card.getName());
41
     }
25
     }
55
     public static void welcomeTo(String gameName){
39
     public static void welcomeTo(String gameName){
56
         printMessage("Welcome to " + gameName + "!");
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
     public static void printWarTurnResult(String name, String cardName, int handSize){
43
     public static void printWarTurnResult(String name, String cardName, int handSize){
64
         printMessage(name + " has played " + cardName + " and has " + handSize + " cards left.");
44
         printMessage(name + " has played " + cardName + " and has " + handSize + " cards left.");
67
     public static void playedFaceDown(String name){
47
     public static void playedFaceDown(String name){
68
         printMessage(name + " has played a card face down.");
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 ファイルの表示

21
 
21
 
22
     @Override
22
     @Override
23
     public void payout(){
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
     @Override
27
     @Override
31
 
31
 
32
     @Override
32
     @Override
33
     public void startGame() {
33
     public void startGame() {
34
-        Printer.startSlots();
34
+        Printer.printMessage("You are all set to play a new slot game..zrrr..! \n");
35
         try {
35
         try {
36
             Thread.sleep(3000);
36
             Thread.sleep(3000);
37
         } catch (InterruptedException e) {
37
         } catch (InterruptedException e) {

+ 1
- 4
src/main/java/io/zipcoder/casino/War.java ファイルの表示

114
         }
114
         }
115
     }
115
     }
116
 
116
 
117
-    public void quit() { }
118
-
119
     public void startGame() {
117
     public void startGame() {
120
         Printer.welcomeTo("War");
118
         Printer.welcomeTo("War");
121
         super.chooseStatingPlayer();
119
         super.chooseStatingPlayer();
157
             }
155
             }
158
         }
156
         }
159
         Printer.printMessage(super.getPlayersTurn().getPlayer().getName() + "has: " + super.getPlayersTurn().getHand().size() + " cards.");
157
         Printer.printMessage(super.getPlayersTurn().getPlayer().getName() + "has: " + super.getPlayersTurn().getHand().size() + " cards.");
160
-
161
     }
158
     }
162
-}
159
+}