Explorar el Código

yes or no questions

Eric Foster hace 6 años
padre
commit
a4d3c16671
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      src/main/java/io/zipcoder/casino/Leviathan/Games/Yahtzee.java

+ 2
- 2
src/main/java/io/zipcoder/casino/Leviathan/Games/Yahtzee.java Ver fichero

@@ -152,7 +152,7 @@ public class Yahtzee extends DiceGame {
152 152
          aConsole.println("Game over!");
153 153
          aConsole.println("Your total score is: " + totalScore);
154 154
 
155
-         if(aConsole.getStringInput("Would you like to play again?").equalsIgnoreCase("no")){
155
+         if(aConsole.yesOrNo("Would you like to play again?").equalsIgnoreCase("no")){
156 156
              playAgain= false;
157 157
          }
158 158
      }
@@ -415,7 +415,7 @@ public class Yahtzee extends DiceGame {
415 415
     Ask user if they want to roll again
416 416
      */
417 417
     public String userInputRollAgain() {
418
-        return aConsole.getStringInput("Roll again?").toUpperCase();
418
+        return aConsole.yesOrNo("Roll again?").toUpperCase();
419 419
     }
420 420
 
421 421
     /*