mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 07:10:42 -08:00
Print total after STAY
This commit is contained in:
@@ -157,7 +157,7 @@ public class Game {
|
||||
}
|
||||
action = userIo.prompt("RECEIVED A " + c.toString() + " HIT");
|
||||
} else if(action.equalsIgnoreCase("S")){ // STAY
|
||||
return;
|
||||
break;
|
||||
} else if(action.equalsIgnoreCase("D") && player.canDoubleDown(handNumber)) { // DOUBLE DOWN
|
||||
Card c = deck.deal();
|
||||
player.doubleDown(c, handNumber);
|
||||
|
||||
@@ -84,7 +84,7 @@ public class GameTest {
|
||||
game.play(player);
|
||||
|
||||
// Then
|
||||
assertEquals("PLAYER 1 ? ", out.toString());
|
||||
assertTrue(out.toString().startsWith("PLAYER 1 ? TOTAL IS 5"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user