Connor Dunnigan пре 6 година
родитељ
комит
1ab16bd69e

+ 2
- 2
src/main/java/io/zipcoder/casino/cardgames/BlackJack.java Прегледај датотеку

@@ -45,7 +45,7 @@ public class BlackJack extends CardGame implements Gamble {
45 45
         Console.println("The dealer is dealing cards to the players.");
46 46
 
47 47
         for (BlackJackPlayer p: this.blackJackPlayers){ //gets bet from each player
48
-            placeBet();
48
+            placeBet(p);
49 49
         }
50 50
 
51 51
         dealerHand.add(deck.removeFirst());
@@ -167,7 +167,7 @@ public class BlackJack extends CardGame implements Gamble {
167 167
         }
168 168
     }
169 169
 
170
-    public void placeBet() {
170
+    public void placeBet(Player player) {
171 171
         this.bet = Console.getLongInput("Please enter your bet.");
172 172
     }
173 173
 

+ 3
- 2
src/main/java/io/zipcoder/casino/dicegames/Craps.java Прегледај датотеку

@@ -16,6 +16,7 @@ public class Craps extends DiceGame implements Gamble {
16 16
 
17 17
     public Craps() {
18 18
         readyPlayers();
19
+        //promptBets();
19 20
         runGame();
20 21
     }
21 22
     //for test purposes
@@ -39,7 +40,7 @@ public class Craps extends DiceGame implements Gamble {
39 40
     }
40 41
 
41 42
     public void placeBet(Player player) {
42
-        this.bet = console.integerInputSameLine("Enter your bet: ");
43
+        bet = console.integerInputSameLine("Enter your bet: ");
43 44
     }
44 45
 
45 46
     public void evaluateBet(Player player, long payout) {
@@ -83,7 +84,7 @@ public class Craps extends DiceGame implements Gamble {
83 84
 
84 85
     public void printRollAgain(int point){
85 86
         console.println("\n--------------------" +
86
-                "\nPoint to roll for: " + point + "--------------------");
87
+                "\nPoint to roll for: " + point + "\n--------------------");
87 88
         promptEnterKey("roll again");
88 89
     }
89 90
 

+ 1
- 0
src/main/java/io/zipcoder/casino/player/CrapsPlayer.java Прегледај датотеку

@@ -20,4 +20,5 @@ public class CrapsPlayer extends Player {
20 20
     public long getBet() {
21 21
         return bet;
22 22
     }
23
+    public void setBet(long bet) { this.bet = bet;}
23 24
 }