Lauren Green 6 년 전
부모
커밋
e725de739e
2개의 변경된 파일4개의 추가작업 그리고 9개의 파일을 삭제
  1. 3
    9
      src/main/java/io/zipcoder/casino/Console.java
  2. 1
    0
      src/main/java/io/zipcoder/casino/Yahtzee.java

+ 3
- 9
src/main/java/io/zipcoder/casino/Console.java 파일 보기

7
     private String[] gameLib = {"yahtzee", "war", "three card stud"};
7
     private String[] gameLib = {"yahtzee", "war", "three card stud"};
8
     private Game game = null;
8
     private Game game = null;
9
     private Player player;
9
     private Player player;
10
-    private boolean running = true;
10
+    public boolean running = true;
11
 
11
 
12
     Console(){}
12
     Console(){}
13
 
13
 
24
 
24
 
25
     public void chooseGame()
25
     public void chooseGame()
26
     {
26
     {
27
-        boolean play = true;
28
-        while(play) {
27
+        while(running) {
29
             System.out.println("Please choose a game to play!");
28
             System.out.println("Please choose a game to play!");
30
             String command = getCommand();
29
             String command = getCommand();
31
 
30
 
54
                     Printer.noMatchingGameName(gameLib);
53
                     Printer.noMatchingGameName(gameLib);
55
                     break;
54
                     break;
56
             }
55
             }
57
-            System.out.println("Do you want to play another game? Y or N");
58
-            Scanner in = new Scanner(System.in);
59
-            String response = in.next();
60
-            if (response.equalsIgnoreCase("N")) {
61
-                play = false;
62
-            }
56
+
63
         }
57
         }
64
 
58
 
65
     }
59
     }

+ 1
- 0
src/main/java/io/zipcoder/casino/Yahtzee.java 파일 보기

50
         payout();
50
         payout();
51
         dicePlayer.printBalanceAtEnd();
51
         dicePlayer.printBalanceAtEnd();
52
         System.out.println();
52
         System.out.println();
53
+
53
     }
54
     }
54
 
55
 
55
     public void startRound() {
56
     public void startRound() {