瀏覽代碼

yes or no questions

Eric Foster 6 年之前
父節點
當前提交
a4d3c16671
共有 1 個檔案被更改,包括 2 行新增2 行删除
  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 查看文件

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