Print total after STAY

This commit is contained in:
Dave Burke
2022-03-03 22:10:39 -06:00
parent 213f77678f
commit 375f16c4a8
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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