|
|
@ -7,15 +7,16 @@ public class CardMain {
|
|
|
|
Sevens sevens = new Sevens();
|
|
|
|
Sevens sevens = new Sevens();
|
|
|
|
sevens.shuffle();
|
|
|
|
sevens.shuffle();
|
|
|
|
|
|
|
|
|
|
|
|
int numOfPlayers = getNumOfPlayers();
|
|
|
|
Scanner in = new Scanner(System.in);
|
|
|
|
List<Player> allPlayers = sevens.dealCards(numOfPlayers);
|
|
|
|
int numOfPlayers = getNumOfPlayers(in);
|
|
|
|
|
|
|
|
in.close();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Player> allPlayers = sevens.dealCards(numOfPlayers);
|
|
|
|
sevens.play(allPlayers, numOfPlayers);
|
|
|
|
sevens.play(allPlayers, numOfPlayers);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static int getNumOfPlayers() {
|
|
|
|
public static int getNumOfPlayers(Scanner in) {
|
|
|
|
Scanner in = new Scanner(System.in);
|
|
|
|
|
|
|
|
System.out.println("Please Enter The Number of Players!");
|
|
|
|
System.out.println("Please Enter The Number of Players!");
|
|
|
|
while (!in.hasNextInt()) {
|
|
|
|
while (!in.hasNextInt()) {
|
|
|
|
in.nextLine();
|
|
|
|
in.nextLine();
|
|
|
|