Procházet zdrojové kódy

Added a return to console

Lauren Green před 6 roky
rodič
revize
7cb86fab6b
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4
    4
      src/main/java/io/zipcoder/casino/Yahtzee.java

+ 4
- 4
src/main/java/io/zipcoder/casino/Yahtzee.java Zobrazit soubor

1
 package io.zipcoder.casino;
1
 package io.zipcoder.casino;
2
 
2
 
3
-import java.lang.reflect.Array;
4
 import java.util.ArrayList;
3
 import java.util.ArrayList;
5
-import java.util.Arrays;
6
 import java.util.Scanner;
4
 import java.util.Scanner;
7
 
5
 
8
 public class Yahtzee extends DiceGame implements Game, Gamble{
6
 public class Yahtzee extends DiceGame implements Game, Gamble{
10
     DicePlayer dicePlayer;
8
     DicePlayer dicePlayer;
11
     private Scanner scanner = new Scanner(System.in);
9
     private Scanner scanner = new Scanner(System.in);
12
     int betAmount = 0;
10
     int betAmount = 0;
11
+    Console console = new Console();
13
 
12
 
14
     public Yahtzee(Player player) {
13
     public Yahtzee(Player player) {
15
         this.dicePlayer = new DicePlayer(player);
14
         this.dicePlayer = new DicePlayer(player);
46
         System.out.println("You scored " + dicePlayer.getScoreSheet().getTotalScore() + " points.");
45
         System.out.println("You scored " + dicePlayer.getScoreSheet().getTotalScore() + " points.");
47
         payout();
46
         payout();
48
         dicePlayer.printBalanceAtEnd();
47
         dicePlayer.printBalanceAtEnd();
49
-        //Return to console.
48
+        System.out.println();
49
+        quit();
50
     }
50
     }
51
 
51
 
52
     public void startRound() {
52
     public void startRound() {
207
     }
207
     }
208
 
208
 
209
     public void quit() {
209
     public void quit() {
210
-        //Return to console
210
+        console.chooseGame();
211
     }
211
     }
212
 }
212
 }