Skip to content
Snippets Groups Projects
Commit 891efe78 authored by Isabell Hans's avatar Isabell Hans
Browse files

OPtion to initilaize new game added

parent a4a8e7a1
Branches
No related tags found
No related merge requests found
......@@ -171,9 +171,8 @@ public class GameLogic {
"Do you really want to start a new game? Your current scores wont be saved! Type in \"yes\" to confirm or anything else to cancel: ");
switch (scanner.nextLine()) {
case "yes":
System.out.println("Here is a new game for your " + players.size() + " players");
GameLogic game = new GameLogic(players);
game.start(scanner);
MainGame newGame = new MainGame();
newGame.initializeGame(scanner);
break;
default:
System.out.println("Restart cancelled. Please type in a command: ");
......@@ -213,6 +212,11 @@ public class GameLogic {
}
}
/**
* Checks if the game round is over
*
* @return True if the game round is not over
*/
public boolean checkEnd() {
int activePlayerCount = 0;
String endReason = "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment