From 479b7ae3e09fd7a95fa9789cdcbadf4cc93d804c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:41:35 +0800 Subject: [PATCH 01/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=8D=E8=A7=84=E8=8C=83=E8=8C=83=E5=9E=8B=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 4795ee7..c18d56c 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -4,15 +4,15 @@ import java.util.LinkedList; public class Game { - ArrayList players = new ArrayList(); + ArrayList players = new ArrayList(); int[] places = new int[6]; int[] purses = new int[6]; boolean[] inPenaltyBox = new boolean[6]; - LinkedList popQuestions = new LinkedList(); - LinkedList scienceQuestions = new LinkedList(); - LinkedList sportsQuestions = new LinkedList(); - LinkedList rockQuestions = new LinkedList(); + LinkedList popQuestions = new LinkedList<>(); + LinkedList scienceQuestions = new LinkedList<>(); + LinkedList sportsQuestions = new LinkedList<>(); + LinkedList rockQuestions = new LinkedList<>(); int currentPlayer = 0; boolean isGettingOutOfPenaltyBox; @@ -35,8 +35,6 @@ public boolean isPlayable() { } public boolean add(String playerName) { - - players.add(playerName); places[howManyPlayers()] = 0; purses[howManyPlayers()] = 0; From 96eff2360c5320ef89a925a634a8410f0b306c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:45:08 +0800 Subject: [PATCH 02/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8D=20purse->goldCoins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 23 ++++++++----------- .../com/adaptionsoft/games/GameRunner.java | 6 ++--- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index c18d56c..f937da8 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -4,9 +4,9 @@ import java.util.LinkedList; public class Game { - ArrayList players = new ArrayList(); + ArrayList players = new ArrayList<>(); int[] places = new int[6]; - int[] purses = new int[6]; + int[] goldCoins = new int[6]; boolean[] inPenaltyBox = new boolean[6]; LinkedList popQuestions = new LinkedList<>(); @@ -30,19 +30,14 @@ public String createRockQuestion(int index){ return "Rock Question " + index; } - public boolean isPlayable() { - return (howManyPlayers() >= 2); - } - - public boolean add(String playerName) { + public void addPlayer(String playerName) { players.add(playerName); places[howManyPlayers()] = 0; - purses[howManyPlayers()] = 0; + goldCoins[howManyPlayers()] = 0; inPenaltyBox[howManyPlayers()] = false; System.out.println(playerName + " was added"); System.out.println("They are player number " + players.size()); - return true; } public int howManyPlayers() { @@ -113,10 +108,10 @@ public boolean wasCorrectlyAnswered() { System.out.println("Answer was correct!!!!"); currentPlayer++; if (currentPlayer == players.size()) currentPlayer = 0; - purses[currentPlayer]++; + goldCoins[currentPlayer]++; System.out.println(players.get(currentPlayer) + " now has " - + purses[currentPlayer] + + goldCoins[currentPlayer] + " Gold Coins."); boolean winner = didPlayerWin(); @@ -133,10 +128,10 @@ public boolean wasCorrectlyAnswered() { } else { System.out.println("Answer was corrent!!!!"); - purses[currentPlayer]++; + goldCoins[currentPlayer]++; System.out.println(players.get(currentPlayer) + " now has " - + purses[currentPlayer] + + goldCoins[currentPlayer] + " Gold Coins."); boolean winner = didPlayerWin(); @@ -159,6 +154,6 @@ public boolean wrongAnswer(){ private boolean didPlayerWin() { - return !(purses[currentPlayer] == 6); + return !(goldCoins[currentPlayer] == 6); } } diff --git a/src/main/java/com/adaptionsoft/games/GameRunner.java b/src/main/java/com/adaptionsoft/games/GameRunner.java index 53bbc5c..86c6045 100644 --- a/src/main/java/com/adaptionsoft/games/GameRunner.java +++ b/src/main/java/com/adaptionsoft/games/GameRunner.java @@ -17,9 +17,9 @@ public static void main(String[] args) { public static void playGame(Random rand) { Game aGame = new Game(); - aGame.add("Chet"); - aGame.add("Pat"); - aGame.add("Sue"); + aGame.addPlayer("Chet"); + aGame.addPlayer("Pat"); + aGame.addPlayer("Sue"); do { From b9c45d22d463bf45da181cefd043063960776dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:46:08 +0800 Subject: [PATCH 03/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=AF=94=E8=BE=83=20=3D=3D=20->=20e?= =?UTF-8?q?quals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index f937da8..9ed8871 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -78,13 +78,13 @@ private void movePlayerAndAskQuestion(int roll) { } private void askQuestion() { - if (currentCategory() == "Pop") + if (currentCategory().equals("Pop")) System.out.println(popQuestions.removeFirst()); - if (currentCategory() == "Science") + if (currentCategory().equals("Science")) System.out.println(scienceQuestions.removeFirst()); - if (currentCategory() == "Sports") + if (currentCategory().equals("Sports")) System.out.println(sportsQuestions.removeFirst()); - if (currentCategory() == "Rock") + if (currentCategory().equals("Rock")) System.out.println(rockQuestions.removeFirst()); } From d9bc927715eec17138f64d98ff27c4676db74955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:46:34 +0800 Subject: [PATCH 04/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E5=A4=9A=E4=BD=99=E5=B1=80=E9=83=A8=E5=8F=98=E9=87=8F?= =?UTF-8?q?winner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 9ed8871..da939ed 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -114,9 +114,7 @@ public boolean wasCorrectlyAnswered() { + goldCoins[currentPlayer] + " Gold Coins."); - boolean winner = didPlayerWin(); - - return winner; + return didPlayerWin(); } else { currentPlayer++; if (currentPlayer == players.size()) currentPlayer = 0; From eb53f63c5bf7223c5c6c07ba797bd5366c052f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:47:25 +0800 Subject: [PATCH 05/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF=20corrent=20->=20?= =?UTF-8?q?correct?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index da939ed..e3b134f 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -125,7 +125,7 @@ public boolean wasCorrectlyAnswered() { } else { - System.out.println("Answer was corrent!!!!"); + System.out.println("Answer was correct!!!!"); goldCoins[currentPlayer]++; System.out.println(players.get(currentPlayer) + " now has " From 6324eb2c929634de43b912af06d8aff3ecd9f735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:48:06 +0800 Subject: [PATCH 06/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B5=8B=E8=AF=95=E4=B8=AD=E7=9A=84=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF=20corrent=20->=20correct?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../games/GameTest.itsLockedDown.approved.txt | 246 +++++++++--------- 1 file changed, 123 insertions(+), 123 deletions(-) diff --git a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt index 88f5a3d..e591478 100644 --- a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt +++ b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt @@ -9,77 +9,77 @@ They have rolled a 4 Chet's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 2 Pat's new location is 2 The category is Sports Sports Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 4 The category is Pop Pop Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 7 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 6 The category is Sports Sports Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 7 The category is Rock Rock Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 9 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 11 The category is Rock Rock Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 0 The category is Pop Pop Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 1 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 2 Pat's new location is 1 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 3 @@ -93,14 +93,14 @@ They have rolled a 5 Chet's new location is 6 The category is Sports Sports Question 2 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 2 The category is Sports Sports Question 3 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 5 @@ -121,28 +121,28 @@ They have rolled a 2 Chet's new location is 2 The category is Sports Sports Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 1 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 1 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 5 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 2 @@ -156,14 +156,14 @@ They have rolled a 3 Sue's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 10 The category is Sports Sports Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 5 @@ -178,7 +178,7 @@ They have rolled a 4 Sue's new location is 8 The category is Pop Pop Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 2 @@ -195,7 +195,7 @@ They have rolled a 1 Sue's new location is 9 The category is Science Science Question 3 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 4 @@ -213,7 +213,7 @@ They have rolled a 5 Sue's new location is 2 The category is Sports Sports Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 6 Gold Coins. Chet was added They are player number 1 @@ -226,28 +226,28 @@ They have rolled a 1 Chet's new location is 1 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 5 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 1 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 5 The category is Science Science Question 3 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 3 @@ -261,14 +261,14 @@ They have rolled a 2 Sue's new location is 3 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 9 The category is Science Science Question 4 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 5 @@ -356,14 +356,14 @@ They have rolled a 4 Pat's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 2 The category is Sports Sports Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 2 @@ -373,14 +373,14 @@ They have rolled a 3 Pat's new location is 7 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 6 The category is Sports Sports Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 @@ -390,14 +390,14 @@ They have rolled a 4 Pat's new location is 11 The category is Rock Rock Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 9 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 3 @@ -412,14 +412,14 @@ They have rolled a 1 Pat's new location is 0 The category is Pop Pop Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 2 The category is Sports Sports Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 5 @@ -447,7 +447,7 @@ They have rolled a 3 Pat's new location is 3 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 5 @@ -469,7 +469,7 @@ They have rolled a 2 Pat's new location is 5 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 @@ -482,7 +482,7 @@ They have rolled a 3 Pat's new location is 8 The category is Pop Pop Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 5 @@ -505,7 +505,7 @@ They have rolled a 1 Pat's new location is 9 The category is Science Science Question 3 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added They are player number 1 @@ -518,70 +518,70 @@ They have rolled a 4 Chet's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 5 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 4 The category is Pop Pop Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 5 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 9 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 7 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 8 The category is Pop Pop Question 2 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 2 The category is Sports Sports Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 9 The category is Science Science Question 3 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 10 The category is Sports Sports Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 4 @@ -595,14 +595,14 @@ They have rolled a 5 Sue's new location is 2 The category is Sports Sports Question 3 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 11 The category is Rock Rock Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player They have rolled a 2 @@ -619,7 +619,7 @@ They have rolled a 5 Chet's new location is 4 The category is Pop Pop Question 3 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added They are player number 1 @@ -632,49 +632,49 @@ They have rolled a 4 Chet's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 1 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 1 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 7 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 5 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 5 The category is Science Science Question 3 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 9 The category is Science Science Question 4 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 3 @@ -801,14 +801,14 @@ They have rolled a 5 Pat's new location is 5 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 1 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 4 @@ -820,14 +820,14 @@ They have rolled a 3 Pat's new location is 8 The category is Pop Pop Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 3 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 4 @@ -837,14 +837,14 @@ They have rolled a 4 Pat's new location is 0 The category is Pop Pop Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 4 The category is Pop Pop Question 3 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 3 @@ -859,14 +859,14 @@ They have rolled a 3 Pat's new location is 3 The category is Rock Rock Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 8 The category is Pop Pop Question 4 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 3 @@ -881,7 +881,7 @@ They have rolled a 2 Pat's new location is 5 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added They are player number 1 @@ -894,98 +894,98 @@ They have rolled a 4 Chet's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 5 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 3 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 7 The category is Rock Rock Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 6 The category is Sports Sports Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 8 The category is Pop Pop Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 11 The category is Rock Rock Question 2 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 3 Pat's new location is 9 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 1 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 4 The category is Pop Pop Question 2 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 10 The category is Sports Sports Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 2 The category is Sports Sports Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 9 The category is Science Science Question 3 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player They have rolled a 3 Pat's new location is 1 The category is Science Science Question 4 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 1 @@ -999,7 +999,7 @@ They have rolled a 4 Chet's new location is 1 The category is Science Science Question 5 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added They are player number 1 @@ -1012,21 +1012,21 @@ They have rolled a 5 Chet's new location is 5 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 1 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 1 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 1 @@ -1040,14 +1040,14 @@ They have rolled a 3 Pat's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 3 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 3 @@ -1062,7 +1062,7 @@ They have rolled a 2 Pat's new location is 6 The category is Sports Sports Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 4 @@ -1084,7 +1084,7 @@ They have rolled a 2 Pat's new location is 8 The category is Pop Pop Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 5 @@ -1113,21 +1113,21 @@ They have rolled a 5 Chet's new location is 5 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 5 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 4 @@ -1141,14 +1141,14 @@ They have rolled a 4 Pat's new location is 9 The category is Science Science Question 3 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 6 The category is Sports Sports Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 @@ -1158,7 +1158,7 @@ They have rolled a 5 Pat's new location is 2 The category is Sports Sports Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 @@ -1175,7 +1175,7 @@ They have rolled a 5 Pat's new location is 7 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 5 @@ -1195,7 +1195,7 @@ They have rolled a 2 Pat's new location is 9 The category is Science Science Question 5 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 3 @@ -1215,7 +1215,7 @@ They have rolled a 3 Pat's new location is 0 The category is Pop Pop Question 3 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added They are player number 1 @@ -1228,28 +1228,28 @@ They have rolled a 3 Chet's new location is 3 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 2 Pat's new location is 2 The category is Sports Sports Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 6 The category is Sports Sports Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 1 @@ -1263,14 +1263,14 @@ They have rolled a 1 Sue's new location is 5 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 8 The category is Pop Pop Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 2 @@ -1280,14 +1280,14 @@ They have rolled a 2 Sue's new location is 7 The category is Rock Rock Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 1 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 2 @@ -1297,14 +1297,14 @@ They have rolled a 1 Sue's new location is 8 The category is Pop Pop Question 2 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 2 The category is Sports Sports Question 2 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player They have rolled a 4 @@ -1314,14 +1314,14 @@ They have rolled a 3 Sue's new location is 11 The category is Rock Rock Question 3 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 5 The category is Science Science Question 2 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added They are player number 1 @@ -1341,14 +1341,14 @@ They have rolled a 5 Pat's new location is 5 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 3 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 5 @@ -1363,14 +1363,14 @@ They have rolled a 2 Pat's new location is 7 The category is Rock Rock Question 1 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 8 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 3 @@ -1385,7 +1385,7 @@ They have rolled a 4 Pat's new location is 11 The category is Rock Rock Question 2 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 3 @@ -1413,28 +1413,28 @@ They have rolled a 1 Chet's new location is 1 The category is Science Science Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 4 The category is Pop Pop Question 0 -Answer was corrent!!!! +Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 4 The category is Pop Pop Question 1 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 5 The category is Science Science Question 1 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 5 @@ -1448,14 +1448,14 @@ They have rolled a 2 Sue's new location is 6 The category is Sports Sports Question 0 -Answer was corrent!!!! +Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 7 The category is Rock Rock Question 0 -Answer was corrent!!!! +Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 5 From 20c90ce6b485a0778f92e3eeecce8a58f73c3738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:50:11 +0800 Subject: [PATCH 07/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=8B=86?= =?UTF-8?q?=E5=88=86movePlayerAndAskQuestion=E6=96=B9=E6=B3=95=E4=B8=BA=20?= =?UTF-8?q?movePlayer=E5=92=8CaskQuestion=E4=B8=A4=E4=B8=AA=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E4=B8=80=E4=B8=AA=E6=96=B9=E6=B3=95=E5=8F=AA?= =?UTF-8?q?=E5=81=9A=E4=B8=80=E4=BB=B6=E4=BA=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 247 +++++++++--------- 1 file changed, 122 insertions(+), 125 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index e3b134f..e34e380 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -7,7 +7,7 @@ public class Game { ArrayList players = new ArrayList<>(); int[] places = new int[6]; int[] goldCoins = new int[6]; - boolean[] inPenaltyBox = new boolean[6]; + boolean[] inPenaltyBox = new boolean[6]; LinkedList popQuestions = new LinkedList<>(); LinkedList scienceQuestions = new LinkedList<>(); @@ -17,141 +17,138 @@ public class Game { int currentPlayer = 0; boolean isGettingOutOfPenaltyBox; - public Game(){ - for (int i = 0; i < 50; i++) { - popQuestions.addLast("Pop Question " + i); - scienceQuestions.addLast(("Science Question " + i)); - sportsQuestions.addLast(("Sports Question " + i)); - rockQuestions.addLast(createRockQuestion(i)); - } + public Game() { + for (int i = 0; i < 50; i++) { + popQuestions.addLast("Pop Question " + i); + scienceQuestions.addLast(("Science Question " + i)); + sportsQuestions.addLast(("Sports Question " + i)); + rockQuestions.addLast(createRockQuestion(i)); + } } - public String createRockQuestion(int index){ - return "Rock Question " + index; - } + public String createRockQuestion(int index) { + return "Rock Question " + index; + } - public void addPlayer(String playerName) { - players.add(playerName); - places[howManyPlayers()] = 0; - goldCoins[howManyPlayers()] = 0; - inPenaltyBox[howManyPlayers()] = false; + public void addPlayer(String playerName) { + players.add(playerName); + places[howManyPlayers()] = 0; + goldCoins[howManyPlayers()] = 0; + inPenaltyBox[howManyPlayers()] = false; - System.out.println(playerName + " was added"); - System.out.println("They are player number " + players.size()); - } + System.out.println(playerName + " was added"); + System.out.println("They are player number " + players.size()); + } - public int howManyPlayers() { - return players.size(); - } + public int howManyPlayers() { + return players.size(); + } - public void roll(int roll) { - System.out.println(players.get(currentPlayer) + " is the current player"); - System.out.println("They have rolled a " + roll); + public void roll(int roll) { + System.out.println(players.get(currentPlayer) + " is the current player"); + System.out.println("They have rolled a " + roll); + + if (inPenaltyBox[currentPlayer]) { + if (roll % 2 != 0) { + isGettingOutOfPenaltyBox = true; + + System.out.println(players.get(currentPlayer) + " is getting out of the penalty box"); + movePlayer(roll); + askQuestion(); + } else { + System.out.println(players.get(currentPlayer) + " is not getting out of the penalty box"); + isGettingOutOfPenaltyBox = false; + } + } else { + movePlayer(roll); + askQuestion(); + } - if (inPenaltyBox[currentPlayer]) { - if (roll % 2 != 0) { - isGettingOutOfPenaltyBox = true; + } - System.out.println(players.get(currentPlayer) + " is getting out of the penalty box"); - movePlayerAndAskQuestion(roll); - } else { - System.out.println(players.get(currentPlayer) + " is not getting out of the penalty box"); - isGettingOutOfPenaltyBox = false; - } + private void movePlayer(int roll) { + places[currentPlayer] = places[currentPlayer] + roll; + if (places[currentPlayer] > 11) places[currentPlayer] = places[currentPlayer] - 12; + System.out.println(players.get(currentPlayer) + + "'s new location is " + + places[currentPlayer]); + System.out.println("The category is " + currentCategory()); + } - } else { + private void askQuestion() { + if (currentCategory().equals("Pop")) + System.out.println(popQuestions.removeFirst()); + if (currentCategory().equals("Science")) + System.out.println(scienceQuestions.removeFirst()); + if (currentCategory().equals("Sports")) + System.out.println(sportsQuestions.removeFirst()); + if (currentCategory().equals("Rock")) + System.out.println(rockQuestions.removeFirst()); + } - movePlayerAndAskQuestion(roll); - } - } + private String currentCategory() { + if (places[currentPlayer] == 0) return "Pop"; + if (places[currentPlayer] == 4) return "Pop"; + if (places[currentPlayer] == 8) return "Pop"; + if (places[currentPlayer] == 1) return "Science"; + if (places[currentPlayer] == 5) return "Science"; + if (places[currentPlayer] == 9) return "Science"; + if (places[currentPlayer] == 2) return "Sports"; + if (places[currentPlayer] == 6) return "Sports"; + if (places[currentPlayer] == 10) return "Sports"; + return "Rock"; + } - private void movePlayerAndAskQuestion(int roll) { - places[currentPlayer] = places[currentPlayer] + roll; - if (places[currentPlayer] > 11) places[currentPlayer] = places[currentPlayer] - 12; + public boolean wasCorrectlyAnswered() { + if (inPenaltyBox[currentPlayer]) { + if (isGettingOutOfPenaltyBox) { + System.out.println("Answer was correct!!!!"); + currentPlayer++; + if (currentPlayer == players.size()) currentPlayer = 0; + goldCoins[currentPlayer]++; + System.out.println(players.get(currentPlayer) + + " now has " + + goldCoins[currentPlayer] + + " Gold Coins."); + + return didPlayerWin(); + } else { + currentPlayer++; + if (currentPlayer == players.size()) currentPlayer = 0; + return true; + } + + + } else { + + System.out.println("Answer was correct!!!!"); + goldCoins[currentPlayer]++; + System.out.println(players.get(currentPlayer) + + " now has " + + goldCoins[currentPlayer] + + " Gold Coins."); + + boolean winner = didPlayerWin(); + currentPlayer++; + if (currentPlayer == players.size()) currentPlayer = 0; + + return winner; + } + } - System.out.println(players.get(currentPlayer) - + "'s new location is " - + places[currentPlayer]); - System.out.println("The category is " + currentCategory()); - askQuestion(); - } - - private void askQuestion() { - if (currentCategory().equals("Pop")) - System.out.println(popQuestions.removeFirst()); - if (currentCategory().equals("Science")) - System.out.println(scienceQuestions.removeFirst()); - if (currentCategory().equals("Sports")) - System.out.println(sportsQuestions.removeFirst()); - if (currentCategory().equals("Rock")) - System.out.println(rockQuestions.removeFirst()); - } - - - private String currentCategory() { - if (places[currentPlayer] == 0) return "Pop"; - if (places[currentPlayer] == 4) return "Pop"; - if (places[currentPlayer] == 8) return "Pop"; - if (places[currentPlayer] == 1) return "Science"; - if (places[currentPlayer] == 5) return "Science"; - if (places[currentPlayer] == 9) return "Science"; - if (places[currentPlayer] == 2) return "Sports"; - if (places[currentPlayer] == 6) return "Sports"; - if (places[currentPlayer] == 10) return "Sports"; - return "Rock"; - } - - public boolean wasCorrectlyAnswered() { - if (inPenaltyBox[currentPlayer]){ - if (isGettingOutOfPenaltyBox) { - System.out.println("Answer was correct!!!!"); - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; - goldCoins[currentPlayer]++; - System.out.println(players.get(currentPlayer) - + " now has " - + goldCoins[currentPlayer] - + " Gold Coins."); - - return didPlayerWin(); - } else { - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; - return true; - } - - - - } else { - - System.out.println("Answer was correct!!!!"); - goldCoins[currentPlayer]++; - System.out.println(players.get(currentPlayer) - + " now has " - + goldCoins[currentPlayer] - + " Gold Coins."); - - boolean winner = didPlayerWin(); - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; - - return winner; - } - } - - public boolean wrongAnswer(){ - System.out.println("Question was incorrectly answered"); - System.out.println(players.get(currentPlayer)+ " was sent to the penalty box"); - inPenaltyBox[currentPlayer] = true; - - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; - return true; - } - - - private boolean didPlayerWin() { - return !(goldCoins[currentPlayer] == 6); - } + public boolean wrongAnswer() { + System.out.println("Question was incorrectly answered"); + System.out.println(players.get(currentPlayer) + " was sent to the penalty box"); + inPenaltyBox[currentPlayer] = true; + + currentPlayer++; + if (currentPlayer == players.size()) currentPlayer = 0; + return true; + } + + + private boolean didPlayerWin() { + return !(goldCoins[currentPlayer] == 6); + } } From 5dee0a0f1f4615685bdcec86f324b7b6ea2f56c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:51:10 +0800 Subject: [PATCH 08/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E5=8F=96=20nextPlayer=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index e34e380..bc329f2 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -104,8 +104,7 @@ public boolean wasCorrectlyAnswered() { if (inPenaltyBox[currentPlayer]) { if (isGettingOutOfPenaltyBox) { System.out.println("Answer was correct!!!!"); - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; + nextPlayer(); goldCoins[currentPlayer]++; System.out.println(players.get(currentPlayer) + " now has " @@ -114,12 +113,9 @@ public boolean wasCorrectlyAnswered() { return didPlayerWin(); } else { - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; + nextPlayer(); return true; } - - } else { System.out.println("Answer was correct!!!!"); @@ -130,20 +126,23 @@ public boolean wasCorrectlyAnswered() { + " Gold Coins."); boolean winner = didPlayerWin(); - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; + nextPlayer(); return winner; } } + private void nextPlayer() { + currentPlayer++; + if (currentPlayer == players.size()) currentPlayer = 0; + } + public boolean wrongAnswer() { System.out.println("Question was incorrectly answered"); System.out.println(players.get(currentPlayer) + " was sent to the penalty box"); inPenaltyBox[currentPlayer] = true; - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; + nextPlayer(); return true; } From 1d6c45e0cf3e172049b876df676fda2f50d18073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:52:17 +0800 Subject: [PATCH 09/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E5=8F=96=20gainGoldCoin=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index bc329f2..8962731 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -105,11 +105,7 @@ public boolean wasCorrectlyAnswered() { if (isGettingOutOfPenaltyBox) { System.out.println("Answer was correct!!!!"); nextPlayer(); - goldCoins[currentPlayer]++; - System.out.println(players.get(currentPlayer) - + " now has " - + goldCoins[currentPlayer] - + " Gold Coins."); + gainGoldCoin(); return didPlayerWin(); } else { @@ -119,11 +115,7 @@ public boolean wasCorrectlyAnswered() { } else { System.out.println("Answer was correct!!!!"); - goldCoins[currentPlayer]++; - System.out.println(players.get(currentPlayer) - + " now has " - + goldCoins[currentPlayer] - + " Gold Coins."); + gainGoldCoin(); boolean winner = didPlayerWin(); nextPlayer(); @@ -132,6 +124,14 @@ public boolean wasCorrectlyAnswered() { } } + private void gainGoldCoin() { + goldCoins[currentPlayer]++; + System.out.println(players.get(currentPlayer) + + " now has " + + goldCoins[currentPlayer] + + " Gold Coins."); + } + private void nextPlayer() { currentPlayer++; if (currentPlayer == players.size()) currentPlayer = 0; From bbef036fe797d304e85ed93d4fda5db6afc56761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:53:34 +0800 Subject: [PATCH 10/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E5=8F=96=20getOutOfPenaltyBox=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 8962731..f1f9f74 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -50,14 +50,12 @@ public void roll(int roll) { if (inPenaltyBox[currentPlayer]) { if (roll % 2 != 0) { - isGettingOutOfPenaltyBox = true; - - System.out.println(players.get(currentPlayer) + " is getting out of the penalty box"); + getOutOfPenaltyBox(); movePlayer(roll); askQuestion(); } else { - System.out.println(players.get(currentPlayer) + " is not getting out of the penalty box"); isGettingOutOfPenaltyBox = false; + System.out.println(players.get(currentPlayer) + " is not getting out of the penalty box"); } } else { movePlayer(roll); @@ -66,7 +64,12 @@ public void roll(int roll) { } - private void movePlayer(int roll) { + private void getOutOfPenaltyBox() { + isGettingOutOfPenaltyBox = true; + System.out.println(players.get(currentPlayer) + " is getting out of the penalty box"); + } + + private void movePlayer(int roll) { places[currentPlayer] = places[currentPlayer] + roll; if (places[currentPlayer] > 11) places[currentPlayer] = places[currentPlayer] - 12; System.out.println(players.get(currentPlayer) From 508dbcb4cc669729ab1ab2b242dcfd19c206615b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 12:54:09 +0800 Subject: [PATCH 11/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E5=8F=96=20stayInPenaltyBox=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index f1f9f74..792ac3e 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -54,8 +54,7 @@ public void roll(int roll) { movePlayer(roll); askQuestion(); } else { - isGettingOutOfPenaltyBox = false; - System.out.println(players.get(currentPlayer) + " is not getting out of the penalty box"); + stayInPenaltyBox(); } } else { movePlayer(roll); @@ -64,6 +63,11 @@ public void roll(int roll) { } + private void stayInPenaltyBox() { + isGettingOutOfPenaltyBox = false; + System.out.println(players.get(currentPlayer) + " is not getting out of the penalty box"); + } + private void getOutOfPenaltyBox() { isGettingOutOfPenaltyBox = true; System.out.println(players.get(currentPlayer) + " is getting out of the penalty box"); From 10a71ba85071a9073d378ce6a2a6abbae1396dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:02:42 +0800 Subject: [PATCH 12/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E5=8F=96=20getCurrentPlayer=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 792ac3e..7425963 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -45,7 +45,7 @@ public int howManyPlayers() { } public void roll(int roll) { - System.out.println(players.get(currentPlayer) + " is the current player"); + System.out.println(getCurrentPlayer() + " is the current player"); System.out.println("They have rolled a " + roll); if (inPenaltyBox[currentPlayer]) { @@ -65,18 +65,18 @@ public void roll(int roll) { private void stayInPenaltyBox() { isGettingOutOfPenaltyBox = false; - System.out.println(players.get(currentPlayer) + " is not getting out of the penalty box"); + System.out.println(getCurrentPlayer() + " is not getting out of the penalty box"); } private void getOutOfPenaltyBox() { isGettingOutOfPenaltyBox = true; - System.out.println(players.get(currentPlayer) + " is getting out of the penalty box"); + System.out.println(getCurrentPlayer() + " is getting out of the penalty box"); } private void movePlayer(int roll) { places[currentPlayer] = places[currentPlayer] + roll; if (places[currentPlayer] > 11) places[currentPlayer] = places[currentPlayer] - 12; - System.out.println(players.get(currentPlayer) + System.out.println(getCurrentPlayer() + "'s new location is " + places[currentPlayer]); System.out.println("The category is " + currentCategory()); @@ -133,7 +133,7 @@ public boolean wasCorrectlyAnswered() { private void gainGoldCoin() { goldCoins[currentPlayer]++; - System.out.println(players.get(currentPlayer) + System.out.println(getCurrentPlayer() + " now has " + goldCoins[currentPlayer] + " Gold Coins."); @@ -146,13 +146,17 @@ private void nextPlayer() { public boolean wrongAnswer() { System.out.println("Question was incorrectly answered"); - System.out.println(players.get(currentPlayer) + " was sent to the penalty box"); + System.out.println(getCurrentPlayer() + " was sent to the penalty box"); inPenaltyBox[currentPlayer] = true; nextPlayer(); return true; } + private String getCurrentPlayer() { + return players.get(currentPlayer); + } + private boolean didPlayerWin() { return !(goldCoins[currentPlayer] == 6); From f86330372aa8a5e660711e20f58f897b4a0f990d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:03:10 +0800 Subject: [PATCH 13/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=20Player=20=E7=B1=BB=E7=94=A8=E4=BA=8E=E5=B0=81?= =?UTF-8?q?=E8=A3=85=E7=8E=A9=E5=AE=B6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Player.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/java/com/adaptionsoft/games/Player.java diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java new file mode 100644 index 0000000..b194988 --- /dev/null +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -0,0 +1,10 @@ +package com.adaptionsoft.games; + +/** + * Created with IntelliJ IDEA. + * User: lai.yi + * Date: 2020/2/2 + * Description: + **/ +public class Player { +} From 61c86152afa4d53e5050dc116e148a433fc3ef8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:03:49 +0800 Subject: [PATCH 14/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=20tempPlayers=20=E5=AE=B9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 7425963..381f832 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -5,6 +5,7 @@ public class Game { ArrayList players = new ArrayList<>(); + ArrayList tempPlayers = new ArrayList<>(); int[] places = new int[6]; int[] goldCoins = new int[6]; boolean[] inPenaltyBox = new boolean[6]; From 3a5b527b4d20988856ece92bd6c4916ea58269cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:04:55 +0800 Subject: [PATCH 15/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86=20na?= =?UTF-8?q?me=20=E5=B1=9E=E6=80=A7=E7=A7=BB=E5=85=A5Player=E7=B1=BB?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E5=9C=A8addPlayer=E6=97=B6=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 1 + src/main/java/com/adaptionsoft/games/Player.java | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 381f832..2afff9f 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -33,6 +33,7 @@ public String createRockQuestion(int index) { public void addPlayer(String playerName) { players.add(playerName); + tempPlayers.add(new Player(playerName)); places[howManyPlayers()] = 0; goldCoins[howManyPlayers()] = 0; inPenaltyBox[howManyPlayers()] = false; diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index b194988..e3824f0 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -7,4 +7,13 @@ * Description: **/ public class Player { + private String name; + + public Player(String name) { + this.name = name; + } + + public String getName() { + return name; + } } From 711740560916e51f8cf751bc829181d23ffecb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:05:59 +0800 Subject: [PATCH 16/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=20getCurrentPlayer=20=E4=B8=AD=20players=20=E4=B8=BA?= =?UTF-8?q?=20tempPlayers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 2afff9f..964e141 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -156,7 +156,7 @@ public boolean wrongAnswer() { } private String getCurrentPlayer() { - return players.get(currentPlayer); + return tempPlayers.get(currentPlayer).getName(); } From fd17f347390289c21275ecd7f841e92b49e927bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:15:06 +0800 Subject: [PATCH 17/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=B8=BA=20Pl?= =?UTF-8?q?ayer=20=E7=B1=BB=E6=B7=BB=E5=8A=A0place=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Player.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index e3824f0..5db459e 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -8,6 +8,7 @@ **/ public class Player { private String name; + private int place = 0; public Player(String name) { this.name = name; From 92ca35128cf509abbf445592cc89e30d89dec954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:16:08 +0800 Subject: [PATCH 18/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E5=8F=96=20getCurrentPlace=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 964e141..67f7867 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -76,11 +76,11 @@ private void getOutOfPenaltyBox() { } private void movePlayer(int roll) { - places[currentPlayer] = places[currentPlayer] + roll; - if (places[currentPlayer] > 11) places[currentPlayer] = places[currentPlayer] - 12; + places[currentPlayer] = getCurrentPlace() + roll; + if (getCurrentPlace() > 11) places[currentPlayer] = getCurrentPlace() - 12; System.out.println(getCurrentPlayer() + "'s new location is " - + places[currentPlayer]); + + getCurrentPlace()); System.out.println("The category is " + currentCategory()); } @@ -97,18 +97,22 @@ private void askQuestion() { private String currentCategory() { - if (places[currentPlayer] == 0) return "Pop"; - if (places[currentPlayer] == 4) return "Pop"; - if (places[currentPlayer] == 8) return "Pop"; - if (places[currentPlayer] == 1) return "Science"; - if (places[currentPlayer] == 5) return "Science"; - if (places[currentPlayer] == 9) return "Science"; - if (places[currentPlayer] == 2) return "Sports"; - if (places[currentPlayer] == 6) return "Sports"; - if (places[currentPlayer] == 10) return "Sports"; + if (getCurrentPlace() == 0) return "Pop"; + if (getCurrentPlace() == 4) return "Pop"; + if (getCurrentPlace() == 8) return "Pop"; + if (getCurrentPlace() == 1) return "Science"; + if (getCurrentPlace() == 5) return "Science"; + if (getCurrentPlace() == 9) return "Science"; + if (getCurrentPlace() == 2) return "Sports"; + if (getCurrentPlace() == 6) return "Sports"; + if (getCurrentPlace() == 10) return "Sports"; return "Rock"; } + private int getCurrentPlace() { + return places[currentPlayer]; + } + public boolean wasCorrectlyAnswered() { if (inPenaltyBox[currentPlayer]) { if (isGettingOutOfPenaltyBox) { From b3320b5c9f5874e0cfe2228e9972873db0dd10f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:18:33 +0800 Subject: [PATCH 19/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86=20pl?= =?UTF-8?q?aces=20=E6=9B=BF=E6=8D=A2=E4=B8=BA=20tempPlayers.get().place?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 7 +++---- src/main/java/com/adaptionsoft/games/Player.java | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 67f7867..60624af 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -34,7 +34,6 @@ public String createRockQuestion(int index) { public void addPlayer(String playerName) { players.add(playerName); tempPlayers.add(new Player(playerName)); - places[howManyPlayers()] = 0; goldCoins[howManyPlayers()] = 0; inPenaltyBox[howManyPlayers()] = false; @@ -76,8 +75,8 @@ private void getOutOfPenaltyBox() { } private void movePlayer(int roll) { - places[currentPlayer] = getCurrentPlace() + roll; - if (getCurrentPlace() > 11) places[currentPlayer] = getCurrentPlace() - 12; + tempPlayers.get(currentPlayer).place = getCurrentPlace() + roll; + if (getCurrentPlace() > 11) tempPlayers.get(currentPlayer).place = getCurrentPlace() - 12; System.out.println(getCurrentPlayer() + "'s new location is " + getCurrentPlace()); @@ -110,7 +109,7 @@ private String currentCategory() { } private int getCurrentPlace() { - return places[currentPlayer]; + return tempPlayers.get(currentPlayer).place; } public boolean wasCorrectlyAnswered() { diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index 5db459e..ab1143e 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -8,7 +8,7 @@ **/ public class Player { private String name; - private int place = 0; + public int place = 0; public Player(String name) { this.name = name; From 12a280a6721a57aec3c0f06b894169e68911b2e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:19:09 +0800 Subject: [PATCH 20/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=20places?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 60624af..475d9d9 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -6,7 +6,6 @@ public class Game { ArrayList players = new ArrayList<>(); ArrayList tempPlayers = new ArrayList<>(); - int[] places = new int[6]; int[] goldCoins = new int[6]; boolean[] inPenaltyBox = new boolean[6]; From 0001bfce6e80b6322e7a6bcc14bb64446a8198bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:21:15 +0800 Subject: [PATCH 21/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=B8=BA=20Pl?= =?UTF-8?q?ayer=20=E5=A2=9E=E5=8A=A0=20goldCoin=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 1 - src/main/java/com/adaptionsoft/games/Player.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 475d9d9..ff5a284 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -33,7 +33,6 @@ public String createRockQuestion(int index) { public void addPlayer(String playerName) { players.add(playerName); tempPlayers.add(new Player(playerName)); - goldCoins[howManyPlayers()] = 0; inPenaltyBox[howManyPlayers()] = false; System.out.println(playerName + " was added"); diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index ab1143e..fcab8d4 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -9,6 +9,7 @@ public class Player { private String name; public int place = 0; + public int goldCoin = 0; public Player(String name) { this.name = name; From bc3c83378e86f22d0727e5a33d2d2ee478d29c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:22:04 +0800 Subject: [PATCH 22/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86=20go?= =?UTF-8?q?ldCoins=20=E6=9B=BF=E6=8D=A2=E4=B8=BA=20tempPlayers.get().goldC?= =?UTF-8?q?oin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index ff5a284..bdea3c2 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -135,10 +135,10 @@ public boolean wasCorrectlyAnswered() { } private void gainGoldCoin() { - goldCoins[currentPlayer]++; + tempPlayers.get(currentPlayer).goldCoin++; System.out.println(getCurrentPlayer() + " now has " - + goldCoins[currentPlayer] + + tempPlayers.get(currentPlayer).goldCoin + " Gold Coins."); } @@ -162,6 +162,6 @@ private String getCurrentPlayer() { private boolean didPlayerWin() { - return !(goldCoins[currentPlayer] == 6); + return !(tempPlayers.get(currentPlayer).goldCoin == 6); } } From 0c4b59d8bd18ecd9ec15385b313d55a7dd431757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:22:20 +0800 Subject: [PATCH 23/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=20goldCoin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index bdea3c2..d93410a 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -6,7 +6,6 @@ public class Game { ArrayList players = new ArrayList<>(); ArrayList tempPlayers = new ArrayList<>(); - int[] goldCoins = new int[6]; boolean[] inPenaltyBox = new boolean[6]; LinkedList popQuestions = new LinkedList<>(); From 2d6fb49743af5db4ed8ad12878c1f809a2333f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:23:09 +0800 Subject: [PATCH 24/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=B8=BA=20Pl?= =?UTF-8?q?ayer=20=E5=A2=9E=E5=8A=A0=20isInPenaltyBox=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 2 -- src/main/java/com/adaptionsoft/games/Player.java | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index d93410a..eb14948 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -32,8 +32,6 @@ public String createRockQuestion(int index) { public void addPlayer(String playerName) { players.add(playerName); tempPlayers.add(new Player(playerName)); - inPenaltyBox[howManyPlayers()] = false; - System.out.println(playerName + " was added"); System.out.println("They are player number " + players.size()); } diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index fcab8d4..051b674 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -10,6 +10,7 @@ public class Player { private String name; public int place = 0; public int goldCoin = 0; + public boolean isInPenaltyBox = false; public Player(String name) { this.name = name; From 4df4924d88592b2a18745d22be080541045fed25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:23:56 +0800 Subject: [PATCH 25/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86=20is?= =?UTF-8?q?InPenaltyBox=20=E6=9B=BF=E6=8D=A2=E4=B8=BA=20tempPlayers.get().?= =?UTF-8?q?isInPenaltyBox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index eb14948..43b9957 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -44,7 +44,7 @@ public void roll(int roll) { System.out.println(getCurrentPlayer() + " is the current player"); System.out.println("They have rolled a " + roll); - if (inPenaltyBox[currentPlayer]) { + if (tempPlayers.get(currentPlayer).isInPenaltyBox) { if (roll % 2 != 0) { getOutOfPenaltyBox(); movePlayer(roll); @@ -108,7 +108,7 @@ private int getCurrentPlace() { } public boolean wasCorrectlyAnswered() { - if (inPenaltyBox[currentPlayer]) { + if (tempPlayers.get(currentPlayer).isInPenaltyBox) { if (isGettingOutOfPenaltyBox) { System.out.println("Answer was correct!!!!"); nextPlayer(); @@ -147,7 +147,7 @@ private void nextPlayer() { public boolean wrongAnswer() { System.out.println("Question was incorrectly answered"); System.out.println(getCurrentPlayer() + " was sent to the penalty box"); - inPenaltyBox[currentPlayer] = true; + tempPlayers.get(currentPlayer).isInPenaltyBox = true; nextPlayer(); return true; From 78acc7a8fe5b7a6713921c905e6348ab4c207c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:24:28 +0800 Subject: [PATCH 26/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89isInPenaltyBox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 43b9957..9197f28 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -6,7 +6,6 @@ public class Game { ArrayList players = new ArrayList<>(); ArrayList tempPlayers = new ArrayList<>(); - boolean[] inPenaltyBox = new boolean[6]; LinkedList popQuestions = new LinkedList<>(); LinkedList scienceQuestions = new LinkedList<>(); From a90554f427deaa1edcabfce47021a5e22ee25b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:25:21 +0800 Subject: [PATCH 27/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89howManyPlayers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 9197f28..05aa261 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -35,10 +35,6 @@ public void addPlayer(String playerName) { System.out.println("They are player number " + players.size()); } - public int howManyPlayers() { - return players.size(); - } - public void roll(int roll) { System.out.println(getCurrentPlayer() + " is the current player"); System.out.println("They have rolled a " + roll); From 0b7845460dd17bd13f45deb1199d137bd9f6fe8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:28:39 +0800 Subject: [PATCH 28/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=B8=BA=20Pl?= =?UTF-8?q?ayer=20=E6=B7=BB=E5=8A=A0=20moveTo=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 69 +++++++++---------- .../java/com/adaptionsoft/games/Player.java | 8 +++ 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 05aa261..fdb0ccb 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -54,26 +54,8 @@ public void roll(int roll) { } - private void stayInPenaltyBox() { - isGettingOutOfPenaltyBox = false; - System.out.println(getCurrentPlayer() + " is not getting out of the penalty box"); - } - - private void getOutOfPenaltyBox() { - isGettingOutOfPenaltyBox = true; - System.out.println(getCurrentPlayer() + " is getting out of the penalty box"); - } - - private void movePlayer(int roll) { - tempPlayers.get(currentPlayer).place = getCurrentPlace() + roll; - if (getCurrentPlace() > 11) tempPlayers.get(currentPlayer).place = getCurrentPlace() - 12; - System.out.println(getCurrentPlayer() - + "'s new location is " - + getCurrentPlace()); - System.out.println("The category is " + currentCategory()); - } - private void askQuestion() { + System.out.println("The category is " + currentCategory()); if (currentCategory().equals("Pop")) System.out.println(popQuestions.removeFirst()); if (currentCategory().equals("Science")) @@ -84,7 +66,6 @@ private void askQuestion() { System.out.println(rockQuestions.removeFirst()); } - private String currentCategory() { if (getCurrentPlace() == 0) return "Pop"; if (getCurrentPlace() == 4) return "Pop"; @@ -98,8 +79,9 @@ private String currentCategory() { return "Rock"; } - private int getCurrentPlace() { - return tempPlayers.get(currentPlayer).place; + private void nextPlayer() { + currentPlayer++; + if (currentPlayer == players.size()) currentPlayer = 0; } public boolean wasCorrectlyAnswered() { @@ -126,19 +108,6 @@ public boolean wasCorrectlyAnswered() { } } - private void gainGoldCoin() { - tempPlayers.get(currentPlayer).goldCoin++; - System.out.println(getCurrentPlayer() - + " now has " - + tempPlayers.get(currentPlayer).goldCoin - + " Gold Coins."); - } - - private void nextPlayer() { - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; - } - public boolean wrongAnswer() { System.out.println("Question was incorrectly answered"); System.out.println(getCurrentPlayer() + " was sent to the penalty box"); @@ -148,6 +117,36 @@ public boolean wrongAnswer() { return true; } + private void stayInPenaltyBox() { + isGettingOutOfPenaltyBox = false; + System.out.println(getCurrentPlayer() + " is not getting out of the penalty box"); + } + + private void getOutOfPenaltyBox() { + isGettingOutOfPenaltyBox = true; + System.out.println(getCurrentPlayer() + " is getting out of the penalty box"); + } + + private void movePlayer(int roll) { + tempPlayers.get(currentPlayer).place = getCurrentPlace() + roll; + if (getCurrentPlace() > 11) tempPlayers.get(currentPlayer).place = getCurrentPlace() - 12; + System.out.println(getCurrentPlayer() + + "'s new location is " + + getCurrentPlace()); + } + + private int getCurrentPlace() { + return tempPlayers.get(currentPlayer).place; + } + + private void gainGoldCoin() { + tempPlayers.get(currentPlayer).goldCoin++; + System.out.println(getCurrentPlayer() + + " now has " + + tempPlayers.get(currentPlayer).goldCoin + + " Gold Coins."); + } + private String getCurrentPlayer() { return tempPlayers.get(currentPlayer).getName(); } diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index 051b674..770f80a 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -19,4 +19,12 @@ public Player(String name) { public String getName() { return name; } + + public void moveTo(int roll) { + place += roll; + if (place > 11) { + place -= 12; + } + System.out.println(name + "'s new location is " + place); + } } From 3e78b6e696f5e0a63b773544c93329aae574799c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:29:57 +0800 Subject: [PATCH 29/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86=20mo?= =?UTF-8?q?vePlayer=20=E6=96=B9=E6=B3=95=E6=9B=BF=E6=8D=A2=E4=B8=BA=20temp?= =?UTF-8?q?Players.get(currentPlayer).moveTo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index fdb0ccb..e1b1ffb 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -42,13 +42,13 @@ public void roll(int roll) { if (tempPlayers.get(currentPlayer).isInPenaltyBox) { if (roll % 2 != 0) { getOutOfPenaltyBox(); - movePlayer(roll); + tempPlayers.get(currentPlayer).moveTo(roll); askQuestion(); } else { stayInPenaltyBox(); } } else { - movePlayer(roll); + tempPlayers.get(currentPlayer).moveTo(roll); askQuestion(); } From d8fe7670f0646d140af2332e1ba0b89283341a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:30:28 +0800 Subject: [PATCH 30/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=20movePlayer=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index e1b1ffb..c8f6102 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -51,7 +51,6 @@ public void roll(int roll) { tempPlayers.get(currentPlayer).moveTo(roll); askQuestion(); } - } private void askQuestion() { @@ -127,14 +126,6 @@ private void getOutOfPenaltyBox() { System.out.println(getCurrentPlayer() + " is getting out of the penalty box"); } - private void movePlayer(int roll) { - tempPlayers.get(currentPlayer).place = getCurrentPlace() + roll; - if (getCurrentPlace() > 11) tempPlayers.get(currentPlayer).place = getCurrentPlace() - 12; - System.out.println(getCurrentPlayer() - + "'s new location is " - + getCurrentPlace()); - } - private int getCurrentPlace() { return tempPlayers.get(currentPlayer).place; } From 8db77d83c10770fdbd40c75ccf7bda5599a83c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:33:42 +0800 Subject: [PATCH 31/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=B8=BA=20Pl?= =?UTF-8?q?ayer=20=E6=B7=BB=E5=8A=A0=20gainGoldCoin=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 2 -- src/main/java/com/adaptionsoft/games/Player.java | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index c8f6102..a128313 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -111,7 +111,6 @@ public boolean wrongAnswer() { System.out.println("Question was incorrectly answered"); System.out.println(getCurrentPlayer() + " was sent to the penalty box"); tempPlayers.get(currentPlayer).isInPenaltyBox = true; - nextPlayer(); return true; } @@ -142,7 +141,6 @@ private String getCurrentPlayer() { return tempPlayers.get(currentPlayer).getName(); } - private boolean didPlayerWin() { return !(tempPlayers.get(currentPlayer).goldCoin == 6); } diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index 770f80a..a2fe85c 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -27,4 +27,9 @@ public void moveTo(int roll) { } System.out.println(name + "'s new location is " + place); } + + public void gainGoldCoin() { + goldCoin++; + System.out.println(name + " now has " + goldCoin + " Gold Coins."); + } } From 82382bada94685487c3df94496409ad90ae9ec32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:34:44 +0800 Subject: [PATCH 32/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86=20ga?= =?UTF-8?q?inGoldCoin=20=E6=96=B9=E6=B3=95=E6=9B=BF=E6=8D=A2=E4=B8=BA=20te?= =?UTF-8?q?mpPlayers.get(currentPlayer).gainGoldCoin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index a128313..dbd8eba 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -88,21 +88,17 @@ public boolean wasCorrectlyAnswered() { if (isGettingOutOfPenaltyBox) { System.out.println("Answer was correct!!!!"); nextPlayer(); - gainGoldCoin(); - + tempPlayers.get(currentPlayer).gainGoldCoin(); return didPlayerWin(); } else { nextPlayer(); return true; } } else { - System.out.println("Answer was correct!!!!"); - gainGoldCoin(); - + tempPlayers.get(currentPlayer).gainGoldCoin(); boolean winner = didPlayerWin(); nextPlayer(); - return winner; } } From 92728d7d4f9ad41f8906a9a4d1c4cc5d83c88210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:35:06 +0800 Subject: [PATCH 33/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=20gainGoldCoin=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index dbd8eba..6c52f5c 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -125,14 +125,6 @@ private int getCurrentPlace() { return tempPlayers.get(currentPlayer).place; } - private void gainGoldCoin() { - tempPlayers.get(currentPlayer).goldCoin++; - System.out.println(getCurrentPlayer() - + " now has " - + tempPlayers.get(currentPlayer).goldCoin - + " Gold Coins."); - } - private String getCurrentPlayer() { return tempPlayers.get(currentPlayer).getName(); } From cab7f1cf522cd6a7dba96d77d1b9ae7ff4bad8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:36:17 +0800 Subject: [PATCH 34/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=B8=BA=20Pl?= =?UTF-8?q?ayer=20=E6=B7=BB=E5=8A=A0=20isWin=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Player.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index a2fe85c..1ceca41 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -32,4 +32,8 @@ public void gainGoldCoin() { goldCoin++; System.out.println(name + " now has " + goldCoin + " Gold Coins."); } + + public boolean isWin() { + return goldCoin >= 6; + } } From 6927913000fe5c730566c2565d2f78ce18791ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:37:28 +0800 Subject: [PATCH 35/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86=20di?= =?UTF-8?q?dPlayerWin=20=E6=96=B9=E6=B3=95=E6=9B=BF=E6=8D=A2=E4=B8=BA=20te?= =?UTF-8?q?mpPlayers.get(currentPlayer).isWin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 6c52f5c..0bddfed 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -89,7 +89,7 @@ public boolean wasCorrectlyAnswered() { System.out.println("Answer was correct!!!!"); nextPlayer(); tempPlayers.get(currentPlayer).gainGoldCoin(); - return didPlayerWin(); + return !tempPlayers.get(currentPlayer).isWin(); } else { nextPlayer(); return true; @@ -97,7 +97,7 @@ public boolean wasCorrectlyAnswered() { } else { System.out.println("Answer was correct!!!!"); tempPlayers.get(currentPlayer).gainGoldCoin(); - boolean winner = didPlayerWin(); + boolean winner = !tempPlayers.get(currentPlayer).isWin(); nextPlayer(); return winner; } From e9ca4d8c80ac9ec54960cdd02770bfed7ca65055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:37:57 +0800 Subject: [PATCH 36/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=20didPlayerWin=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 0bddfed..ce90b87 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -129,7 +129,4 @@ private String getCurrentPlayer() { return tempPlayers.get(currentPlayer).getName(); } - private boolean didPlayerWin() { - return !(tempPlayers.get(currentPlayer).goldCoin == 6); - } } From 3c16d88435b15e185380b7c40c737852becbe53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:50:24 +0800 Subject: [PATCH 37/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=88=9B?= =?UTF-8?q?=E5=BB=BAHashMap=20=E7=94=A8=E4=BA=8E=E6=98=A0=E5=B0=84=20Categ?= =?UTF-8?q?ory=20=E5=92=8C=20questionList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Category.java | 10 +++++ .../java/com/adaptionsoft/games/Game.java | 44 +++++++++---------- .../java/com/adaptionsoft/games/Player.java | 2 + 3 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 src/main/java/com/adaptionsoft/games/Category.java diff --git a/src/main/java/com/adaptionsoft/games/Category.java b/src/main/java/com/adaptionsoft/games/Category.java new file mode 100644 index 0000000..e7a54d4 --- /dev/null +++ b/src/main/java/com/adaptionsoft/games/Category.java @@ -0,0 +1,10 @@ +package com.adaptionsoft.games; + +/** + * Created with IntelliJ IDEA. + * User: lai.yi + * Date: 2020/2/2 + * Description: + **/ +public enum Category { +} diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index ce90b87..8ed28aa 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -1,17 +1,18 @@ package com.adaptionsoft.games; import java.util.ArrayList; +import java.util.HashMap; import java.util.LinkedList; public class Game { - ArrayList players = new ArrayList<>(); - ArrayList tempPlayers = new ArrayList<>(); - + ArrayList players = new ArrayList<>(); LinkedList popQuestions = new LinkedList<>(); LinkedList scienceQuestions = new LinkedList<>(); LinkedList sportsQuestions = new LinkedList<>(); LinkedList rockQuestions = new LinkedList<>(); + HashMap> questionMap = new HashMap<>(); + int currentPlayer = 0; boolean isGettingOutOfPenaltyBox; @@ -29,26 +30,24 @@ public String createRockQuestion(int index) { } public void addPlayer(String playerName) { - players.add(playerName); - tempPlayers.add(new Player(playerName)); - System.out.println(playerName + " was added"); + players.add(new Player(playerName)); System.out.println("They are player number " + players.size()); } public void roll(int roll) { - System.out.println(getCurrentPlayer() + " is the current player"); + System.out.println(getCurrentPlayerName() + " is the current player"); System.out.println("They have rolled a " + roll); - if (tempPlayers.get(currentPlayer).isInPenaltyBox) { + if (players.get(currentPlayer).isInPenaltyBox) { if (roll % 2 != 0) { getOutOfPenaltyBox(); - tempPlayers.get(currentPlayer).moveTo(roll); + players.get(currentPlayer).moveTo(roll); askQuestion(); } else { stayInPenaltyBox(); } } else { - tempPlayers.get(currentPlayer).moveTo(roll); + players.get(currentPlayer).moveTo(roll); askQuestion(); } } @@ -84,20 +83,20 @@ private void nextPlayer() { } public boolean wasCorrectlyAnswered() { - if (tempPlayers.get(currentPlayer).isInPenaltyBox) { + if (players.get(currentPlayer).isInPenaltyBox) { if (isGettingOutOfPenaltyBox) { System.out.println("Answer was correct!!!!"); nextPlayer(); - tempPlayers.get(currentPlayer).gainGoldCoin(); - return !tempPlayers.get(currentPlayer).isWin(); + players.get(currentPlayer).gainGoldCoin(); + return !players.get(currentPlayer).isWin(); } else { nextPlayer(); return true; } } else { System.out.println("Answer was correct!!!!"); - tempPlayers.get(currentPlayer).gainGoldCoin(); - boolean winner = !tempPlayers.get(currentPlayer).isWin(); + players.get(currentPlayer).gainGoldCoin(); + boolean winner = !players.get(currentPlayer).isWin(); nextPlayer(); return winner; } @@ -105,28 +104,27 @@ public boolean wasCorrectlyAnswered() { public boolean wrongAnswer() { System.out.println("Question was incorrectly answered"); - System.out.println(getCurrentPlayer() + " was sent to the penalty box"); - tempPlayers.get(currentPlayer).isInPenaltyBox = true; + System.out.println(getCurrentPlayerName() + " was sent to the penalty box"); + players.get(currentPlayer).isInPenaltyBox = true; nextPlayer(); return true; } private void stayInPenaltyBox() { isGettingOutOfPenaltyBox = false; - System.out.println(getCurrentPlayer() + " is not getting out of the penalty box"); + System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); } private void getOutOfPenaltyBox() { isGettingOutOfPenaltyBox = true; - System.out.println(getCurrentPlayer() + " is getting out of the penalty box"); + System.out.println(getCurrentPlayerName() + " is getting out of the penalty box"); } private int getCurrentPlace() { - return tempPlayers.get(currentPlayer).place; + return players.get(currentPlayer).place; } - private String getCurrentPlayer() { - return tempPlayers.get(currentPlayer).getName(); + private String getCurrentPlayerName() { + return players.get(currentPlayer).getName(); } - } diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index 1ceca41..f7dd787 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -12,7 +12,9 @@ public class Player { public int goldCoin = 0; public boolean isInPenaltyBox = false; + public Player(String name) { + System.out.println(name + " was added"); this.name = name; } From a866404efbc28ad5dc79f21904c07db53ac5f882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 13:54:10 +0800 Subject: [PATCH 38/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=B8=BACateg?= =?UTF-8?q?ory=E6=B7=BB=E5=8A=A04=E7=A7=8D=E6=9E=9A=E4=B8=BE=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E5=B9=B6=E5=9C=A8Game=E6=9E=84=E9=80=A0?= =?UTF-8?q?=E5=99=A8=E4=B8=AD=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Category.java | 11 +++++++++++ src/main/java/com/adaptionsoft/games/Game.java | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/Category.java b/src/main/java/com/adaptionsoft/games/Category.java index e7a54d4..511bd93 100644 --- a/src/main/java/com/adaptionsoft/games/Category.java +++ b/src/main/java/com/adaptionsoft/games/Category.java @@ -7,4 +7,15 @@ * Description: **/ public enum Category { + POP("Pop"), SCIENCE("Science"), SPORTS("Sports"), ROCK("Rock"); + + private String value; + + Category(String value) { + this.value = value; + } + + public String getValue() { + return value; + } } diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 8ed28aa..0496414 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -23,6 +23,11 @@ public Game() { sportsQuestions.addLast(("Sports Question " + i)); rockQuestions.addLast(createRockQuestion(i)); } + + questionMap.put(Category.POP, popQuestions); + questionMap.put(Category.SCIENCE, scienceQuestions); + questionMap.put(Category.SPORTS, scienceQuestions); + questionMap.put(Category.ROCK, rockQuestions); } public String createRockQuestion(int index) { From 4a7f0f96d294ee8b450d752b97c1e6e0e2e3adb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:00:13 +0800 Subject: [PATCH 39/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86askQu?= =?UTF-8?q?estion=E4=B8=AD=E7=9B=B4=E6=8E=A5=E4=BB=8Elist=E4=B8=AD?= =?UTF-8?q?=E5=8F=96=E5=80=BC=20=E6=9B=BF=E6=8D=A2=E4=B8=BA=E9=80=9A?= =?UTF-8?q?=E8=BF=87map=E5=8F=96=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 0496414..5e4dbec 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -26,7 +26,7 @@ public Game() { questionMap.put(Category.POP, popQuestions); questionMap.put(Category.SCIENCE, scienceQuestions); - questionMap.put(Category.SPORTS, scienceQuestions); + questionMap.put(Category.SPORTS, sportsQuestions); questionMap.put(Category.ROCK, rockQuestions); } @@ -58,15 +58,16 @@ public void roll(int roll) { } private void askQuestion() { - System.out.println("The category is " + currentCategory()); - if (currentCategory().equals("Pop")) - System.out.println(popQuestions.removeFirst()); - if (currentCategory().equals("Science")) - System.out.println(scienceQuestions.removeFirst()); - if (currentCategory().equals("Sports")) - System.out.println(sportsQuestions.removeFirst()); - if (currentCategory().equals("Rock")) - System.out.println(rockQuestions.removeFirst()); + String currentCategory = currentCategory(); + System.out.println("The category is " + currentCategory); + if (currentCategory.equals("Pop")) + System.out.println(questionMap.get(Category.POP).removeFirst()); + if (currentCategory.equals("Science")) + System.out.println(questionMap.get(Category.SCIENCE).removeFirst()); + if (currentCategory.equals("Sports")) + System.out.println(questionMap.get(Category.SPORTS).removeFirst()); + if (currentCategory.equals("Rock")) + System.out.println(questionMap.get(Category.ROCK).removeFirst()); } private String currentCategory() { From 0a6257459dfc788c3b997afd27359af75cf8a4a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:00:51 +0800 Subject: [PATCH 40/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=864?= =?UTF-8?q?=E4=B8=AAlist=E5=8F=98=E4=B8=BA=E5=B1=80=E9=83=A8=E5=8F=98?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E5=B0=81=E8=A3=85=E8=BF=9BMap=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 5e4dbec..bead9b8 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -6,24 +6,22 @@ public class Game { ArrayList players = new ArrayList<>(); - LinkedList popQuestions = new LinkedList<>(); - LinkedList scienceQuestions = new LinkedList<>(); - LinkedList sportsQuestions = new LinkedList<>(); - LinkedList rockQuestions = new LinkedList<>(); - HashMap> questionMap = new HashMap<>(); int currentPlayer = 0; boolean isGettingOutOfPenaltyBox; public Game() { + LinkedList popQuestions = new LinkedList<>(); + LinkedList scienceQuestions = new LinkedList<>(); + LinkedList sportsQuestions = new LinkedList<>(); + LinkedList rockQuestions = new LinkedList<>(); for (int i = 0; i < 50; i++) { popQuestions.addLast("Pop Question " + i); scienceQuestions.addLast(("Science Question " + i)); sportsQuestions.addLast(("Sports Question " + i)); rockQuestions.addLast(createRockQuestion(i)); } - questionMap.put(Category.POP, popQuestions); questionMap.put(Category.SCIENCE, scienceQuestions); questionMap.put(Category.SPORTS, sportsQuestions); From d6fff94b9e4acd311d5648b1a000f1c623124eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:04:30 +0800 Subject: [PATCH 41/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E5=88=9D=E5=A7=8B=E5=8C=96Map=E6=97=B6=E5=88=9B?= =?UTF-8?q?=E5=BB=BAlist=E7=9A=84=E9=87=8D=E5=A4=8D=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index bead9b8..959c751 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -12,20 +12,14 @@ public class Game { boolean isGettingOutOfPenaltyBox; public Game() { - LinkedList popQuestions = new LinkedList<>(); - LinkedList scienceQuestions = new LinkedList<>(); - LinkedList sportsQuestions = new LinkedList<>(); - LinkedList rockQuestions = new LinkedList<>(); - for (int i = 0; i < 50; i++) { - popQuestions.addLast("Pop Question " + i); - scienceQuestions.addLast(("Science Question " + i)); - sportsQuestions.addLast(("Sports Question " + i)); - rockQuestions.addLast(createRockQuestion(i)); + for (Category category : Category.values()) { + LinkedList list = new LinkedList<>(); + for (int i = 0; i < 50; i++) { + String question = category.getValue() + " Question " + i; + list.addLast(question); + } + questionMap.put(category, list); } - questionMap.put(Category.POP, popQuestions); - questionMap.put(Category.SCIENCE, scienceQuestions); - questionMap.put(Category.SPORTS, sportsQuestions); - questionMap.put(Category.ROCK, rockQuestions); } public String createRockQuestion(int index) { From ef9011bfe39b2c8265bb69556546196aae099926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:04:55 +0800 Subject: [PATCH 42/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E5=A4=9A=E4=BD=99=E7=9A=84=20createRockQuestion=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 959c751..2b957f4 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -22,10 +22,6 @@ public Game() { } } - public String createRockQuestion(int index) { - return "Rock Question " + index; - } - public void addPlayer(String playerName) { players.add(new Player(playerName)); System.out.println("They are player number " + players.size()); From 6305fc28790d1949072944ed3b22cf6a0673c12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:07:17 +0800 Subject: [PATCH 43/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20tempCurrentCategory=20=E6=96=B9=E6=B3=95=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9ECategory=E7=B1=BB=E5=9E=8B=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 2b957f4..ebfec62 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -71,6 +71,19 @@ private String currentCategory() { return "Rock"; } + private Category tempCurrentCategory() { + if (getCurrentPlace() == 0) return Category.POP; + if (getCurrentPlace() == 4) return Category.POP; + if (getCurrentPlace() == 8) return Category.POP; + if (getCurrentPlace() == 1) return Category.SCIENCE; + if (getCurrentPlace() == 5) return Category.SCIENCE; + if (getCurrentPlace() == 9) return Category.SCIENCE; + if (getCurrentPlace() == 2) return Category.SPORTS; + if (getCurrentPlace() == 6) return Category.SPORTS; + if (getCurrentPlace() == 10) return Category.SPORTS; + return Category.ROCK; + } + private void nextPlayer() { currentPlayer++; if (currentPlayer == players.size()) currentPlayer = 0; From f0ca7d3395293ef0ed0432f8aae579b1c6591a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:11:12 +0800 Subject: [PATCH 44/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20tempAskQuestion=20=E6=96=B9=E6=B3=95=20=E8=B0=83?= =?UTF-8?q?=E7=94=A8tempCurrentCategory=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index ebfec62..758a420 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -35,13 +35,13 @@ public void roll(int roll) { if (roll % 2 != 0) { getOutOfPenaltyBox(); players.get(currentPlayer).moveTo(roll); - askQuestion(); + tempAskQuestion(); } else { stayInPenaltyBox(); } } else { players.get(currentPlayer).moveTo(roll); - askQuestion(); + tempAskQuestion(); } } @@ -58,6 +58,12 @@ private void askQuestion() { System.out.println(questionMap.get(Category.ROCK).removeFirst()); } + private void tempAskQuestion() { + Category currentCategory = tempCurrentCategory(); + System.out.println("The category is " + currentCategory.getValue()); + System.out.println(questionMap.get(currentCategory).removeFirst()); + } + private String currentCategory() { if (getCurrentPlace() == 0) return "Pop"; if (getCurrentPlace() == 4) return "Pop"; From afb19cbc728e6c35e6bf1e0348ff092007073bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:12:26 +0800 Subject: [PATCH 45/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E8=B0=83=E7=94=A8=20askQuestion=20=E4=B8=BA=20tempAsk?= =?UTF-8?q?Question?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 758a420..adbbe56 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -45,38 +45,12 @@ public void roll(int roll) { } } - private void askQuestion() { - String currentCategory = currentCategory(); - System.out.println("The category is " + currentCategory); - if (currentCategory.equals("Pop")) - System.out.println(questionMap.get(Category.POP).removeFirst()); - if (currentCategory.equals("Science")) - System.out.println(questionMap.get(Category.SCIENCE).removeFirst()); - if (currentCategory.equals("Sports")) - System.out.println(questionMap.get(Category.SPORTS).removeFirst()); - if (currentCategory.equals("Rock")) - System.out.println(questionMap.get(Category.ROCK).removeFirst()); - } - private void tempAskQuestion() { Category currentCategory = tempCurrentCategory(); System.out.println("The category is " + currentCategory.getValue()); System.out.println(questionMap.get(currentCategory).removeFirst()); } - private String currentCategory() { - if (getCurrentPlace() == 0) return "Pop"; - if (getCurrentPlace() == 4) return "Pop"; - if (getCurrentPlace() == 8) return "Pop"; - if (getCurrentPlace() == 1) return "Science"; - if (getCurrentPlace() == 5) return "Science"; - if (getCurrentPlace() == 9) return "Science"; - if (getCurrentPlace() == 2) return "Sports"; - if (getCurrentPlace() == 6) return "Sports"; - if (getCurrentPlace() == 10) return "Sports"; - return "Rock"; - } - private Category tempCurrentCategory() { if (getCurrentPlace() == 0) return Category.POP; if (getCurrentPlace() == 4) return Category.POP; From a54afe70971a57396c3744e02d8023765c9abe1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:13:20 +0800 Subject: [PATCH 46/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8D=20tempCurrentCategory->currentCategory,=20te?= =?UTF-8?q?mpAskQuestion->askQuestion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index adbbe56..c4d4631 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -35,23 +35,23 @@ public void roll(int roll) { if (roll % 2 != 0) { getOutOfPenaltyBox(); players.get(currentPlayer).moveTo(roll); - tempAskQuestion(); + askQuestion(); } else { stayInPenaltyBox(); } } else { players.get(currentPlayer).moveTo(roll); - tempAskQuestion(); + askQuestion(); } } - private void tempAskQuestion() { - Category currentCategory = tempCurrentCategory(); + private void askQuestion() { + Category currentCategory = currentCategory(); System.out.println("The category is " + currentCategory.getValue()); System.out.println(questionMap.get(currentCategory).removeFirst()); } - private Category tempCurrentCategory() { + private Category currentCategory() { if (getCurrentPlace() == 0) return Category.POP; if (getCurrentPlace() == 4) return Category.POP; if (getCurrentPlace() == 8) return Category.POP; From 5890455b2666abaf4067f58b069a939289b904ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:16:09 +0800 Subject: [PATCH 47/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89currentCategory=E6=96=B9=E6=B3=95=E4=B8=AD=E9=87=8D?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index c4d4631..cf8bc51 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -52,16 +52,8 @@ private void askQuestion() { } private Category currentCategory() { - if (getCurrentPlace() == 0) return Category.POP; - if (getCurrentPlace() == 4) return Category.POP; - if (getCurrentPlace() == 8) return Category.POP; - if (getCurrentPlace() == 1) return Category.SCIENCE; - if (getCurrentPlace() == 5) return Category.SCIENCE; - if (getCurrentPlace() == 9) return Category.SCIENCE; - if (getCurrentPlace() == 2) return Category.SPORTS; - if (getCurrentPlace() == 6) return Category.SPORTS; - if (getCurrentPlace() == 10) return Category.SPORTS; - return Category.ROCK; + int index = getCurrentPlace() % Category.values().length; + return Category.values()[index]; } private void nextPlayer() { From 004933f85865adcf4e6ea0b43bd2d7599d28e176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:26:03 +0800 Subject: [PATCH 48/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=B8=BA=20Ga?= =?UTF-8?q?me=20=E6=B7=BB=E5=8A=A0=20run=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index cf8bc51..a296091 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -3,6 +3,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; +import java.util.Random; public class Game { ArrayList players = new ArrayList<>(); @@ -22,6 +23,19 @@ public Game() { } } + public void run(Random rand) { + boolean notAWinner; + do { + roll(rand.nextInt(5) + 1); + + if (rand.nextInt(9) == 7) { + notAWinner = wrongAnswer(); + } else { + notAWinner = wasCorrectlyAnswered(); + } + } while (notAWinner); + } + public void addPlayer(String playerName) { players.add(new Player(playerName)); System.out.println("They are player number " + players.size()); From bd72a5a362b29d8e4746d0cf9f4411f79ff3dead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:29:34 +0800 Subject: [PATCH 49/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89GameRunner=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/adaptionsoft/games/GameRunner.java | 39 ------------------- .../java/com/adaptionsoft/games/GameTest.java | 15 ++++--- 2 files changed, 10 insertions(+), 44 deletions(-) delete mode 100644 src/main/java/com/adaptionsoft/games/GameRunner.java diff --git a/src/main/java/com/adaptionsoft/games/GameRunner.java b/src/main/java/com/adaptionsoft/games/GameRunner.java deleted file mode 100644 index 86c6045..0000000 --- a/src/main/java/com/adaptionsoft/games/GameRunner.java +++ /dev/null @@ -1,39 +0,0 @@ - -package com.adaptionsoft.games; - -import java.util.Random; - - -public class GameRunner { - - private static boolean notAWinner; - - public static void main(String[] args) { - Random rand = new Random(); - playGame(rand); - - } - - public static void playGame(Random rand) { - Game aGame = new Game(); - - aGame.addPlayer("Chet"); - aGame.addPlayer("Pat"); - aGame.addPlayer("Sue"); - - - do { - - aGame.roll(rand.nextInt(5) + 1); - - if (rand.nextInt(9) == 7) { - notAWinner = aGame.wrongAnswer(); - } else { - notAWinner = aGame.wasCorrectlyAnswered(); - } - - - - } while (notAWinner); - } -} diff --git a/src/test/java/com/adaptionsoft/games/GameTest.java b/src/test/java/com/adaptionsoft/games/GameTest.java index dae9a93..cf794b6 100644 --- a/src/test/java/com/adaptionsoft/games/GameTest.java +++ b/src/test/java/com/adaptionsoft/games/GameTest.java @@ -10,16 +10,21 @@ public class GameTest { - @Test - public void itsLockedDown() throws Exception { + @Test + public void itsLockedDown() throws Exception { Random randomizer = new Random(123455); ByteArrayOutputStream resultStream = new ByteArrayOutputStream(); System.setOut(new PrintStream(resultStream)); - IntStream.range(1,15).forEach(i -> GameRunner.playGame(randomizer)); - + IntStream.range(1, 15).forEach(i -> { + Game aGame = new Game(); + aGame.addPlayer("Chet"); + aGame.addPlayer("Pat"); + aGame.addPlayer("Sue"); + aGame.run(randomizer); + }); Approvals.verify(resultStream.toString()); - } + } } From 650cb40be4bb24a8bb91051c94d0a8244136b598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:46:58 +0800 Subject: [PATCH 50/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86do=20?= =?UTF-8?q?while=20=E6=8D=A2=E4=B8=BA=20while?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index a296091..a35a9ce 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -24,16 +24,15 @@ public Game() { } public void run(Random rand) { - boolean notAWinner; - do { + boolean notAWinner = true; + while (notAWinner) { roll(rand.nextInt(5) + 1); - if (rand.nextInt(9) == 7) { notAWinner = wrongAnswer(); } else { notAWinner = wasCorrectlyAnswered(); } - } while (notAWinner); + } } public void addPlayer(String playerName) { From 740333b14457aff86db3fb55ba30a2fe1cb3990d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:48:43 +0800 Subject: [PATCH 51/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E5=8F=96sendToPenaltyBox=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index a35a9ce..9cff52f 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -27,6 +27,7 @@ public void run(Random rand) { boolean notAWinner = true; while (notAWinner) { roll(rand.nextInt(5) + 1); + if (rand.nextInt(9) == 7) { notAWinner = wrongAnswer(); } else { @@ -96,12 +97,16 @@ public boolean wasCorrectlyAnswered() { public boolean wrongAnswer() { System.out.println("Question was incorrectly answered"); - System.out.println(getCurrentPlayerName() + " was sent to the penalty box"); - players.get(currentPlayer).isInPenaltyBox = true; + sendToPenaltyBox(); nextPlayer(); return true; } + private void sendToPenaltyBox() { + System.out.println(getCurrentPlayerName() + " was sent to the penalty box"); + players.get(currentPlayer).isInPenaltyBox = true; + } + private void stayInPenaltyBox() { isGettingOutOfPenaltyBox = false; System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); From a2a6577798ec898016296f25931ffbffaea150fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:49:45 +0800 Subject: [PATCH 52/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89wrongAnswer=20=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 9cff52f..18db0f5 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -29,7 +29,7 @@ public void run(Random rand) { roll(rand.nextInt(5) + 1); if (rand.nextInt(9) == 7) { - notAWinner = wrongAnswer(); + wrongAnswer(); } else { notAWinner = wasCorrectlyAnswered(); } @@ -95,11 +95,10 @@ public boolean wasCorrectlyAnswered() { } } - public boolean wrongAnswer() { + public void wrongAnswer() { System.out.println("Question was incorrectly answered"); sendToPenaltyBox(); nextPlayer(); - return true; } private void sendToPenaltyBox() { From 9a60576a6cfdc463ffba41babd287ad263d7c31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:50:30 +0800 Subject: [PATCH 53/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8DwasCorrectlyAnswered->correctAnswer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 18db0f5..163b06d 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -31,7 +31,7 @@ public void run(Random rand) { if (rand.nextInt(9) == 7) { wrongAnswer(); } else { - notAWinner = wasCorrectlyAnswered(); + notAWinner = correctAnswer(); } } } @@ -75,7 +75,7 @@ private void nextPlayer() { if (currentPlayer == players.size()) currentPlayer = 0; } - public boolean wasCorrectlyAnswered() { + public boolean correctAnswer() { if (players.get(currentPlayer).isInPenaltyBox) { if (isGettingOutOfPenaltyBox) { System.out.println("Answer was correct!!!!"); From cd63eef4310b5183f6faa802a306d958fc6d60cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 14:56:26 +0800 Subject: [PATCH 54/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86nextP?= =?UTF-8?q?layer()=E7=A7=BB=E5=8A=A8=E5=88=B0while=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E4=B8=AD=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 8 +- .../games/GameTest.itsLockedDown.approved.txt | 1783 ++++++++++------- 2 files changed, 1048 insertions(+), 743 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 163b06d..52fe878 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -33,6 +33,7 @@ public void run(Random rand) { } else { notAWinner = correctAnswer(); } + nextPlayer(); } } @@ -79,26 +80,21 @@ public boolean correctAnswer() { if (players.get(currentPlayer).isInPenaltyBox) { if (isGettingOutOfPenaltyBox) { System.out.println("Answer was correct!!!!"); - nextPlayer(); players.get(currentPlayer).gainGoldCoin(); return !players.get(currentPlayer).isWin(); } else { - nextPlayer(); return true; } } else { System.out.println("Answer was correct!!!!"); players.get(currentPlayer).gainGoldCoin(); - boolean winner = !players.get(currentPlayer).isWin(); - nextPlayer(); - return winner; + return !players.get(currentPlayer).isWin(); } } public void wrongAnswer() { System.out.println("Question was incorrectly answered"); sendToPenaltyBox(); - nextPlayer(); } private void sendToPenaltyBox() { diff --git a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt index e591478..c75f80e 100644 --- a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt +++ b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt @@ -109,6 +109,13 @@ Sue's new location is 8 The category is Pop Pop Question 3 Answer was correct!!!! +Sue now has 4 Gold Coins. +Chet is the current player +They have rolled a 2 +Chet's new location is 8 +The category is Pop +Pop Question 4 +Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added They are player number 1 @@ -117,316 +124,286 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 2 -Chet's new location is 2 -The category is Sports -Sports Question 0 +They have rolled a 1 +Chet's new location is 1 +The category is Science +Science Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 1 The category is Science -Science Question 0 +Science Question 1 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 1 -The category is Science -Science Question 1 +They have rolled a 3 +Sue's new location is 3 +The category is Rock +Rock Question 0 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 3 -Chet's new location is 5 -The category is Science -Science Question 2 -Answer was correct!!!! -Chet now has 2 Gold Coins. -Pat is the current player They have rolled a 2 -Pat's new location is 3 +Chet's new location is 3 The category is Rock -Rock Question 0 +Rock Question 1 Question was incorrectly answered -Pat was sent to the penalty box -Sue is the current player +Chet was sent to the penalty box +Pat is the current player They have rolled a 3 -Sue's new location is 4 +Pat's new location is 4 The category is Pop Pop Question 0 Answer was correct!!!! -Sue now has 2 Gold Coins. -Chet is the current player -They have rolled a 5 -Chet's new location is 10 -The category is Sports -Sports Question 1 -Answer was correct!!!! -Chet now has 3 Gold Coins. -Pat is the current player -They have rolled a 5 -Pat is getting out of the penalty box -Pat's new location is 8 -The category is Pop -Pop Question 1 -Question was incorrectly answered -Pat was sent to the penalty box +Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 4 +They have rolled a 5 Sue's new location is 8 The category is Pop -Pop Question 2 +Pop Question 1 Answer was correct!!!! -Sue now has 3 Gold Coins. +Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 2 -Chet's new location is 0 +They have rolled a 5 +Chet is getting out of the penalty box +Chet's new location is 8 The category is Pop -Pop Question 3 +Pop Question 2 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 4 -Pat is not getting out of the penalty box -Sue is the current player -They have rolled a 1 -Sue's new location is 9 -The category is Science -Science Question 3 +Pat's new location is 8 +The category is Pop +Pop Question 3 Answer was correct!!!! -Sue now has 4 Gold Coins. +Pat now has 3 Gold Coins. +Sue is the current player +They have rolled a 2 +Sue's new location is 10 +The category is Sports +Sports Question 0 +Question was incorrectly answered +Sue was sent to the penalty box Chet is the current player They have rolled a 4 Chet is not getting out of the penalty box Pat is the current player +They have rolled a 1 +Pat's new location is 9 +The category is Science +Science Question 2 +Answer was correct!!!! +Pat now has 4 Gold Coins. +Sue is the current player +They have rolled a 4 +Sue is not getting out of the penalty box +Chet is the current player They have rolled a 3 -Pat is getting out of the penalty box -Pat's new location is 11 +Chet is getting out of the penalty box +Chet's new location is 11 The category is Rock -Rock Question 1 +Rock Question 2 Answer was correct!!!! -Sue now has 5 Gold Coins. -Sue is the current player +Chet now has 2 Gold Coins. +Pat is the current player They have rolled a 5 -Sue's new location is 2 +Pat's new location is 2 The category is Sports -Sports Question 2 +Sports Question 1 Answer was correct!!!! -Sue now has 6 Gold Coins. -Chet was added -They are player number 1 -Pat was added -They are player number 2 -Sue was added -They are player number 3 -Chet is the current player +Pat now has 5 Gold Coins. +Sue is the current player They have rolled a 1 -Chet's new location is 1 -The category is Science -Science Question 0 +Sue is getting out of the penalty box +Sue's new location is 11 +The category is Rock +Rock Question 3 Answer was correct!!!! -Chet now has 1 Gold Coins. -Pat is the current player +Sue now has 3 Gold Coins. +Chet is the current player They have rolled a 5 -Pat's new location is 5 -The category is Science -Science Question 1 +Chet is getting out of the penalty box +Chet's new location is 4 +The category is Pop +Pop Question 4 Answer was correct!!!! -Pat now has 1 Gold Coins. -Sue is the current player +Chet now has 3 Gold Coins. +Pat is the current player They have rolled a 1 -Sue's new location is 1 -The category is Science -Science Question 2 +Pat's new location is 3 +The category is Rock +Rock Question 4 Answer was correct!!!! -Sue now has 1 Gold Coins. +Pat now has 6 Gold Coins. +Chet was added +They are player number 1 +Pat was added +They are player number 2 +Sue was added +They are player number 3 Chet is the current player They have rolled a 4 -Chet's new location is 5 -The category is Science -Science Question 3 +Chet's new location is 4 +The category is Pop +Pop Question 0 Answer was correct!!!! -Chet now has 2 Gold Coins. +Chet now has 1 Gold Coins. Pat is the current player They have rolled a 3 -Pat's new location is 8 -The category is Pop -Pop Question 0 +Pat's new location is 3 +The category is Rock +Rock Question 0 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 2 -Sue's new location is 3 -The category is Rock -Rock Question 0 +Sue's new location is 2 +The category is Sports +Sports Question 0 Answer was correct!!!! -Sue now has 2 Gold Coins. +Sue now has 1 Gold Coins. Chet is the current player They have rolled a 4 -Chet's new location is 9 -The category is Science -Science Question 4 +Chet's new location is 8 +The category is Pop +Pop Question 1 Answer was correct!!!! -Chet now has 3 Gold Coins. +Chet now has 2 Gold Coins. Pat is the current player They have rolled a 5 Pat is getting out of the penalty box -Pat's new location is 1 -The category is Science -Science Question 5 +Pat's new location is 8 +The category is Pop +Pop Question 2 Answer was correct!!!! -Sue now has 3 Gold Coins. +Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 -Sue's new location is 7 -The category is Rock -Rock Question 1 +Sue's new location is 6 +The category is Sports +Sports Question 1 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 3 -Chet's new location is 0 -The category is Pop -Pop Question 1 +Chet's new location is 11 +The category is Rock +Rock Question 1 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 3 Pat is getting out of the penalty box -Pat's new location is 4 -The category is Pop -Pop Question 2 +Pat's new location is 11 +The category is Rock +Rock Question 2 Answer was correct!!!! -Sue now has 4 Gold Coins. +Pat now has 2 Gold Coins. Sue is the current player They have rolled a 5 Sue is getting out of the penalty box -Sue's new location is 0 -The category is Pop -Pop Question 3 +Sue's new location is 11 +The category is Rock +Rock Question 3 Answer was correct!!!! -Chet now has 4 Gold Coins. +Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 Chet is not getting out of the penalty box Pat is the current player They have rolled a 5 Pat is getting out of the penalty box -Pat's new location is 9 -The category is Science -Science Question 6 +Pat's new location is 4 +The category is Pop +Pop Question 3 Answer was correct!!!! -Sue now has 5 Gold Coins. +Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 Sue is getting out of the penalty box -Sue's new location is 5 -The category is Science -Science Question 7 +Sue's new location is 4 +The category is Pop +Pop Question 4 Answer was correct!!!! -Chet now has 5 Gold Coins. +Sue now has 3 Gold Coins. Chet is the current player They have rolled a 4 Chet is not getting out of the penalty box Pat is the current player They have rolled a 3 Pat is getting out of the penalty box -Pat's new location is 0 -The category is Pop -Pop Question 4 +Pat's new location is 7 +The category is Rock +Rock Question 4 Answer was correct!!!! -Sue now has 6 Gold Coins. -Chet was added -They are player number 1 -Pat was added -They are player number 2 -Sue was added -They are player number 3 -Chet is the current player +Pat now has 4 Gold Coins. +Sue is the current player They have rolled a 1 -Chet's new location is 1 +Sue is getting out of the penalty box +Sue's new location is 5 The category is Science Science Question 0 Question was incorrectly answered -Chet was sent to the penalty box -Pat is the current player +Sue was sent to the penalty box +Chet is the current player They have rolled a 4 -Pat's new location is 4 -The category is Pop -Pop Question 0 -Answer was correct!!!! -Pat now has 1 Gold Coins. +Chet is not getting out of the penalty box +Pat is the current player +They have rolled a 2 +Pat is not getting out of the penalty box Sue is the current player They have rolled a 2 -Sue's new location is 2 -The category is Sports -Sports Question 0 -Answer was correct!!!! -Sue now has 1 Gold Coins. +Sue is not getting out of the penalty box Chet is the current player -They have rolled a 2 -Chet is not getting out of the penalty box -Pat is the current player They have rolled a 3 -Pat's new location is 7 -The category is Rock -Rock Question 0 -Answer was correct!!!! -Pat now has 2 Gold Coins. -Sue is the current player -They have rolled a 4 -Sue's new location is 6 +Chet is getting out of the penalty box +Chet's new location is 2 The category is Sports -Sports Question 1 +Sports Question 2 Answer was correct!!!! -Sue now has 2 Gold Coins. -Chet is the current player -They have rolled a 2 -Chet is not getting out of the penalty box +Chet now has 3 Gold Coins. Pat is the current player They have rolled a 4 -Pat's new location is 11 -The category is Rock -Rock Question 1 -Answer was correct!!!! -Pat now has 3 Gold Coins. +Pat is not getting out of the penalty box Sue is the current player -They have rolled a 3 -Sue's new location is 9 -The category is Science -Science Question 1 -Answer was correct!!!! -Sue now has 3 Gold Coins. +They have rolled a 2 +Sue is not getting out of the penalty box Chet is the current player -They have rolled a 3 -Chet is getting out of the penalty box -Chet's new location is 4 -The category is Pop -Pop Question 1 -Answer was correct!!!! -Pat now has 4 Gold Coins. +They have rolled a 4 +Chet is not getting out of the penalty box Pat is the current player -They have rolled a 1 -Pat's new location is 0 -The category is Pop -Pop Question 2 +They have rolled a 3 +Pat is getting out of the penalty box +Pat's new location is 10 +The category is Sports +Sports Question 3 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player -They have rolled a 5 -Sue's new location is 2 -The category is Sports -Sports Question 2 +They have rolled a 3 +Sue is getting out of the penalty box +Sue's new location is 8 +The category is Pop +Pop Question 5 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player -They have rolled a 5 +They have rolled a 1 Chet is getting out of the penalty box -Chet's new location is 9 -The category is Science -Science Question 2 +Chet's new location is 3 +The category is Rock +Rock Question 5 +Answer was correct!!!! +Chet now has 4 Gold Coins. +Pat is the current player +They have rolled a 5 +Pat is getting out of the penalty box +Pat's new location is 3 +The category is Rock +Rock Question 6 Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added @@ -436,77 +413,120 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player +They have rolled a 5 +Chet's new location is 5 +The category is Science +Science Question 0 +Answer was correct!!!! +Chet now has 1 Gold Coins. +Pat is the current player They have rolled a 4 -Chet's new location is 4 +Pat's new location is 4 The category is Pop Pop Question 0 Question was incorrectly answered -Chet was sent to the penalty box -Pat is the current player +Pat was sent to the penalty box +Sue is the current player They have rolled a 3 -Pat's new location is 3 +Sue's new location is 3 The category is Rock Rock Question 0 Answer was correct!!!! -Pat now has 1 Gold Coins. -Sue is the current player +Sue now has 1 Gold Coins. +Chet is the current player They have rolled a 5 -Sue's new location is 5 -The category is Science -Science Question 0 +Chet's new location is 10 +The category is Sports +Sports Question 0 Question was incorrectly answered -Sue was sent to the penalty box -Chet is the current player +Chet was sent to the penalty box +Pat is the current player They have rolled a 1 -Chet is getting out of the penalty box -Chet's new location is 5 +Pat is getting out of the penalty box +Pat's new location is 5 The category is Science Science Question 1 Answer was correct!!!! -Pat now has 2 Gold Coins. -Pat is the current player +Pat now has 1 Gold Coins. +Sue is the current player They have rolled a 2 -Pat's new location is 5 +Sue's new location is 5 The category is Science Science Question 2 Answer was correct!!!! -Pat now has 3 Gold Coins. -Sue is the current player -They have rolled a 2 -Sue is not getting out of the penalty box +Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 4 +They have rolled a 2 Chet is not getting out of the penalty box Pat is the current player +They have rolled a 4 +Pat is not getting out of the penalty box +Sue is the current player They have rolled a 3 -Pat's new location is 8 +Sue's new location is 8 The category is Pop Pop Question 1 Answer was correct!!!! -Pat now has 4 Gold Coins. -Sue is the current player +Sue now has 3 Gold Coins. +Chet is the current player They have rolled a 5 -Sue is getting out of the penalty box -Sue's new location is 10 -The category is Sports -Sports Question 0 +Chet is getting out of the penalty box +Chet's new location is 3 +The category is Rock +Rock Question 1 Answer was correct!!!! -Chet now has 1 Gold Coins. -Chet is the current player +Chet now has 2 Gold Coins. +Pat is the current player They have rolled a 3 -Chet is getting out of the penalty box -Chet's new location is 8 +Pat is getting out of the penalty box +Pat's new location is 8 The category is Pop Pop Question 2 Answer was correct!!!! -Pat now has 5 Gold Coins. -Pat is the current player +Pat now has 2 Gold Coins. +Sue is the current player They have rolled a 1 -Pat's new location is 9 +Sue's new location is 9 The category is Science Science Question 3 Answer was correct!!!! -Pat now has 6 Gold Coins. +Sue now has 4 Gold Coins. +Chet is the current player +They have rolled a 4 +Chet is not getting out of the penalty box +Pat is the current player +They have rolled a 5 +Pat is getting out of the penalty box +Pat's new location is 1 +The category is Science +Science Question 4 +Answer was correct!!!! +Pat now has 3 Gold Coins. +Sue is the current player +They have rolled a 4 +Sue's new location is 1 +The category is Science +Science Question 5 +Answer was correct!!!! +Sue now has 5 Gold Coins. +Chet is the current player +They have rolled a 1 +Chet is getting out of the penalty box +Chet's new location is 4 +The category is Pop +Pop Question 3 +Answer was correct!!!! +Chet now has 3 Gold Coins. +Pat is the current player +They have rolled a 4 +Pat is not getting out of the penalty box +Sue is the current player +They have rolled a 3 +Sue's new location is 4 +The category is Pop +Pop Question 4 +Answer was correct!!!! +Sue now has 6 Gold Coins. Chet was added They are player number 1 Pat was added @@ -514,10 +534,10 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 4 -Chet's new location is 4 -The category is Pop -Pop Question 0 +They have rolled a 3 +Chet's new location is 3 +The category is Rock +Rock Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player @@ -528,14 +548,14 @@ Science Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player -They have rolled a 4 -Sue's new location is 4 -The category is Pop -Pop Question 1 +They have rolled a 2 +Sue's new location is 2 +The category is Sports +Sports Question 0 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 1 +They have rolled a 2 Chet's new location is 5 The category is Science Science Question 1 @@ -546,76 +566,70 @@ They have rolled a 4 Pat's new location is 9 The category is Science Science Question 2 -Answer was correct!!!! -Pat now has 2 Gold Coins. +Question was incorrectly answered +Pat was sent to the penalty box Sue is the current player -They have rolled a 3 +They have rolled a 5 Sue's new location is 7 The category is Rock -Rock Question 0 +Rock Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 3 -Chet's new location is 8 -The category is Pop -Pop Question 2 +They have rolled a 1 +Chet's new location is 6 +The category is Sports +Sports Question 1 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player -They have rolled a 5 -Pat's new location is 2 -The category is Sports -Sports Question 0 -Answer was correct!!!! -Pat now has 3 Gold Coins. -Sue is the current player They have rolled a 2 -Sue's new location is 9 -The category is Science -Science Question 3 -Answer was correct!!!! -Sue now has 3 Gold Coins. +Pat is not getting out of the penalty box +Sue is the current player +They have rolled a 1 +Sue's new location is 8 +The category is Pop +Pop Question 0 +Question was incorrectly answered +Sue was sent to the penalty box Chet is the current player -They have rolled a 2 -Chet's new location is 10 -The category is Sports -Sports Question 1 +They have rolled a 5 +Chet's new location is 11 +The category is Rock +Rock Question 2 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 4 -Pat's new location is 6 -The category is Sports -Sports Question 2 -Question was incorrectly answered -Pat was sent to the penalty box +Pat is not getting out of the penalty box Sue is the current player -They have rolled a 5 -Sue's new location is 2 -The category is Sports -Sports Question 3 +They have rolled a 1 +Sue is getting out of the penalty box +Sue's new location is 9 +The category is Science +Science Question 3 Answer was correct!!!! -Sue now has 4 Gold Coins. +Sue now has 3 Gold Coins. Chet is the current player They have rolled a 1 -Chet's new location is 11 -The category is Rock -Rock Question 1 +Chet's new location is 0 +The category is Pop +Pop Question 1 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player -They have rolled a 2 -Pat is not getting out of the penalty box +They have rolled a 3 +Pat is getting out of the penalty box +Pat's new location is 0 +The category is Pop +Pop Question 2 +Answer was correct!!!! +Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 3 -The category is Rock -Rock Question 2 -Question was incorrectly answered -Sue was sent to the penalty box +They have rolled a 4 +Sue is not getting out of the penalty box Chet is the current player -They have rolled a 5 +They have rolled a 4 Chet's new location is 4 The category is Pop Pop Question 3 @@ -628,161 +642,140 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 4 -Chet's new location is 4 -The category is Pop -Pop Question 0 +They have rolled a 2 +Chet's new location is 2 +The category is Sports +Sports Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player -They have rolled a 1 -Pat's new location is 1 -The category is Science -Science Question 0 -Answer was correct!!!! -Pat now has 1 Gold Coins. -Sue is the current player -They have rolled a 1 -Sue's new location is 1 -The category is Science -Science Question 1 -Answer was correct!!!! -Sue now has 1 Gold Coins. -Chet is the current player They have rolled a 3 -Chet's new location is 7 +Pat's new location is 3 The category is Rock Rock Question 0 -Answer was correct!!!! -Chet now has 2 Gold Coins. -Pat is the current player -They have rolled a 4 -Pat's new location is 5 -The category is Science -Science Question 2 -Answer was correct!!!! -Pat now has 2 Gold Coins. -Sue is the current player -They have rolled a 4 -Sue's new location is 5 -The category is Science -Science Question 3 -Answer was correct!!!! -Sue now has 2 Gold Coins. -Chet is the current player -They have rolled a 2 -Chet's new location is 9 -The category is Science -Science Question 4 -Answer was correct!!!! -Chet now has 3 Gold Coins. -Pat is the current player -They have rolled a 3 -Pat's new location is 8 -The category is Pop -Pop Question 1 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 5 -Sue's new location is 10 -The category is Sports -Sports Question 0 +Sue's new location is 5 +The category is Science +Science Question 0 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 3 -Chet's new location is 0 -The category is Pop -Pop Question 2 +Chet's new location is 5 +The category is Science +Science Question 1 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 1 Pat is getting out of the penalty box -Pat's new location is 9 -The category is Science -Science Question 5 +Pat's new location is 4 +The category is Pop +Pop Question 0 Answer was correct!!!! -Sue now has 3 Gold Coins. +Pat now has 1 Gold Coins. Sue is the current player They have rolled a 2 Sue is not getting out of the penalty box Chet is the current player They have rolled a 1 Chet is getting out of the penalty box -Chet's new location is 1 -The category is Science -Science Question 6 +Chet's new location is 6 +The category is Sports +Sports Question 1 Answer was correct!!!! -Pat now has 3 Gold Coins. +Chet now has 2 Gold Coins. Pat is the current player They have rolled a 3 Pat is getting out of the penalty box -Pat's new location is 0 -The category is Pop -Pop Question 3 +Pat's new location is 7 +The category is Rock +Rock Question 1 Answer was correct!!!! -Sue now has 4 Gold Coins. +Pat now has 2 Gold Coins. Sue is the current player They have rolled a 2 Sue is not getting out of the penalty box Chet is the current player They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 6 -The category is Sports -Sports Question 1 +Chet's new location is 11 +The category is Rock +Rock Question 2 Answer was correct!!!! -Pat now has 4 Gold Coins. +Chet now has 3 Gold Coins. Pat is the current player They have rolled a 1 Pat is getting out of the penalty box -Pat's new location is 1 -The category is Science -Science Question 7 +Pat's new location is 8 +The category is Pop +Pop Question 1 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 3 Sue is getting out of the penalty box -Sue's new location is 1 -The category is Science -Science Question 8 +Sue's new location is 8 +The category is Pop +Pop Question 2 Answer was correct!!!! -Chet now has 4 Gold Coins. +Sue now has 1 Gold Coins. Chet is the current player They have rolled a 1 Chet is getting out of the penalty box -Chet's new location is 7 -The category is Rock -Rock Question 1 +Chet's new location is 0 +The category is Pop +Pop Question 3 Answer was correct!!!! -Pat now has 5 Gold Coins. +Chet now has 4 Gold Coins. Pat is the current player They have rolled a 5 Pat is getting out of the penalty box -Pat's new location is 6 -The category is Sports -Sports Question 2 +Pat's new location is 1 +The category is Science +Science Question 2 Answer was correct!!!! -Sue now has 5 Gold Coins. +Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 Sue is getting out of the penalty box -Sue's new location is 6 -The category is Sports -Sports Question 3 +Sue's new location is 1 +The category is Science +Science Question 3 Answer was correct!!!! -Chet now has 5 Gold Coins. +Sue now has 2 Gold Coins. Chet is the current player They have rolled a 3 Chet is getting out of the penalty box -Chet's new location is 10 +Chet's new location is 3 +The category is Rock +Rock Question 3 +Answer was correct!!!! +Chet now has 5 Gold Coins. +Pat is the current player +They have rolled a 4 +Pat is not getting out of the penalty box +Question was incorrectly answered +Pat was sent to the penalty box +Sue is the current player +They have rolled a 5 +Sue is getting out of the penalty box +Sue's new location is 6 The category is Sports -Sports Question 4 +Sports Question 2 Answer was correct!!!! -Pat now has 6 Gold Coins. +Sue now has 3 Gold Coins. +Chet is the current player +They have rolled a 1 +Chet is getting out of the penalty box +Chet's new location is 4 +The category is Pop +Pop Question 4 +Answer was correct!!!! +Chet now has 6 Gold Coins. Chet was added They are player number 1 Pat was added @@ -797,90 +790,115 @@ Pop Question 0 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player -They have rolled a 5 -Pat's new location is 5 -The category is Science -Science Question 0 +They have rolled a 3 +Pat's new location is 3 +The category is Rock +Rock Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 1 -The category is Science -Science Question 1 +They have rolled a 2 +Sue's new location is 2 +The category is Sports +Sports Question 0 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 4 Chet is not getting out of the penalty box -Question was incorrectly answered -Chet was sent to the penalty box Pat is the current player -They have rolled a 3 -Pat's new location is 8 -The category is Pop -Pop Question 1 +They have rolled a 4 +Pat's new location is 7 +The category is Rock +Rock Question 1 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 2 +They have rolled a 1 Sue's new location is 3 The category is Rock -Rock Question 0 +Rock Question 2 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 4 -Chet is not getting out of the penalty box +They have rolled a 3 +Chet is getting out of the penalty box +Chet's new location is 7 +The category is Rock +Rock Question 3 +Question was incorrectly answered +Chet was sent to the penalty box Pat is the current player -They have rolled a 4 -Pat's new location is 0 -The category is Pop -Pop Question 2 +They have rolled a 3 +Pat's new location is 10 +The category is Sports +Sports Question 1 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 4 -The category is Pop -Pop Question 3 +They have rolled a 4 +Sue's new location is 7 +The category is Rock +Rock Question 4 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 3 Chet is getting out of the penalty box -Chet's new location is 7 -The category is Rock -Rock Question 1 -Question was incorrectly answered -Chet was sent to the penalty box +Chet's new location is 10 +The category is Sports +Sports Question 2 +Answer was correct!!!! +Chet now has 1 Gold Coins. Pat is the current player -They have rolled a 3 -Pat's new location is 3 -The category is Rock -Rock Question 2 +They have rolled a 2 +Pat's new location is 0 +The category is Pop +Pop Question 1 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 4 -Sue's new location is 8 -The category is Pop -Pop Question 4 +Sue's new location is 11 +The category is Rock +Rock Question 5 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player -They have rolled a 3 +They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 10 -The category is Sports -Sports Question 0 +Chet's new location is 3 +The category is Rock +Rock Question 6 +Answer was correct!!!! +Chet now has 2 Gold Coins. +Pat is the current player +They have rolled a 3 +Pat's new location is 3 +The category is Rock +Rock Question 7 Answer was correct!!!! Pat now has 5 Gold Coins. +Sue is the current player +They have rolled a 3 +Sue's new location is 2 +The category is Sports +Sports Question 3 +Answer was correct!!!! +Sue now has 5 Gold Coins. +Chet is the current player +They have rolled a 1 +Chet is getting out of the penalty box +Chet's new location is 4 +The category is Pop +Pop Question 2 +Answer was correct!!!! +Chet now has 3 Gold Coins. Pat is the current player -They have rolled a 2 -Pat's new location is 5 -The category is Science -Science Question 2 +They have rolled a 5 +Pat's new location is 8 +The category is Pop +Pop Question 3 Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added @@ -897,108 +915,110 @@ Pop Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player -They have rolled a 5 -Pat's new location is 5 -The category is Science -Science Question 0 -Answer was correct!!!! -Pat now has 1 Gold Coins. -Sue is the current player They have rolled a 3 -Sue's new location is 3 +Pat's new location is 3 The category is Rock Rock Question 0 Answer was correct!!!! +Pat now has 1 Gold Coins. +Sue is the current player +They have rolled a 5 +Sue's new location is 5 +The category is Science +Science Question 0 +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 3 -Chet's new location is 7 -The category is Rock -Rock Question 1 +They have rolled a 5 +Chet's new location is 9 +The category is Science +Science Question 1 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 1 -Pat's new location is 6 -The category is Sports -Sports Question 0 +Pat's new location is 4 +The category is Pop +Pop Question 1 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 5 -Sue's new location is 8 -The category is Pop -Pop Question 1 +They have rolled a 1 +Sue's new location is 6 +The category is Sports +Sports Question 0 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 4 -Chet's new location is 11 -The category is Rock -Rock Question 2 +They have rolled a 5 +Chet's new location is 2 +The category is Sports +Sports Question 1 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 3 -Pat's new location is 9 -The category is Science -Science Question 1 +Pat's new location is 7 +The category is Rock +Rock Question 1 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player -They have rolled a 5 -Sue's new location is 1 -The category is Science -Science Question 2 -Answer was correct!!!! -Sue now has 3 Gold Coins. +They have rolled a 1 +Sue's new location is 7 +The category is Rock +Rock Question 2 +Question was incorrectly answered +Sue was sent to the penalty box Chet is the current player -They have rolled a 5 -Chet's new location is 4 -The category is Pop -Pop Question 2 +They have rolled a 4 +Chet's new location is 6 +The category is Sports +Sports Question 2 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player -They have rolled a 1 -Pat's new location is 10 -The category is Sports -Sports Question 1 +They have rolled a 5 +Pat's new location is 0 +The category is Pop +Pop Question 2 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 1 -Sue's new location is 2 -The category is Sports -Sports Question 2 +Sue is getting out of the penalty box +Sue's new location is 8 +The category is Pop +Pop Question 3 Answer was correct!!!! -Sue now has 4 Gold Coins. +Sue now has 3 Gold Coins. Chet is the current player -They have rolled a 5 -Chet's new location is 9 -The category is Science -Science Question 3 +They have rolled a 1 +Chet's new location is 7 +The category is Rock +Rock Question 3 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player -They have rolled a 3 +They have rolled a 1 Pat's new location is 1 The category is Science -Science Question 4 -Answer was correct!!!! -Pat now has 5 Gold Coins. +Science Question 2 +Question was incorrectly answered +Pat was sent to the penalty box Sue is the current player -They have rolled a 1 -Sue's new location is 3 +They have rolled a 3 +Sue is getting out of the penalty box +Sue's new location is 11 The category is Rock -Rock Question 3 -Question was incorrectly answered -Sue was sent to the penalty box +Rock Question 4 +Answer was correct!!!! +Sue now has 4 Gold Coins. Chet is the current player -They have rolled a 4 -Chet's new location is 1 +They have rolled a 2 +Chet's new location is 9 The category is Science -Science Question 5 +Science Question 3 Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added @@ -1008,100 +1028,173 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 5 -Chet's new location is 5 -The category is Science -Science Question 0 +They have rolled a 3 +Chet's new location is 3 +The category is Rock +Rock Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player -They have rolled a 1 -Pat's new location is 1 -The category is Science -Science Question 1 +They have rolled a 2 +Pat's new location is 2 +The category is Sports +Sports Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 1 -The category is Science -Science Question 2 -Answer was correct!!!! -Sue now has 1 Gold Coins. +They have rolled a 4 +Sue's new location is 4 +The category is Pop +Pop Question 0 +Question was incorrectly answered +Sue was sent to the penalty box Chet is the current player -They have rolled a 1 -Chet's new location is 6 -The category is Sports -Sports Question 0 +They have rolled a 5 +Chet's new location is 8 +The category is Pop +Pop Question 1 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player -They have rolled a 3 +They have rolled a 2 Pat's new location is 4 The category is Pop -Pop Question 0 +Pop Question 2 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 2 -Sue's new location is 3 -The category is Rock -Rock Question 0 +They have rolled a 5 +Sue is getting out of the penalty box +Sue's new location is 9 +The category is Science +Science Question 0 Answer was correct!!!! -Sue now has 2 Gold Coins. +Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 3 +They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 9 +Chet's new location is 1 The category is Science -Science Question 3 +Science Question 1 Answer was correct!!!! -Pat now has 3 Gold Coins. +Chet now has 2 Gold Coins. Pat is the current player -They have rolled a 2 -Pat's new location is 6 -The category is Sports +They have rolled a 5 +Pat's new location is 9 +The category is Science +Science Question 2 +Answer was correct!!!! +Pat now has 3 Gold Coins. +Sue is the current player +They have rolled a 5 +Sue is getting out of the penalty box +Sue's new location is 2 +The category is Sports Sports Question 1 Answer was correct!!!! -Pat now has 4 Gold Coins. +Sue now has 2 Gold Coins. +Chet is the current player +They have rolled a 4 +Chet is not getting out of the penalty box +Pat is the current player +They have rolled a 4 +Pat's new location is 1 +The category is Science +Science Question 3 +Question was incorrectly answered +Pat was sent to the penalty box Sue is the current player They have rolled a 4 +Sue is not getting out of the penalty box +Chet is the current player +They have rolled a 2 +Chet is not getting out of the penalty box +Pat is the current player +They have rolled a 2 +Pat is not getting out of the penalty box +Sue is the current player +They have rolled a 5 +Sue is getting out of the penalty box Sue's new location is 7 The category is Rock Rock Question 1 +Answer was correct!!!! +Sue now has 3 Gold Coins. +Chet is the current player +They have rolled a 2 +Chet is not getting out of the penalty box Question was incorrectly answered -Sue was sent to the penalty box +Chet was sent to the penalty box +Pat is the current player +They have rolled a 4 +Pat is not getting out of the penalty box +Sue is the current player +They have rolled a 5 +Sue is getting out of the penalty box +Sue's new location is 0 +The category is Pop +Pop Question 3 +Answer was correct!!!! +Sue now has 4 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 2 +Chet's new location is 6 The category is Sports Sports Question 2 -Question was incorrectly answered -Chet was sent to the penalty box +Answer was correct!!!! +Chet now has 3 Gold Coins. Pat is the current player They have rolled a 2 -Pat's new location is 8 -The category is Pop -Pop Question 1 +Pat is not getting out of the penalty box +Question was incorrectly answered +Pat was sent to the penalty box +Sue is the current player +They have rolled a 2 +Sue is not getting out of the penalty box +Chet is the current player +They have rolled a 3 +Chet is getting out of the penalty box +Chet's new location is 9 +The category is Science +Science Question 4 Answer was correct!!!! -Pat now has 5 Gold Coins. +Chet now has 4 Gold Coins. +Pat is the current player +They have rolled a 2 +Pat is not getting out of the penalty box +Question was incorrectly answered +Pat was sent to the penalty box Sue is the current player -They have rolled a 5 +They have rolled a 3 Sue is getting out of the penalty box -Sue's new location is 0 +Sue's new location is 3 +The category is Rock +Rock Question 2 +Answer was correct!!!! +Sue now has 5 Gold Coins. +Chet is the current player +They have rolled a 3 +Chet is getting out of the penalty box +Chet's new location is 0 The category is Pop -Pop Question 2 +Pop Question 4 Answer was correct!!!! -Chet now has 2 Gold Coins. +Chet now has 5 Gold Coins. +Pat is the current player +They have rolled a 2 +Pat is not getting out of the penalty box +Sue is the current player +They have rolled a 4 +Sue is not getting out of the penalty box Chet is the current player -They have rolled a 5 +They have rolled a 3 Chet is getting out of the penalty box -Chet's new location is 7 +Chet's new location is 3 The category is Rock -Rock Question 2 +Rock Question 3 Answer was correct!!!! -Pat now has 6 Gold Coins. +Chet now has 6 Gold Coins. Chet was added They are player number 1 Pat was added @@ -1109,112 +1202,112 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 5 -Chet's new location is 5 +They have rolled a 1 +Chet's new location is 1 The category is Science Science Question 0 -Answer was correct!!!! -Chet now has 1 Gold Coins. +Question was incorrectly answered +Chet was sent to the penalty box Pat is the current player -They have rolled a 5 -Pat's new location is 5 +They have rolled a 1 +Pat's new location is 1 The category is Science Science Question 1 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player -They have rolled a 4 -Sue's new location is 4 -The category is Pop -Pop Question 0 +They have rolled a 2 +Sue's new location is 2 +The category is Sports +Sports Question 0 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 4 -Chet's new location is 9 -The category is Science -Science Question 2 -Question was incorrectly answered -Chet was sent to the penalty box +They have rolled a 2 +Chet is not getting out of the penalty box Pat is the current player -They have rolled a 4 -Pat's new location is 9 -The category is Science -Science Question 3 +They have rolled a 2 +Pat's new location is 3 +The category is Rock +Rock Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 2 -Sue's new location is 6 -The category is Sports -Sports Question 0 +They have rolled a 5 +Sue's new location is 7 +The category is Rock +Rock Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 Chet is not getting out of the penalty box Pat is the current player -They have rolled a 5 -Pat's new location is 2 -The category is Sports -Sports Question 1 +They have rolled a 1 +Pat's new location is 4 +The category is Pop +Pop Question 0 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player -They have rolled a 2 +They have rolled a 1 Sue's new location is 8 The category is Pop Pop Question 1 -Question was incorrectly answered -Sue was sent to the penalty box +Answer was correct!!!! +Sue now has 3 Gold Coins. Chet is the current player They have rolled a 4 Chet is not getting out of the penalty box Pat is the current player -They have rolled a 5 +They have rolled a 3 Pat's new location is 7 The category is Rock -Rock Question 0 +Rock Question 2 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player -They have rolled a 5 -Sue is getting out of the penalty box -Sue's new location is 1 -The category is Science -Science Question 4 +They have rolled a 3 +Sue's new location is 11 +The category is Rock +Rock Question 3 Answer was correct!!!! -Chet now has 2 Gold Coins. +Sue now has 4 Gold Coins. Chet is the current player -They have rolled a 2 -Chet is not getting out of the penalty box +They have rolled a 1 +Chet is getting out of the penalty box +Chet's new location is 2 +The category is Sports +Sports Question 1 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player -They have rolled a 2 -Pat's new location is 9 -The category is Science -Science Question 5 +They have rolled a 5 +Pat's new location is 0 +The category is Pop +Pop Question 2 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 3 -Sue is getting out of the penalty box -Sue's new location is 4 -The category is Pop -Pop Question 2 +Sue's new location is 2 +The category is Sports +Sports Question 2 Answer was correct!!!! -Chet now has 3 Gold Coins. +Sue now has 5 Gold Coins. Chet is the current player -They have rolled a 2 -Chet is not getting out of the penalty box -Question was incorrectly answered -Chet was sent to the penalty box +They have rolled a 5 +Chet is getting out of the penalty box +Chet's new location is 7 +The category is Rock +Rock Question 4 +Answer was correct!!!! +Chet now has 1 Gold Coins. Pat is the current player -They have rolled a 3 -Pat's new location is 0 -The category is Pop -Pop Question 3 +They have rolled a 2 +Pat's new location is 2 +The category is Sports +Sports Question 3 Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added @@ -1224,17 +1317,17 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 3 -Chet's new location is 3 -The category is Rock -Rock Question 0 +They have rolled a 5 +Chet's new location is 5 +The category is Science +Science Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player -They have rolled a 2 -Pat's new location is 2 -The category is Sports -Sports Question 0 +They have rolled a 3 +Pat's new location is 3 +The category is Rock +Rock Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player @@ -1246,83 +1339,121 @@ Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 -Chet's new location is 6 -The category is Sports -Sports Question 1 -Answer was correct!!!! -Chet now has 2 Gold Coins. -Pat is the current player -They have rolled a 1 -Pat's new location is 3 -The category is Rock -Rock Question 1 +Chet's new location is 8 +The category is Pop +Pop Question 1 Question was incorrectly answered -Pat was sent to the penalty box -Sue is the current player -They have rolled a 1 +Chet was sent to the penalty box +Pat is the current player +They have rolled a 5 +Pat's new location is 8 +The category is Pop +Pop Question 2 +Answer was correct!!!! +Pat now has 2 Gold Coins. +Sue is the current player +They have rolled a 1 Sue's new location is 5 The category is Science -Science Question 0 +Science Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 2 -Chet's new location is 8 +They have rolled a 4 +Chet is not getting out of the penalty box +Pat is the current player +They have rolled a 4 +Pat's new location is 0 The category is Pop -Pop Question 1 +Pop Question 3 Answer was correct!!!! -Chet now has 3 Gold Coins. -Pat is the current player -They have rolled a 2 -Pat is not getting out of the penalty box +Pat now has 3 Gold Coins. Sue is the current player -They have rolled a 2 -Sue's new location is 7 -The category is Rock -Rock Question 2 +They have rolled a 4 +Sue's new location is 9 +The category is Science +Science Question 2 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 +Chet is getting out of the penalty box Chet's new location is 1 The category is Science -Science Question 1 -Answer was correct!!!! -Chet now has 4 Gold Coins. +Science Question 3 +Question was incorrectly answered +Chet was sent to the penalty box Pat is the current player They have rolled a 2 -Pat is not getting out of the penalty box +Pat's new location is 2 +The category is Sports +Sports Question 0 +Answer was correct!!!! +Pat now has 4 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 8 -The category is Pop -Pop Question 2 +They have rolled a 2 +Sue's new location is 11 +The category is Rock +Rock Question 1 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player -They have rolled a 1 -Chet's new location is 2 +They have rolled a 5 +Chet is getting out of the penalty box +Chet's new location is 6 The category is Sports -Sports Question 2 +Sports Question 1 Answer was correct!!!! -Chet now has 5 Gold Coins. +Chet now has 2 Gold Coins. Pat is the current player -They have rolled a 4 -Pat is not getting out of the penalty box +They have rolled a 1 +Pat's new location is 3 +The category is Rock +Rock Question 2 +Question was incorrectly answered +Pat was sent to the penalty box Sue is the current player +They have rolled a 1 +Sue's new location is 0 +The category is Pop +Pop Question 4 +Question was incorrectly answered +Sue was sent to the penalty box +Chet is the current player They have rolled a 3 -Sue's new location is 11 -The category is Rock -Rock Question 3 +Chet is getting out of the penalty box +Chet's new location is 9 +The category is Science +Science Question 4 +Answer was correct!!!! +Chet now has 3 Gold Coins. +Pat is the current player +They have rolled a 5 +Pat is getting out of the penalty box +Pat's new location is 8 +The category is Pop +Pop Question 5 +Answer was correct!!!! +Pat now has 5 Gold Coins. +Sue is the current player +They have rolled a 5 +Sue is getting out of the penalty box +Sue's new location is 5 +The category is Science +Science Question 5 Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player -They have rolled a 3 -Chet's new location is 5 +They have rolled a 2 +Chet is not getting out of the penalty box +Pat is the current player +They have rolled a 5 +Pat is getting out of the penalty box +Pat's new location is 1 The category is Science -Science Question 2 +Science Question 6 Answer was correct!!!! -Chet now has 6 Gold Coins. +Pat now has 6 Gold Coins. Chet was added They are player number 1 Pat was added @@ -1330,78 +1461,127 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player +They have rolled a 2 +Chet's new location is 2 +The category is Sports +Sports Question 0 +Answer was correct!!!! +Chet now has 1 Gold Coins. +Pat is the current player +They have rolled a 2 +Pat's new location is 2 +The category is Sports +Sports Question 1 +Answer was correct!!!! +Pat now has 1 Gold Coins. +Sue is the current player They have rolled a 1 -Chet's new location is 1 +Sue's new location is 1 The category is Science Science Question 0 -Question was incorrectly answered -Chet was sent to the penalty box +Answer was correct!!!! +Sue now has 1 Gold Coins. +Chet is the current player +They have rolled a 1 +Chet's new location is 3 +The category is Rock +Rock Question 0 +Answer was correct!!!! +Chet now has 2 Gold Coins. Pat is the current player -They have rolled a 5 +They have rolled a 3 Pat's new location is 5 The category is Science Science Question 1 Answer was correct!!!! -Pat now has 1 Gold Coins. +Pat now has 2 Gold Coins. Sue is the current player They have rolled a 3 -Sue's new location is 3 -The category is Rock -Rock Question 0 +Sue's new location is 4 +The category is Pop +Pop Question 0 Answer was correct!!!! -Sue now has 1 Gold Coins. +Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 5 -Chet is getting out of the penalty box -Chet's new location is 6 -The category is Sports -Sports Question 0 +They have rolled a 1 +Chet's new location is 4 +The category is Pop +Pop Question 1 Answer was correct!!!! -Pat now has 2 Gold Coins. +Chet now has 3 Gold Coins. Pat is the current player -They have rolled a 2 -Pat's new location is 7 -The category is Rock -Rock Question 1 +They have rolled a 1 +Pat's new location is 6 +The category is Sports +Sports Question 2 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player +They have rolled a 1 +Sue's new location is 5 +The category is Science +Science Question 2 +Answer was correct!!!! +Sue now has 3 Gold Coins. +Chet is the current player +They have rolled a 2 +Chet's new location is 6 +The category is Sports +Sports Question 3 +Question was incorrectly answered +Chet was sent to the penalty box +Pat is the current player They have rolled a 5 +Pat's new location is 11 +The category is Rock +Rock Question 1 +Question was incorrectly answered +Pat was sent to the penalty box +Sue is the current player +They have rolled a 3 Sue's new location is 8 The category is Pop -Pop Question 0 +Pop Question 2 Answer was correct!!!! -Sue now has 2 Gold Coins. +Sue now has 4 Gold Coins. Chet is the current player They have rolled a 3 Chet is getting out of the penalty box Chet's new location is 9 The category is Science -Science Question 2 -Answer was correct!!!! -Pat now has 4 Gold Coins. +Science Question 3 +Question was incorrectly answered +Chet was sent to the penalty box Pat is the current player They have rolled a 4 -Pat's new location is 11 -The category is Rock -Rock Question 2 -Answer was correct!!!! -Pat now has 5 Gold Coins. -Sue is the current player -They have rolled a 3 -Sue's new location is 11 -The category is Rock -Rock Question 3 +Pat is not getting out of the penalty box Question was incorrectly answered -Sue was sent to the penalty box +Pat was sent to the penalty box +Sue is the current player +They have rolled a 5 +Sue's new location is 1 +The category is Science +Science Question 4 +Answer was correct!!!! +Sue now has 5 Gold Coins. Chet is the current player +They have rolled a 2 +Chet is not getting out of the penalty box +Pat is the current player They have rolled a 5 -Chet is getting out of the penalty box -Chet's new location is 2 -The category is Sports -Sports Question 1 +Pat is getting out of the penalty box +Pat's new location is 4 +The category is Pop +Pop Question 3 Answer was correct!!!! -Pat now has 6 Gold Coins. +Pat now has 4 Gold Coins. +Sue is the current player +They have rolled a 2 +Sue's new location is 3 +The category is Rock +Rock Question 2 +Answer was correct!!!! +Sue now has 6 Gold Coins. Chet was added They are player number 1 Pat was added @@ -1409,122 +1589,251 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 1 -Chet's new location is 1 -The category is Science -Science Question 0 +They have rolled a 4 +Chet's new location is 4 +The category is Pop +Pop Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 4 The category is Pop -Pop Question 0 +Pop Question 1 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player -They have rolled a 4 -Sue's new location is 4 -The category is Pop -Pop Question 1 +They have rolled a 2 +Sue's new location is 2 +The category is Sports +Sports Question 0 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 4 -Chet's new location is 5 -The category is Science -Science Question 1 +They have rolled a 2 +Chet's new location is 6 +The category is Sports +Sports Question 1 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 9 The category is Science -Science Question 2 -Question was incorrectly answered -Pat was sent to the penalty box +Science Question 0 +Answer was correct!!!! +Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 2 -Sue's new location is 6 -The category is Sports -Sports Question 0 +They have rolled a 3 +Sue's new location is 5 +The category is Science +Science Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player +They have rolled a 3 +Chet's new location is 9 +The category is Science +Science Question 2 +Answer was correct!!!! +Chet now has 3 Gold Coins. +Pat is the current player They have rolled a 2 -Chet's new location is 7 +Pat's new location is 11 The category is Rock Rock Question 0 Answer was correct!!!! -Chet now has 3 Gold Coins. -Pat is the current player -They have rolled a 5 -Pat is getting out of the penalty box -Pat's new location is 2 -The category is Sports -Sports Question 1 +Pat now has 3 Gold Coins. +Sue is the current player +They have rolled a 4 +Sue's new location is 9 +The category is Science +Science Question 3 Answer was correct!!!! Sue now has 3 Gold Coins. -Sue is the current player -They have rolled a 1 -Sue's new location is 7 -The category is Rock -Rock Question 1 -Question was incorrectly answered -Sue was sent to the penalty box Chet is the current player +They have rolled a 4 +Chet's new location is 1 +The category is Science +Science Question 4 +Answer was correct!!!! +Chet now has 4 Gold Coins. +Pat is the current player They have rolled a 1 -Chet's new location is 8 +Pat's new location is 0 The category is Pop Pop Question 2 +Answer was correct!!!! +Pat now has 4 Gold Coins. +Sue is the current player +They have rolled a 1 +Sue's new location is 10 +The category is Sports +Sports Question 2 +Answer was correct!!!! +Sue now has 4 Gold Coins. +Chet is the current player +They have rolled a 5 +Chet's new location is 6 +The category is Sports +Sports Question 3 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 3 -Pat is getting out of the penalty box -Pat's new location is 5 -The category is Science -Science Question 3 +Pat's new location is 3 +The category is Rock +Rock Question 1 Answer was correct!!!! -Sue now has 4 Gold Coins. +Pat now has 5 Gold Coins. Sue is the current player -They have rolled a 5 -Sue is getting out of the penalty box +They have rolled a 2 Sue's new location is 0 The category is Pop Pop Question 3 Answer was correct!!!! -Chet now has 4 Gold Coins. +Sue now has 5 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 1 +Chet's new location is 11 +The category is Rock +Rock Question 2 +Answer was correct!!!! +Chet now has 5 Gold Coins. +Pat is the current player +They have rolled a 2 +Pat's new location is 5 The category is Science -Science Question 4 +Science Question 5 Answer was correct!!!! -Pat now has 2 Gold Coins. +Pat now has 6 Gold Coins. +Chet was added +They are player number 1 +Pat was added +They are player number 2 +Sue was added +They are player number 3 +Chet is the current player +They have rolled a 4 +Chet's new location is 4 +The category is Pop +Pop Question 0 +Answer was correct!!!! +Chet now has 1 Gold Coins. Pat is the current player They have rolled a 2 -Pat is not getting out of the penalty box +Pat's new location is 2 +The category is Sports +Sports Question 0 +Answer was correct!!!! +Pat now has 1 Gold Coins. Sue is the current player +They have rolled a 1 +Sue's new location is 1 +The category is Science +Science Question 0 +Answer was correct!!!! +Sue now has 1 Gold Coins. +Chet is the current player +They have rolled a 4 +Chet's new location is 8 +The category is Pop +Pop Question 1 +Answer was correct!!!! +Chet now has 2 Gold Coins. +Pat is the current player +They have rolled a 4 +Pat's new location is 6 +The category is Sports +Sports Question 1 +Answer was correct!!!! +Pat now has 2 Gold Coins. +Sue is the current player +They have rolled a 1 +Sue's new location is 2 +The category is Sports +Sports Question 2 +Answer was correct!!!! +Sue now has 2 Gold Coins. +Chet is the current player +They have rolled a 4 +Chet's new location is 0 +The category is Pop +Pop Question 2 +Answer was correct!!!! +Chet now has 3 Gold Coins. +Pat is the current player They have rolled a 5 -Sue is getting out of the penalty box +Pat's new location is 11 +The category is Rock +Rock Question 0 +Answer was correct!!!! +Pat now has 3 Gold Coins. +Sue is the current player +They have rolled a 3 Sue's new location is 5 The category is Science -Science Question 5 +Science Question 1 Answer was correct!!!! -Chet now has 5 Gold Coins. +Sue now has 3 Gold Coins. +Chet is the current player +They have rolled a 3 +Chet's new location is 3 +The category is Rock +Rock Question 1 +Question was incorrectly answered +Chet was sent to the penalty box +Pat is the current player +They have rolled a 5 +Pat's new location is 4 +The category is Pop +Pop Question 3 +Answer was correct!!!! +Pat now has 4 Gold Coins. +Sue is the current player +They have rolled a 4 +Sue's new location is 9 +The category is Science +Science Question 2 +Answer was correct!!!! +Sue now has 4 Gold Coins. Chet is the current player They have rolled a 2 Chet is not getting out of the penalty box Pat is the current player -They have rolled a 2 -Pat is not getting out of the penalty box +They have rolled a 4 +Pat's new location is 8 +The category is Pop +Pop Question 4 +Answer was correct!!!! +Pat now has 5 Gold Coins. Sue is the current player -They have rolled a 1 -Sue is getting out of the penalty box -Sue's new location is 6 +They have rolled a 3 +Sue's new location is 0 +The category is Pop +Pop Question 5 +Answer was correct!!!! +Sue now has 5 Gold Coins. +Chet is the current player +They have rolled a 5 +Chet is getting out of the penalty box +Chet's new location is 8 +The category is Pop +Pop Question 6 +Answer was correct!!!! +Chet now has 4 Gold Coins. +Pat is the current player +They have rolled a 4 +Pat's new location is 0 +The category is Pop +Pop Question 7 +Question was incorrectly answered +Pat was sent to the penalty box +Sue is the current player +They have rolled a 2 +Sue's new location is 2 The category is Sports -Sports Question 2 +Sports Question 3 Answer was correct!!!! -Chet now has 6 Gold Coins. +Sue now has 6 Gold Coins. From e345f4e25b2d8700bc3288bd5aaefc78675d61bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:12:14 +0800 Subject: [PATCH 55/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20tempGetOutOfPenaltyBox=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 21 +- .../games/GameTest.itsLockedDown.approved.txt | 1599 ++++++++--------- 2 files changed, 780 insertions(+), 840 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 52fe878..9f05fc0 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -24,14 +24,12 @@ public Game() { } public void run(Random rand) { - boolean notAWinner = true; - while (notAWinner) { + while (nobodyWin()) { roll(rand.nextInt(5) + 1); - if (rand.nextInt(9) == 7) { wrongAnswer(); } else { - notAWinner = correctAnswer(); + correctAnswer(); } nextPlayer(); } @@ -76,19 +74,15 @@ private void nextPlayer() { if (currentPlayer == players.size()) currentPlayer = 0; } - public boolean correctAnswer() { + public void correctAnswer() { if (players.get(currentPlayer).isInPenaltyBox) { if (isGettingOutOfPenaltyBox) { System.out.println("Answer was correct!!!!"); players.get(currentPlayer).gainGoldCoin(); - return !players.get(currentPlayer).isWin(); - } else { - return true; } } else { System.out.println("Answer was correct!!!!"); players.get(currentPlayer).gainGoldCoin(); - return !players.get(currentPlayer).isWin(); } } @@ -112,6 +106,11 @@ private void getOutOfPenaltyBox() { System.out.println(getCurrentPlayerName() + " is getting out of the penalty box"); } + private void tempGetOutOfPenaltyBox(){ + players.get(currentPlayer).isInPenaltyBox = false; + System.out.println(getCurrentPlayerName() + " is getting out of the penalty box"); + } + private int getCurrentPlace() { return players.get(currentPlayer).place; } @@ -119,4 +118,8 @@ private int getCurrentPlace() { private String getCurrentPlayerName() { return players.get(currentPlayer).getName(); } + + private boolean nobodyWin() { + return !players.stream().anyMatch(Player::isWin); + } } diff --git a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt index c75f80e..15e17a1 100644 --- a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt +++ b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt @@ -225,7 +225,6 @@ Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 -Chet is getting out of the penalty box Chet's new location is 4 The category is Pop Pop Question 4 @@ -296,7 +295,6 @@ Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 3 -Pat is getting out of the penalty box Pat's new location is 11 The category is Rock Rock Question 2 @@ -315,7 +313,6 @@ They have rolled a 2 Chet is not getting out of the penalty box Pat is the current player They have rolled a 5 -Pat is getting out of the penalty box Pat's new location is 4 The category is Pop Pop Question 3 @@ -323,7 +320,6 @@ Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 -Sue is getting out of the penalty box Sue's new location is 4 The category is Pop Pop Question 4 @@ -334,7 +330,6 @@ They have rolled a 4 Chet is not getting out of the penalty box Pat is the current player They have rolled a 3 -Pat is getting out of the penalty box Pat's new location is 7 The category is Rock Rock Question 4 @@ -342,7 +337,6 @@ Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 1 -Sue is getting out of the penalty box Sue's new location is 5 The category is Science Science Question 0 @@ -353,7 +347,11 @@ They have rolled a 4 Chet is not getting out of the penalty box Pat is the current player They have rolled a 2 -Pat is not getting out of the penalty box +Pat's new location is 9 +The category is Science +Science Question 1 +Answer was correct!!!! +Pat now has 5 Gold Coins. Sue is the current player They have rolled a 2 Sue is not getting out of the penalty box @@ -367,43 +365,9 @@ Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 4 -Pat is not getting out of the penalty box -Sue is the current player -They have rolled a 2 -Sue is not getting out of the penalty box -Chet is the current player -They have rolled a 4 -Chet is not getting out of the penalty box -Pat is the current player -They have rolled a 3 -Pat is getting out of the penalty box -Pat's new location is 10 -The category is Sports -Sports Question 3 -Answer was correct!!!! -Pat now has 5 Gold Coins. -Sue is the current player -They have rolled a 3 -Sue is getting out of the penalty box -Sue's new location is 8 -The category is Pop -Pop Question 5 -Answer was correct!!!! -Sue now has 4 Gold Coins. -Chet is the current player -They have rolled a 1 -Chet is getting out of the penalty box -Chet's new location is 3 -The category is Rock -Rock Question 5 -Answer was correct!!!! -Chet now has 4 Gold Coins. -Pat is the current player -They have rolled a 5 -Pat is getting out of the penalty box -Pat's new location is 3 -The category is Rock -Rock Question 6 +Pat's new location is 1 +The category is Science +Science Question 2 Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added @@ -413,10 +377,10 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 5 -Chet's new location is 5 -The category is Science -Science Question 0 +They have rolled a 2 +Chet's new location is 2 +The category is Sports +Sports Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player @@ -424,8 +388,8 @@ They have rolled a 4 Pat's new location is 4 The category is Pop Pop Question 0 -Question was incorrectly answered -Pat was sent to the penalty box +Answer was correct!!!! +Pat now has 1 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 3 @@ -434,97 +398,106 @@ Rock Question 0 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 5 -Chet's new location is 10 -The category is Sports -Sports Question 0 -Question was incorrectly answered -Chet was sent to the penalty box +They have rolled a 3 +Chet's new location is 5 +The category is Science +Science Question 0 +Answer was correct!!!! +Chet now has 2 Gold Coins. Pat is the current player They have rolled a 1 -Pat is getting out of the penalty box Pat's new location is 5 The category is Science Science Question 1 Answer was correct!!!! -Pat now has 1 Gold Coins. +Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 2 -Sue's new location is 5 -The category is Science -Science Question 2 +They have rolled a 5 +Sue's new location is 8 +The category is Pop +Pop Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 2 -Chet is not getting out of the penalty box +They have rolled a 5 +Chet's new location is 10 +The category is Sports +Sports Question 1 +Answer was correct!!!! +Chet now has 3 Gold Coins. Pat is the current player They have rolled a 4 -Pat is not getting out of the penalty box +Pat's new location is 9 +The category is Science +Science Question 2 +Question was incorrectly answered +Pat was sent to the penalty box Sue is the current player They have rolled a 3 -Sue's new location is 8 -The category is Pop -Pop Question 1 +Sue's new location is 11 +The category is Rock +Rock Question 1 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 -Chet is getting out of the penalty box Chet's new location is 3 The category is Rock -Rock Question 1 -Answer was correct!!!! -Chet now has 2 Gold Coins. +Rock Question 2 +Question was incorrectly answered +Chet was sent to the penalty box Pat is the current player -They have rolled a 3 +They have rolled a 1 Pat is getting out of the penalty box -Pat's new location is 8 -The category is Pop -Pop Question 2 +Pat's new location is 10 +The category is Sports +Sports Question 2 Answer was correct!!!! -Pat now has 2 Gold Coins. +Pat now has 3 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 9 +They have rolled a 2 +Sue's new location is 1 The category is Science Science Question 3 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player -They have rolled a 4 +They have rolled a 2 Chet is not getting out of the penalty box Pat is the current player -They have rolled a 5 -Pat is getting out of the penalty box -Pat's new location is 1 -The category is Science -Science Question 4 +They have rolled a 4 +Pat's new location is 2 +The category is Sports +Sports Question 3 Answer was correct!!!! -Pat now has 3 Gold Coins. +Pat now has 4 Gold Coins. Sue is the current player -They have rolled a 4 -Sue's new location is 1 -The category is Science -Science Question 5 +They have rolled a 3 +Sue's new location is 4 +The category is Pop +Pop Question 2 Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player -They have rolled a 1 +They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 4 +Chet's new location is 8 The category is Pop Pop Question 3 Answer was correct!!!! -Chet now has 3 Gold Coins. +Chet now has 4 Gold Coins. Pat is the current player -They have rolled a 4 -Pat is not getting out of the penalty box -Sue is the current player They have rolled a 3 -Sue's new location is 4 -The category is Pop -Pop Question 4 +Pat's new location is 5 +The category is Science +Science Question 4 +Answer was correct!!!! +Pat now has 5 Gold Coins. +Sue is the current player +They have rolled a 1 +Sue's new location is 5 +The category is Science +Science Question 5 Answer was correct!!!! Sue now has 6 Gold Coins. Chet was added @@ -534,10 +507,10 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 3 -Chet's new location is 3 -The category is Rock -Rock Question 0 +They have rolled a 4 +Chet's new location is 4 +The category is Pop +Pop Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player @@ -548,14 +521,14 @@ Science Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player -They have rolled a 2 -Sue's new location is 2 -The category is Sports -Sports Question 0 +They have rolled a 4 +Sue's new location is 4 +The category is Pop +Pop Question 1 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 2 +They have rolled a 1 Chet's new location is 5 The category is Science Science Question 1 @@ -566,70 +539,76 @@ They have rolled a 4 Pat's new location is 9 The category is Science Science Question 2 -Question was incorrectly answered -Pat was sent to the penalty box +Answer was correct!!!! +Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 5 +They have rolled a 3 Sue's new location is 7 The category is Rock -Rock Question 1 +Rock Question 0 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 1 -Chet's new location is 6 -The category is Sports -Sports Question 1 +They have rolled a 3 +Chet's new location is 8 +The category is Pop +Pop Question 2 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player -They have rolled a 2 -Pat is not getting out of the penalty box -Sue is the current player -They have rolled a 1 -Sue's new location is 8 -The category is Pop -Pop Question 0 -Question was incorrectly answered -Sue was sent to the penalty box -Chet is the current player They have rolled a 5 -Chet's new location is 11 -The category is Rock -Rock Question 2 +Pat's new location is 2 +The category is Sports +Sports Question 0 Answer was correct!!!! -Chet now has 4 Gold Coins. -Pat is the current player -They have rolled a 4 -Pat is not getting out of the penalty box +Pat now has 3 Gold Coins. Sue is the current player -They have rolled a 1 -Sue is getting out of the penalty box +They have rolled a 2 Sue's new location is 9 The category is Science Science Question 3 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player +They have rolled a 2 +Chet's new location is 10 +The category is Sports +Sports Question 1 +Answer was correct!!!! +Chet now has 4 Gold Coins. +Pat is the current player +They have rolled a 4 +Pat's new location is 6 +The category is Sports +Sports Question 2 +Question was incorrectly answered +Pat was sent to the penalty box +Sue is the current player +They have rolled a 5 +Sue's new location is 2 +The category is Sports +Sports Question 3 +Answer was correct!!!! +Sue now has 4 Gold Coins. +Chet is the current player They have rolled a 1 -Chet's new location is 0 -The category is Pop -Pop Question 1 +Chet's new location is 11 +The category is Rock +Rock Question 1 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player -They have rolled a 3 -Pat is getting out of the penalty box -Pat's new location is 0 -The category is Pop -Pop Question 2 -Answer was correct!!!! -Pat now has 2 Gold Coins. +They have rolled a 2 +Pat is not getting out of the penalty box Sue is the current player -They have rolled a 4 -Sue is not getting out of the penalty box +They have rolled a 1 +Sue's new location is 3 +The category is Rock +Rock Question 2 +Question was incorrectly answered +Sue was sent to the penalty box Chet is the current player -They have rolled a 4 +They have rolled a 5 Chet's new location is 4 The category is Pop Pop Question 3 @@ -642,263 +621,252 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 2 -Chet's new location is 2 -The category is Sports -Sports Question 0 +They have rolled a 4 +Chet's new location is 4 +The category is Pop +Pop Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player +They have rolled a 1 +Pat's new location is 1 +The category is Science +Science Question 0 +Answer was correct!!!! +Pat now has 1 Gold Coins. +Sue is the current player +They have rolled a 1 +Sue's new location is 1 +The category is Science +Science Question 1 +Answer was correct!!!! +Sue now has 1 Gold Coins. +Chet is the current player They have rolled a 3 -Pat's new location is 3 +Chet's new location is 7 The category is Rock Rock Question 0 +Answer was correct!!!! +Chet now has 2 Gold Coins. +Pat is the current player +They have rolled a 4 +Pat's new location is 5 +The category is Science +Science Question 2 +Answer was correct!!!! +Pat now has 2 Gold Coins. +Sue is the current player +They have rolled a 4 +Sue's new location is 5 +The category is Science +Science Question 3 +Answer was correct!!!! +Sue now has 2 Gold Coins. +Chet is the current player +They have rolled a 2 +Chet's new location is 9 +The category is Science +Science Question 4 +Answer was correct!!!! +Chet now has 3 Gold Coins. +Pat is the current player +They have rolled a 3 +Pat's new location is 8 +The category is Pop +Pop Question 1 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 5 -Sue's new location is 5 -The category is Science -Science Question 0 +Sue's new location is 10 +The category is Sports +Sports Question 0 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 3 -Chet's new location is 5 -The category is Science -Science Question 1 +Chet's new location is 0 +The category is Pop +Pop Question 2 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 1 Pat is getting out of the penalty box -Pat's new location is 4 -The category is Pop -Pop Question 0 +Pat's new location is 9 +The category is Science +Science Question 5 Answer was correct!!!! -Pat now has 1 Gold Coins. +Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 Sue is not getting out of the penalty box Chet is the current player They have rolled a 1 Chet is getting out of the penalty box -Chet's new location is 6 -The category is Sports -Sports Question 1 +Chet's new location is 1 +The category is Science +Science Question 6 Answer was correct!!!! -Chet now has 2 Gold Coins. +Chet now has 4 Gold Coins. Pat is the current player They have rolled a 3 -Pat is getting out of the penalty box -Pat's new location is 7 -The category is Rock -Rock Question 1 +Pat's new location is 0 +The category is Pop +Pop Question 3 Answer was correct!!!! -Pat now has 2 Gold Coins. +Pat now has 4 Gold Coins. Sue is the current player They have rolled a 2 Sue is not getting out of the penalty box Chet is the current player They have rolled a 5 -Chet is getting out of the penalty box -Chet's new location is 11 -The category is Rock -Rock Question 2 +Chet's new location is 6 +The category is Sports +Sports Question 1 Answer was correct!!!! -Chet now has 3 Gold Coins. +Chet now has 5 Gold Coins. Pat is the current player They have rolled a 1 -Pat is getting out of the penalty box -Pat's new location is 8 -The category is Pop -Pop Question 1 +Pat's new location is 1 +The category is Science +Science Question 7 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 3 Sue is getting out of the penalty box -Sue's new location is 8 -The category is Pop -Pop Question 2 +Sue's new location is 1 +The category is Science +Science Question 8 Answer was correct!!!! -Sue now has 1 Gold Coins. +Sue now has 3 Gold Coins. Chet is the current player They have rolled a 1 -Chet is getting out of the penalty box -Chet's new location is 0 -The category is Pop -Pop Question 3 +Chet's new location is 7 +The category is Rock +Rock Question 1 Answer was correct!!!! -Chet now has 4 Gold Coins. -Pat is the current player +Chet now has 6 Gold Coins. +Chet was added +They are player number 1 +Pat was added +They are player number 2 +Sue was added +They are player number 3 +Chet is the current player They have rolled a 5 -Pat is getting out of the penalty box -Pat's new location is 1 +Chet's new location is 5 The category is Science -Science Question 2 +Science Question 0 Answer was correct!!!! -Pat now has 3 Gold Coins. -Sue is the current player +Chet now has 1 Gold Coins. +Pat is the current player They have rolled a 5 -Sue is getting out of the penalty box -Sue's new location is 1 +Pat's new location is 5 The category is Science -Science Question 3 +Science Question 1 Answer was correct!!!! -Sue now has 2 Gold Coins. -Chet is the current player +Pat now has 1 Gold Coins. +Sue is the current player They have rolled a 3 -Chet is getting out of the penalty box -Chet's new location is 3 +Sue's new location is 3 The category is Rock -Rock Question 3 +Rock Question 0 Answer was correct!!!! -Chet now has 5 Gold Coins. -Pat is the current player +Sue now has 1 Gold Coins. +Chet is the current player They have rolled a 4 -Pat is not getting out of the penalty box +Chet's new location is 9 +The category is Science +Science Question 2 Question was incorrectly answered -Pat was sent to the penalty box -Sue is the current player +Chet was sent to the penalty box +Pat is the current player They have rolled a 5 -Sue is getting out of the penalty box -Sue's new location is 6 +Pat's new location is 10 The category is Sports -Sports Question 2 +Sports Question 0 Answer was correct!!!! -Sue now has 3 Gold Coins. -Chet is the current player +Pat now has 2 Gold Coins. +Sue is the current player They have rolled a 1 -Chet is getting out of the penalty box -Chet's new location is 4 +Sue's new location is 4 The category is Pop -Pop Question 4 +Pop Question 0 Answer was correct!!!! -Chet now has 6 Gold Coins. -Chet was added -They are player number 1 -Pat was added -They are player number 2 -Sue was added -They are player number 3 +Sue now has 2 Gold Coins. Chet is the current player They have rolled a 4 -Chet's new location is 4 -The category is Pop -Pop Question 0 +Chet is not getting out of the penalty box Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 3 -Pat's new location is 3 -The category is Rock -Rock Question 0 +Pat's new location is 1 +The category is Science +Science Question 3 Answer was correct!!!! -Pat now has 1 Gold Coins. +Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 -Sue's new location is 2 +Sue's new location is 6 The category is Sports -Sports Question 0 +Sports Question 1 Answer was correct!!!! -Sue now has 1 Gold Coins. +Sue now has 3 Gold Coins. Chet is the current player They have rolled a 4 Chet is not getting out of the penalty box Pat is the current player They have rolled a 4 -Pat's new location is 7 -The category is Rock -Rock Question 1 +Pat's new location is 5 +The category is Science +Science Question 4 Answer was correct!!!! -Pat now has 2 Gold Coins. +Pat now has 4 Gold Coins. Sue is the current player They have rolled a 1 -Sue's new location is 3 +Sue's new location is 7 The category is Rock -Rock Question 2 +Rock Question 1 Answer was correct!!!! -Sue now has 2 Gold Coins. +Sue now has 4 Gold Coins. Chet is the current player They have rolled a 3 Chet is getting out of the penalty box -Chet's new location is 7 -The category is Rock -Rock Question 3 +Chet's new location is 0 +The category is Pop +Pop Question 1 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 3 -Pat's new location is 10 -The category is Sports -Sports Question 1 +Pat's new location is 8 +The category is Pop +Pop Question 2 Answer was correct!!!! -Pat now has 3 Gold Coins. +Pat now has 5 Gold Coins. Sue is the current player They have rolled a 4 -Sue's new location is 7 +Sue's new location is 11 The category is Rock -Rock Question 4 +Rock Question 2 Answer was correct!!!! -Sue now has 3 Gold Coins. +Sue now has 5 Gold Coins. Chet is the current player They have rolled a 3 Chet is getting out of the penalty box -Chet's new location is 10 -The category is Sports -Sports Question 2 -Answer was correct!!!! -Chet now has 1 Gold Coins. -Pat is the current player -They have rolled a 2 -Pat's new location is 0 -The category is Pop -Pop Question 1 -Answer was correct!!!! -Pat now has 4 Gold Coins. -Sue is the current player -They have rolled a 4 -Sue's new location is 11 -The category is Rock -Rock Question 5 -Answer was correct!!!! -Sue now has 4 Gold Coins. -Chet is the current player -They have rolled a 5 -Chet is getting out of the penalty box Chet's new location is 3 The category is Rock -Rock Question 6 +Rock Question 3 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player -They have rolled a 3 -Pat's new location is 3 -The category is Rock -Rock Question 7 -Answer was correct!!!! -Pat now has 5 Gold Coins. -Sue is the current player -They have rolled a 3 -Sue's new location is 2 +They have rolled a 2 +Pat's new location is 10 The category is Sports -Sports Question 3 -Answer was correct!!!! -Sue now has 5 Gold Coins. -Chet is the current player -They have rolled a 1 -Chet is getting out of the penalty box -Chet's new location is 4 -The category is Pop -Pop Question 2 -Answer was correct!!!! -Chet now has 3 Gold Coins. -Pat is the current player -They have rolled a 5 -Pat's new location is 8 -The category is Pop -Pop Question 3 +Sports Question 2 Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added @@ -915,110 +883,108 @@ Pop Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player -They have rolled a 3 -Pat's new location is 3 -The category is Rock -Rock Question 0 -Answer was correct!!!! -Pat now has 1 Gold Coins. -Sue is the current player They have rolled a 5 -Sue's new location is 5 +Pat's new location is 5 The category is Science Science Question 0 Answer was correct!!!! +Pat now has 1 Gold Coins. +Sue is the current player +They have rolled a 3 +Sue's new location is 3 +The category is Rock +Rock Question 0 +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 5 -Chet's new location is 9 -The category is Science -Science Question 1 +They have rolled a 3 +Chet's new location is 7 +The category is Rock +Rock Question 1 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 1 -Pat's new location is 4 -The category is Pop -Pop Question 1 +Pat's new location is 6 +The category is Sports +Sports Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 6 -The category is Sports -Sports Question 0 +They have rolled a 5 +Sue's new location is 8 +The category is Pop +Pop Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 5 -Chet's new location is 2 -The category is Sports -Sports Question 1 +They have rolled a 4 +Chet's new location is 11 +The category is Rock +Rock Question 2 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 3 -Pat's new location is 7 -The category is Rock -Rock Question 1 +Pat's new location is 9 +The category is Science +Science Question 1 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 7 -The category is Rock -Rock Question 2 -Question was incorrectly answered -Sue was sent to the penalty box -Chet is the current player -They have rolled a 4 -Chet's new location is 6 -The category is Sports -Sports Question 2 +They have rolled a 5 +Sue's new location is 1 +The category is Science +Science Question 2 Answer was correct!!!! -Chet now has 4 Gold Coins. -Pat is the current player +Sue now has 3 Gold Coins. +Chet is the current player They have rolled a 5 -Pat's new location is 0 +Chet's new location is 4 The category is Pop Pop Question 2 Answer was correct!!!! +Chet now has 4 Gold Coins. +Pat is the current player +They have rolled a 1 +Pat's new location is 10 +The category is Sports +Sports Question 1 +Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 1 -Sue is getting out of the penalty box -Sue's new location is 8 -The category is Pop -Pop Question 3 +Sue's new location is 2 +The category is Sports +Sports Question 2 Answer was correct!!!! -Sue now has 3 Gold Coins. +Sue now has 4 Gold Coins. Chet is the current player -They have rolled a 1 -Chet's new location is 7 -The category is Rock -Rock Question 3 +They have rolled a 5 +Chet's new location is 9 +The category is Science +Science Question 3 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player -They have rolled a 1 +They have rolled a 3 Pat's new location is 1 The category is Science -Science Question 2 -Question was incorrectly answered -Pat was sent to the penalty box +Science Question 4 +Answer was correct!!!! +Pat now has 5 Gold Coins. Sue is the current player -They have rolled a 3 -Sue is getting out of the penalty box -Sue's new location is 11 +They have rolled a 1 +Sue's new location is 3 The category is Rock -Rock Question 4 -Answer was correct!!!! -Sue now has 4 Gold Coins. +Rock Question 3 +Question was incorrectly answered +Sue was sent to the penalty box Chet is the current player -They have rolled a 2 -Chet's new location is 9 +They have rolled a 4 +Chet's new location is 1 The category is Science -Science Question 3 +Science Question 5 Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added @@ -1028,138 +994,207 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player +They have rolled a 5 +Chet's new location is 5 +The category is Science +Science Question 0 +Answer was correct!!!! +Chet now has 1 Gold Coins. +Pat is the current player +They have rolled a 1 +Pat's new location is 1 +The category is Science +Science Question 1 +Answer was correct!!!! +Pat now has 1 Gold Coins. +Sue is the current player +They have rolled a 1 +Sue's new location is 1 +The category is Science +Science Question 2 +Answer was correct!!!! +Sue now has 1 Gold Coins. +Chet is the current player +They have rolled a 1 +Chet's new location is 6 +The category is Sports +Sports Question 0 +Question was incorrectly answered +Chet was sent to the penalty box +Pat is the current player They have rolled a 3 -Chet's new location is 3 +Pat's new location is 4 +The category is Pop +Pop Question 0 +Answer was correct!!!! +Pat now has 2 Gold Coins. +Sue is the current player +They have rolled a 2 +Sue's new location is 3 The category is Rock Rock Question 0 Answer was correct!!!! -Chet now has 1 Gold Coins. +Sue now has 2 Gold Coins. +Chet is the current player +They have rolled a 3 +Chet is getting out of the penalty box +Chet's new location is 9 +The category is Science +Science Question 3 +Answer was correct!!!! +Chet now has 2 Gold Coins. Pat is the current player They have rolled a 2 -Pat's new location is 2 +Pat's new location is 6 The category is Sports -Sports Question 0 +Sports Question 1 Answer was correct!!!! -Pat now has 1 Gold Coins. +Pat now has 3 Gold Coins. Sue is the current player They have rolled a 4 -Sue's new location is 4 -The category is Pop -Pop Question 0 +Sue's new location is 7 +The category is Rock +Rock Question 1 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 5 -Chet's new location is 8 -The category is Pop -Pop Question 1 +Chet's new location is 2 +The category is Sports +Sports Question 2 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 2 -Pat's new location is 4 +Pat's new location is 8 The category is Pop -Pop Question 2 +Pop Question 1 Answer was correct!!!! -Pat now has 2 Gold Coins. +Pat now has 4 Gold Coins. Sue is the current player They have rolled a 5 Sue is getting out of the penalty box -Sue's new location is 9 -The category is Science -Science Question 0 +Sue's new location is 0 +The category is Pop +Pop Question 2 Answer was correct!!!! -Sue now has 1 Gold Coins. +Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 1 -The category is Science -Science Question 1 +Chet's new location is 7 +The category is Rock +Rock Question 2 Answer was correct!!!! -Chet now has 2 Gold Coins. +Chet now has 3 Gold Coins. Pat is the current player They have rolled a 5 -Pat's new location is 9 +Pat's new location is 1 The category is Science -Science Question 2 +Science Question 4 Answer was correct!!!! -Pat now has 3 Gold Coins. +Pat now has 5 Gold Coins. Sue is the current player They have rolled a 5 -Sue is getting out of the penalty box -Sue's new location is 2 -The category is Sports -Sports Question 1 +Sue's new location is 5 +The category is Science +Science Question 5 Answer was correct!!!! -Sue now has 2 Gold Coins. +Sue now has 4 Gold Coins. Chet is the current player They have rolled a 4 -Chet is not getting out of the penalty box +Chet's new location is 11 +The category is Rock +Rock Question 3 +Answer was correct!!!! +Chet now has 4 Gold Coins. Pat is the current player They have rolled a 4 -Pat's new location is 1 +Pat's new location is 5 The category is Science -Science Question 3 +Science Question 6 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 4 -Sue is not getting out of the penalty box +Sue's new location is 9 +The category is Science +Science Question 7 +Answer was correct!!!! +Sue now has 5 Gold Coins. Chet is the current player They have rolled a 2 -Chet is not getting out of the penalty box +Chet's new location is 1 +The category is Science +Science Question 8 +Answer was correct!!!! +Chet now has 5 Gold Coins. Pat is the current player They have rolled a 2 Pat is not getting out of the penalty box Sue is the current player They have rolled a 5 -Sue is getting out of the penalty box -Sue's new location is 7 -The category is Rock -Rock Question 1 +Sue's new location is 2 +The category is Sports +Sports Question 3 Answer was correct!!!! -Sue now has 3 Gold Coins. +Sue now has 6 Gold Coins. +Chet was added +They are player number 1 +Pat was added +They are player number 2 +Sue was added +They are player number 3 Chet is the current player They have rolled a 2 -Chet is not getting out of the penalty box +Chet's new location is 2 +The category is Sports +Sports Question 0 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 4 -Pat is not getting out of the penalty box +Pat's new location is 4 +The category is Pop +Pop Question 0 +Answer was correct!!!! +Pat now has 1 Gold Coins. Sue is the current player They have rolled a 5 -Sue is getting out of the penalty box -Sue's new location is 0 -The category is Pop -Pop Question 3 +Sue's new location is 5 +The category is Science +Science Question 0 Answer was correct!!!! -Sue now has 4 Gold Coins. +Sue now has 1 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 6 -The category is Sports -Sports Question 2 +Chet's new location is 7 +The category is Rock +Rock Question 0 Answer was correct!!!! -Chet now has 3 Gold Coins. +Chet now has 1 Gold Coins. Pat is the current player They have rolled a 2 -Pat is not getting out of the penalty box +Pat's new location is 6 +The category is Sports +Sports Question 1 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 2 -Sue is not getting out of the penalty box +Sue's new location is 7 +The category is Rock +Rock Question 1 +Answer was correct!!!! +Sue now has 2 Gold Coins. Chet is the current player They have rolled a 3 -Chet is getting out of the penalty box -Chet's new location is 9 -The category is Science -Science Question 4 +Chet's new location is 10 +The category is Sports +Sports Question 2 Answer was correct!!!! -Chet now has 4 Gold Coins. +Chet now has 2 Gold Coins. Pat is the current player They have rolled a 2 Pat is not getting out of the penalty box @@ -1167,34 +1202,67 @@ Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 3 -Sue is getting out of the penalty box -Sue's new location is 3 -The category is Rock -Rock Question 2 +Sue's new location is 10 +The category is Sports +Sports Question 3 Answer was correct!!!! -Sue now has 5 Gold Coins. +Sue now has 3 Gold Coins. Chet is the current player They have rolled a 3 -Chet is getting out of the penalty box -Chet's new location is 0 -The category is Pop -Pop Question 4 +Chet's new location is 1 +The category is Science +Science Question 1 Answer was correct!!!! -Chet now has 5 Gold Coins. +Chet now has 3 Gold Coins. Pat is the current player They have rolled a 2 Pat is not getting out of the penalty box Sue is the current player They have rolled a 4 -Sue is not getting out of the penalty box +Sue's new location is 2 +The category is Sports +Sports Question 4 +Answer was correct!!!! +Sue now has 4 Gold Coins. Chet is the current player They have rolled a 3 -Chet is getting out of the penalty box -Chet's new location is 3 +Chet's new location is 4 +The category is Pop +Pop Question 1 +Answer was correct!!!! +Chet now has 4 Gold Coins. +Pat is the current player +They have rolled a 1 +Pat is getting out of the penalty box +Pat's new location is 7 +The category is Rock +Rock Question 2 +Question was incorrectly answered +Pat was sent to the penalty box +Sue is the current player +They have rolled a 1 +Sue's new location is 3 The category is Rock Rock Question 3 Answer was correct!!!! -Chet now has 6 Gold Coins. +Sue now has 5 Gold Coins. +Chet is the current player +They have rolled a 2 +Chet's new location is 6 +The category is Sports +Sports Question 5 +Answer was correct!!!! +Chet now has 5 Gold Coins. +Pat is the current player +They have rolled a 2 +Pat is not getting out of the penalty box +Sue is the current player +They have rolled a 2 +Sue's new location is 5 +The category is Science +Science Question 2 +Answer was correct!!!! +Sue now has 6 Gold Coins. Chet was added They are player number 1 Pat was added @@ -1202,386 +1270,384 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 1 -Chet's new location is 1 +They have rolled a 5 +Chet's new location is 5 The category is Science Science Question 0 -Question was incorrectly answered -Chet was sent to the penalty box -Pat is the current player -They have rolled a 1 -Pat's new location is 1 -The category is Science -Science Question 1 Answer was correct!!!! -Pat now has 1 Gold Coins. -Sue is the current player +Chet now has 1 Gold Coins. +Pat is the current player They have rolled a 2 -Sue's new location is 2 +Pat's new location is 2 The category is Sports Sports Question 0 Answer was correct!!!! +Pat now has 1 Gold Coins. +Sue is the current player +They have rolled a 1 +Sue's new location is 1 +The category is Science +Science Question 1 +Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player -They have rolled a 2 -Chet is not getting out of the penalty box +They have rolled a 1 +Chet's new location is 6 +The category is Sports +Sports Question 1 +Answer was correct!!!! +Chet now has 2 Gold Coins. Pat is the current player -They have rolled a 2 -Pat's new location is 3 -The category is Rock -Rock Question 0 +They have rolled a 4 +Pat's new location is 6 +The category is Sports +Sports Question 2 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player -They have rolled a 5 -Sue's new location is 7 -The category is Rock -Rock Question 1 +They have rolled a 3 +Sue's new location is 4 +The category is Pop +Pop Question 0 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player -They have rolled a 2 -Chet is not getting out of the penalty box +They have rolled a 3 +Chet's new location is 9 +The category is Science +Science Question 2 +Answer was correct!!!! +Chet now has 3 Gold Coins. Pat is the current player They have rolled a 1 -Pat's new location is 4 -The category is Pop -Pop Question 0 -Answer was correct!!!! -Pat now has 3 Gold Coins. +Pat's new location is 7 +The category is Rock +Rock Question 0 +Question was incorrectly answered +Pat was sent to the penalty box Sue is the current player -They have rolled a 1 -Sue's new location is 8 -The category is Pop -Pop Question 1 +They have rolled a 5 +Sue's new location is 9 +The category is Science +Science Question 3 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player -They have rolled a 4 -Chet is not getting out of the penalty box -Pat is the current player They have rolled a 3 -Pat's new location is 7 -The category is Rock -Rock Question 2 -Answer was correct!!!! -Pat now has 4 Gold Coins. -Sue is the current player -They have rolled a 3 -Sue's new location is 11 -The category is Rock -Rock Question 3 +Chet's new location is 0 +The category is Pop +Pop Question 1 Answer was correct!!!! -Sue now has 4 Gold Coins. -Chet is the current player -They have rolled a 1 -Chet is getting out of the penalty box -Chet's new location is 2 -The category is Sports -Sports Question 1 -Question was incorrectly answered -Chet was sent to the penalty box +Chet now has 4 Gold Coins. Pat is the current player They have rolled a 5 +Pat is getting out of the penalty box Pat's new location is 0 The category is Pop Pop Question 2 Answer was correct!!!! -Pat now has 5 Gold Coins. +Pat now has 3 Gold Coins. Sue is the current player -They have rolled a 3 -Sue's new location is 2 -The category is Sports -Sports Question 2 -Answer was correct!!!! -Sue now has 5 Gold Coins. -Chet is the current player -They have rolled a 5 -Chet is getting out of the penalty box -Chet's new location is 7 -The category is Rock -Rock Question 4 -Answer was correct!!!! -Chet now has 1 Gold Coins. -Pat is the current player They have rolled a 2 -Pat's new location is 2 -The category is Sports -Sports Question 3 +Sue's new location is 11 +The category is Rock +Rock Question 1 Answer was correct!!!! -Pat now has 6 Gold Coins. -Chet was added -They are player number 1 -Pat was added -They are player number 2 -Sue was added -They are player number 3 +Sue now has 4 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 5 The category is Science -Science Question 0 +Science Question 4 Answer was correct!!!! -Chet now has 1 Gold Coins. +Chet now has 5 Gold Coins. Pat is the current player They have rolled a 3 Pat's new location is 3 The category is Rock -Rock Question 0 +Rock Question 2 Answer was correct!!!! -Pat now has 1 Gold Coins. +Pat now has 4 Gold Coins. Sue is the current player They have rolled a 4 -Sue's new location is 4 -The category is Pop -Pop Question 0 +Sue's new location is 3 +The category is Rock +Rock Question 3 Answer was correct!!!! -Sue now has 1 Gold Coins. +Sue now has 5 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 8 The category is Pop -Pop Question 1 +Pop Question 3 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 5 Pat's new location is 8 The category is Pop -Pop Question 2 +Pop Question 4 Answer was correct!!!! -Pat now has 2 Gold Coins. +Pat now has 5 Gold Coins. Sue is the current player They have rolled a 1 -Sue's new location is 5 -The category is Science -Science Question 1 +Sue's new location is 4 +The category is Pop +Pop Question 5 Answer was correct!!!! -Sue now has 2 Gold Coins. +Sue now has 6 Gold Coins. +Chet was added +They are player number 1 +Pat was added +They are player number 2 +Sue was added +They are player number 3 Chet is the current player They have rolled a 4 -Chet is not getting out of the penalty box +Chet's new location is 4 +The category is Pop +Pop Question 0 +Answer was correct!!!! +Chet now has 1 Gold Coins. Pat is the current player They have rolled a 4 -Pat's new location is 0 +Pat's new location is 4 The category is Pop -Pop Question 3 +Pop Question 1 Answer was correct!!!! -Pat now has 3 Gold Coins. +Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 -Sue's new location is 9 -The category is Science -Science Question 2 +Sue's new location is 4 +The category is Pop +Pop Question 2 Answer was correct!!!! -Sue now has 3 Gold Coins. +Sue now has 1 Gold Coins. Chet is the current player They have rolled a 5 -Chet is getting out of the penalty box -Chet's new location is 1 +Chet's new location is 9 The category is Science -Science Question 3 +Science Question 0 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 2 -Pat's new location is 2 +Pat's new location is 6 The category is Sports Sports Question 0 Answer was correct!!!! -Pat now has 4 Gold Coins. +Pat now has 2 Gold Coins. Sue is the current player They have rolled a 2 -Sue's new location is 11 -The category is Rock -Rock Question 1 +Sue's new location is 6 +The category is Sports +Sports Question 1 Answer was correct!!!! -Sue now has 4 Gold Coins. +Sue now has 2 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 6 +Chet's new location is 2 The category is Sports -Sports Question 1 +Sports Question 2 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 1 -Pat's new location is 3 +Pat's new location is 7 The category is Rock -Rock Question 2 +Rock Question 0 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 1 -Sue's new location is 0 -The category is Pop -Pop Question 4 +Sue's new location is 7 +The category is Rock +Rock Question 1 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 3 -Chet is getting out of the penalty box -Chet's new location is 9 +Chet's new location is 5 The category is Science -Science Question 4 +Science Question 1 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 5 Pat is getting out of the penalty box -Pat's new location is 8 +Pat's new location is 0 The category is Pop -Pop Question 5 +Pop Question 3 Answer was correct!!!! -Pat now has 5 Gold Coins. +Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 Sue is getting out of the penalty box -Sue's new location is 5 -The category is Science -Science Question 5 +Sue's new location is 0 +The category is Pop +Pop Question 4 Answer was correct!!!! -Sue now has 5 Gold Coins. +Sue now has 3 Gold Coins. Chet is the current player They have rolled a 2 -Chet is not getting out of the penalty box +Chet's new location is 7 +The category is Rock +Rock Question 2 +Answer was correct!!!! +Chet now has 4 Gold Coins. Pat is the current player They have rolled a 5 -Pat is getting out of the penalty box -Pat's new location is 1 +Pat's new location is 5 The category is Science -Science Question 6 +Science Question 2 Answer was correct!!!! -Pat now has 6 Gold Coins. -Chet was added -They are player number 1 -Pat was added -They are player number 2 -Sue was added -They are player number 3 -Chet is the current player +Pat now has 4 Gold Coins. +Sue is the current player They have rolled a 2 -Chet's new location is 2 +Sue's new location is 2 The category is Sports -Sports Question 0 +Sports Question 3 Answer was correct!!!! -Chet now has 1 Gold Coins. -Pat is the current player +Sue now has 4 Gold Coins. +Chet is the current player They have rolled a 2 -Pat's new location is 2 +Chet's new location is 9 +The category is Science +Science Question 3 +Answer was correct!!!! +Chet now has 5 Gold Coins. +Pat is the current player +They have rolled a 1 +Pat's new location is 6 The category is Sports -Sports Question 1 +Sports Question 4 Answer was correct!!!! -Pat now has 1 Gold Coins. +Pat now has 5 Gold Coins. Sue is the current player They have rolled a 1 -Sue's new location is 1 -The category is Science -Science Question 0 +Sue's new location is 3 +The category is Rock +Rock Question 3 Answer was correct!!!! -Sue now has 1 Gold Coins. +Sue now has 5 Gold Coins. Chet is the current player -They have rolled a 1 +They have rolled a 3 +Chet's new location is 0 +The category is Pop +Pop Question 5 +Answer was correct!!!! +Chet now has 6 Gold Coins. +Chet was added +They are player number 1 +Pat was added +They are player number 2 +Sue was added +They are player number 3 +Chet is the current player +They have rolled a 3 Chet's new location is 3 The category is Rock Rock Question 0 Answer was correct!!!! -Chet now has 2 Gold Coins. +Chet now has 1 Gold Coins. Pat is the current player -They have rolled a 3 -Pat's new location is 5 +They have rolled a 1 +Pat's new location is 1 The category is Science -Science Question 1 +Science Question 0 Answer was correct!!!! -Pat now has 2 Gold Coins. +Pat now has 1 Gold Coins. Sue is the current player -They have rolled a 3 -Sue's new location is 4 -The category is Pop -Pop Question 0 +They have rolled a 1 +Sue's new location is 1 +The category is Science +Science Question 1 Answer was correct!!!! -Sue now has 2 Gold Coins. +Sue now has 1 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 4 The category is Pop -Pop Question 1 +Pop Question 0 Answer was correct!!!! -Chet now has 3 Gold Coins. +Chet now has 2 Gold Coins. Pat is the current player -They have rolled a 1 -Pat's new location is 6 -The category is Sports -Sports Question 2 -Answer was correct!!!! -Pat now has 3 Gold Coins. -Sue is the current player -They have rolled a 1 -Sue's new location is 5 -The category is Science -Science Question 2 -Answer was correct!!!! -Sue now has 3 Gold Coins. -Chet is the current player They have rolled a 2 -Chet's new location is 6 -The category is Sports -Sports Question 3 -Question was incorrectly answered -Chet was sent to the penalty box -Pat is the current player -They have rolled a 5 -Pat's new location is 11 +Pat's new location is 3 The category is Rock Rock Question 1 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player +They have rolled a 5 +Sue's new location is 6 +The category is Sports +Sports Question 0 +Question was incorrectly answered +Sue was sent to the penalty box +Chet is the current player They have rolled a 3 -Sue's new location is 8 -The category is Pop -Pop Question 2 +Chet's new location is 7 +The category is Rock +Rock Question 2 Answer was correct!!!! -Sue now has 4 Gold Coins. -Chet is the current player +Chet now has 3 Gold Coins. +Pat is the current player They have rolled a 3 -Chet is getting out of the penalty box -Chet's new location is 9 -The category is Science -Science Question 3 +Pat is getting out of the penalty box +Pat's new location is 6 +The category is Sports +Sports Question 1 Question was incorrectly answered -Chet was sent to the penalty box -Pat is the current player +Pat was sent to the penalty box +Sue is the current player They have rolled a 4 -Pat is not getting out of the penalty box +Sue is not getting out of the penalty box Question was incorrectly answered -Pat was sent to the penalty box +Sue was sent to the penalty box +Chet is the current player +They have rolled a 5 +Chet's new location is 0 +The category is Pop +Pop Question 1 +Answer was correct!!!! +Chet now has 4 Gold Coins. +Pat is the current player +They have rolled a 2 +Pat is not getting out of the penalty box Sue is the current player They have rolled a 5 -Sue's new location is 1 -The category is Science -Science Question 4 +Sue is getting out of the penalty box +Sue's new location is 11 +The category is Rock +Rock Question 3 Answer was correct!!!! -Sue now has 5 Gold Coins. +Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 -Chet is not getting out of the penalty box -Pat is the current player -They have rolled a 5 -Pat is getting out of the penalty box -Pat's new location is 4 -The category is Pop -Pop Question 3 +Chet's new location is 2 +The category is Sports +Sports Question 2 Answer was correct!!!! -Pat now has 4 Gold Coins. +Chet now has 5 Gold Coins. +Pat is the current player +They have rolled a 4 +Pat is not getting out of the penalty box Sue is the current player -They have rolled a 2 +They have rolled a 4 Sue's new location is 3 The category is Rock -Rock Question 2 +Rock Question 4 Answer was correct!!!! -Sue now has 6 Gold Coins. +Sue now has 3 Gold Coins. +Chet is the current player +They have rolled a 2 +Chet's new location is 4 +The category is Pop +Pop Question 2 +Answer was correct!!!! +Chet now has 6 Gold Coins. Chet was added They are player number 1 Pat was added @@ -1589,251 +1655,122 @@ They are player number 2 Sue was added They are player number 3 Chet is the current player -They have rolled a 4 -Chet's new location is 4 -The category is Pop -Pop Question 0 -Answer was correct!!!! -Chet now has 1 Gold Coins. -Pat is the current player -They have rolled a 4 -Pat's new location is 4 -The category is Pop -Pop Question 1 -Answer was correct!!!! -Pat now has 1 Gold Coins. -Sue is the current player They have rolled a 2 -Sue's new location is 2 +Chet's new location is 2 The category is Sports Sports Question 0 Answer was correct!!!! -Sue now has 1 Gold Coins. -Chet is the current player -They have rolled a 2 -Chet's new location is 6 -The category is Sports -Sports Question 1 -Answer was correct!!!! -Chet now has 2 Gold Coins. +Chet now has 1 Gold Coins. Pat is the current player They have rolled a 5 -Pat's new location is 9 +Pat's new location is 5 The category is Science Science Question 0 Answer was correct!!!! -Pat now has 2 Gold Coins. +Pat now has 1 Gold Coins. Sue is the current player They have rolled a 3 -Sue's new location is 5 -The category is Science -Science Question 1 +Sue's new location is 3 +The category is Rock +Rock Question 0 Answer was correct!!!! -Sue now has 2 Gold Coins. +Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 -Chet's new location is 9 +Chet's new location is 5 The category is Science -Science Question 2 +Science Question 1 Answer was correct!!!! -Chet now has 3 Gold Coins. +Chet now has 2 Gold Coins. Pat is the current player They have rolled a 2 -Pat's new location is 11 +Pat's new location is 7 The category is Rock -Rock Question 0 +Rock Question 1 Answer was correct!!!! -Pat now has 3 Gold Coins. +Pat now has 2 Gold Coins. Sue is the current player They have rolled a 4 -Sue's new location is 9 -The category is Science -Science Question 3 +Sue's new location is 7 +The category is Rock +Rock Question 2 Answer was correct!!!! -Sue now has 3 Gold Coins. +Sue now has 2 Gold Coins. Chet is the current player They have rolled a 4 -Chet's new location is 1 +Chet's new location is 9 The category is Science -Science Question 4 +Science Question 2 Answer was correct!!!! -Chet now has 4 Gold Coins. +Chet now has 3 Gold Coins. Pat is the current player They have rolled a 1 -Pat's new location is 0 +Pat's new location is 8 The category is Pop -Pop Question 2 +Pop Question 0 Answer was correct!!!! -Pat now has 4 Gold Coins. +Pat now has 3 Gold Coins. Sue is the current player They have rolled a 1 -Sue's new location is 10 -The category is Sports -Sports Question 2 +Sue's new location is 8 +The category is Pop +Pop Question 1 Answer was correct!!!! -Sue now has 4 Gold Coins. +Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 -Chet's new location is 6 +Chet's new location is 2 The category is Sports -Sports Question 3 +Sports Question 1 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 3 -Pat's new location is 3 +Pat's new location is 11 The category is Rock -Rock Question 1 +Rock Question 3 Answer was correct!!!! -Pat now has 5 Gold Coins. +Pat now has 4 Gold Coins. Sue is the current player They have rolled a 2 -Sue's new location is 0 -The category is Pop -Pop Question 3 +Sue's new location is 10 +The category is Sports +Sports Question 2 Answer was correct!!!! -Sue now has 5 Gold Coins. +Sue now has 4 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box -Chet's new location is 11 +Chet's new location is 7 The category is Rock -Rock Question 2 +Rock Question 4 Answer was correct!!!! -Chet now has 5 Gold Coins. +Chet now has 4 Gold Coins. Pat is the current player They have rolled a 2 -Pat's new location is 5 +Pat's new location is 1 The category is Science -Science Question 5 -Answer was correct!!!! -Pat now has 6 Gold Coins. -Chet was added -They are player number 1 -Pat was added -They are player number 2 -Sue was added -They are player number 3 -Chet is the current player -They have rolled a 4 -Chet's new location is 4 -The category is Pop -Pop Question 0 -Answer was correct!!!! -Chet now has 1 Gold Coins. -Pat is the current player -They have rolled a 2 -Pat's new location is 2 -The category is Sports -Sports Question 0 +Science Question 3 Answer was correct!!!! -Pat now has 1 Gold Coins. +Pat now has 5 Gold Coins. Sue is the current player -They have rolled a 1 -Sue's new location is 1 -The category is Science -Science Question 0 -Answer was correct!!!! -Sue now has 1 Gold Coins. -Chet is the current player -They have rolled a 4 -Chet's new location is 8 -The category is Pop -Pop Question 1 -Answer was correct!!!! -Chet now has 2 Gold Coins. -Pat is the current player They have rolled a 4 -Pat's new location is 6 -The category is Sports -Sports Question 1 -Answer was correct!!!! -Pat now has 2 Gold Coins. -Sue is the current player -They have rolled a 1 Sue's new location is 2 The category is Sports -Sports Question 2 -Answer was correct!!!! -Sue now has 2 Gold Coins. -Chet is the current player -They have rolled a 4 -Chet's new location is 0 -The category is Pop -Pop Question 2 -Answer was correct!!!! -Chet now has 3 Gold Coins. -Pat is the current player -They have rolled a 5 -Pat's new location is 11 -The category is Rock -Rock Question 0 -Answer was correct!!!! -Pat now has 3 Gold Coins. -Sue is the current player -They have rolled a 3 -Sue's new location is 5 -The category is Science -Science Question 1 -Answer was correct!!!! -Sue now has 3 Gold Coins. -Chet is the current player -They have rolled a 3 -Chet's new location is 3 -The category is Rock -Rock Question 1 -Question was incorrectly answered -Chet was sent to the penalty box -Pat is the current player -They have rolled a 5 -Pat's new location is 4 -The category is Pop -Pop Question 3 -Answer was correct!!!! -Pat now has 4 Gold Coins. -Sue is the current player -They have rolled a 4 -Sue's new location is 9 -The category is Science -Science Question 2 -Answer was correct!!!! -Sue now has 4 Gold Coins. -Chet is the current player -They have rolled a 2 -Chet is not getting out of the penalty box -Pat is the current player -They have rolled a 4 -Pat's new location is 8 -The category is Pop -Pop Question 4 -Answer was correct!!!! -Pat now has 5 Gold Coins. -Sue is the current player -They have rolled a 3 -Sue's new location is 0 -The category is Pop -Pop Question 5 +Sports Question 3 Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player -They have rolled a 5 -Chet is getting out of the penalty box -Chet's new location is 8 -The category is Pop -Pop Question 6 +They have rolled a 2 +Chet's new location is 9 +The category is Science +Science Question 4 Answer was correct!!!! -Chet now has 4 Gold Coins. +Chet now has 5 Gold Coins. Pat is the current player -They have rolled a 4 -Pat's new location is 0 -The category is Pop -Pop Question 7 -Question was incorrectly answered -Pat was sent to the penalty box -Sue is the current player -They have rolled a 2 -Sue's new location is 2 +They have rolled a 1 +Pat's new location is 2 The category is Sports -Sports Question 3 +Sports Question 4 Answer was correct!!!! -Sue now has 6 Gold Coins. +Pat now has 6 Gold Coins. From d0e52b4ae40a6e533b71bde324886ae55d02d37d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:12:54 +0800 Subject: [PATCH 56/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B5=8B=E8=AF=95=EF=BC=8C=E5=B9=B6=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E5=8E=9F=E6=9D=A5=E8=B0=83=E7=94=A8getOutOfPenaltyBox->tempGet?= =?UTF-8?q?OutOfPenaltyBox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 9f05fc0..e33d64f 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -46,7 +46,7 @@ public void roll(int roll) { if (players.get(currentPlayer).isInPenaltyBox) { if (roll % 2 != 0) { - getOutOfPenaltyBox(); + tempGetOutOfPenaltyBox(); players.get(currentPlayer).moveTo(roll); askQuestion(); } else { From d32eab69bb9885273010c1cb1ef8b48cfe47601e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:13:33 +0800 Subject: [PATCH 57/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2getOutOfPenaltyBox=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index e33d64f..33e8122 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -46,7 +46,7 @@ public void roll(int roll) { if (players.get(currentPlayer).isInPenaltyBox) { if (roll % 2 != 0) { - tempGetOutOfPenaltyBox(); + getOutOfPenaltyBox(); players.get(currentPlayer).moveTo(roll); askQuestion(); } else { @@ -101,12 +101,7 @@ private void stayInPenaltyBox() { System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); } - private void getOutOfPenaltyBox() { - isGettingOutOfPenaltyBox = true; - System.out.println(getCurrentPlayerName() + " is getting out of the penalty box"); - } - - private void tempGetOutOfPenaltyBox(){ + private void getOutOfPenaltyBox(){ players.get(currentPlayer).isInPenaltyBox = false; System.out.println(getCurrentPlayerName() + " is getting out of the penalty box"); } From 6e412543e3f67760c6aacff612b2a86625f7184c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:15:15 +0800 Subject: [PATCH 58/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2stayInPenaltyBox=E8=B0=83=E7=94=A8=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 33e8122..bea3e2c 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -50,7 +50,7 @@ public void roll(int roll) { players.get(currentPlayer).moveTo(roll); askQuestion(); } else { - stayInPenaltyBox(); + tempStayInPenaltyBox(); } } else { players.get(currentPlayer).moveTo(roll); @@ -101,6 +101,11 @@ private void stayInPenaltyBox() { System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); } + private void tempStayInPenaltyBox() { + isGettingOutOfPenaltyBox = false; + System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); + } + private void getOutOfPenaltyBox(){ players.get(currentPlayer).isInPenaltyBox = false; System.out.println(getCurrentPlayerName() + " is getting out of the penalty box"); @@ -115,6 +120,6 @@ private String getCurrentPlayerName() { } private boolean nobodyWin() { - return !players.stream().anyMatch(Player::isWin); + return players.stream().noneMatch(Player::isWin); } } From 5b11e15083ba0f423f1d8e89c1e61f33c65d9e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:16:13 +0800 Subject: [PATCH 59/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E5=8E=9F=E6=9C=89stayInPenaltyBox=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index bea3e2c..1d2b886 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -50,7 +50,7 @@ public void roll(int roll) { players.get(currentPlayer).moveTo(roll); askQuestion(); } else { - tempStayInPenaltyBox(); + stayInPenaltyBox(); } } else { players.get(currentPlayer).moveTo(roll); @@ -97,12 +97,6 @@ private void sendToPenaltyBox() { } private void stayInPenaltyBox() { - isGettingOutOfPenaltyBox = false; - System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); - } - - private void tempStayInPenaltyBox() { - isGettingOutOfPenaltyBox = false; System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); } From 73a4dea0cd2d95c079e053faeb1aac3108d796c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:23:15 +0800 Subject: [PATCH 60/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9C=A8=20Pl?= =?UTF-8?q?ayer=E4=B8=AD=E5=88=9B=E5=BB=BAsendToPenaltyBox=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Player.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index f7dd787..af132d1 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -35,6 +35,11 @@ public void gainGoldCoin() { System.out.println(name + " now has " + goldCoin + " Gold Coins."); } + public void sendToPenaltyBox() { + System.out.println(name + " was sent to the penalty box"); + isInPenaltyBox = true; + } + public boolean isWin() { return goldCoin >= 6; } From ced1793cf419a48f3fe71e42c00b81ae5ccbe552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:23:59 +0800 Subject: [PATCH 61/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=20sendToPenaltyBox=20=E4=B8=BA=20players.get().sendTo?= =?UTF-8?q?PenaltyBox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 1d2b886..d94a0c7 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -88,19 +88,14 @@ public void correctAnswer() { public void wrongAnswer() { System.out.println("Question was incorrectly answered"); - sendToPenaltyBox(); - } - - private void sendToPenaltyBox() { - System.out.println(getCurrentPlayerName() + " was sent to the penalty box"); - players.get(currentPlayer).isInPenaltyBox = true; + players.get(currentPlayer).sendToPenaltyBox(); } private void stayInPenaltyBox() { System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); } - private void getOutOfPenaltyBox(){ + private void getOutOfPenaltyBox() { players.get(currentPlayer).isInPenaltyBox = false; System.out.println(getCurrentPlayerName() + " is getting out of the penalty box"); } From aca8e0e67aef6e3bd47de0e96d457b933fdba205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:25:40 +0800 Subject: [PATCH 62/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9C=A8=20Pl?= =?UTF-8?q?ayer=20=E4=B8=AD=E5=88=9B=E5=BB=BA=20getOutOfPenaltyBox=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Player.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index af132d1..12f8511 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -36,10 +36,16 @@ public void gainGoldCoin() { } public void sendToPenaltyBox() { - System.out.println(name + " was sent to the penalty box"); isInPenaltyBox = true; + System.out.println(name + " was sent to the penalty box"); } + private void getOutOfPenaltyBox() { + isInPenaltyBox = false; + System.out.println(name + " is getting out of the penalty box"); + } + + public boolean isWin() { return goldCoin >= 6; } From 2c41b46429b10038fa9cb7454f7e7b285981147f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:26:32 +0800 Subject: [PATCH 63/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=20getOutOfPenaltyBox=20=E4=B8=BA=20players.get().getO?= =?UTF-8?q?utOfPenaltyBox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 7 +------ src/main/java/com/adaptionsoft/games/Player.java | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index d94a0c7..30693cd 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -46,7 +46,7 @@ public void roll(int roll) { if (players.get(currentPlayer).isInPenaltyBox) { if (roll % 2 != 0) { - getOutOfPenaltyBox(); + players.get(currentPlayer).getOutOfPenaltyBox(); players.get(currentPlayer).moveTo(roll); askQuestion(); } else { @@ -95,11 +95,6 @@ private void stayInPenaltyBox() { System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); } - private void getOutOfPenaltyBox() { - players.get(currentPlayer).isInPenaltyBox = false; - System.out.println(getCurrentPlayerName() + " is getting out of the penalty box"); - } - private int getCurrentPlace() { return players.get(currentPlayer).place; } diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index 12f8511..dc1618d 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -40,7 +40,7 @@ public void sendToPenaltyBox() { System.out.println(name + " was sent to the penalty box"); } - private void getOutOfPenaltyBox() { + public void getOutOfPenaltyBox() { isInPenaltyBox = false; System.out.println(name + " is getting out of the penalty box"); } From 79ab54f3115e8f6f9298196206453b7f5362c885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:27:37 +0800 Subject: [PATCH 64/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E7=AE=80?= =?UTF-8?q?=E5=8C=96correctAnswer=E4=B8=AD=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 30693cd..20f6d24 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -75,12 +75,7 @@ private void nextPlayer() { } public void correctAnswer() { - if (players.get(currentPlayer).isInPenaltyBox) { - if (isGettingOutOfPenaltyBox) { - System.out.println("Answer was correct!!!!"); - players.get(currentPlayer).gainGoldCoin(); - } - } else { + if (!players.get(currentPlayer).isInPenaltyBox) { System.out.println("Answer was correct!!!!"); players.get(currentPlayer).gainGoldCoin(); } From 68083995e55682b72aed83dc61eacb3b89e6c93c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:34:55 +0800 Subject: [PATCH 65/83] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBug:=201.=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B5=8B=E8=AF=95=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=9C=A8?= =?UTF-8?q?=E6=83=A9=E7=BD=9A=E5=8C=BA=E4=B8=AD=E5=9B=9E=E7=AD=94=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E7=9A=84=E6=83=85=E5=86=B5=E3=80=82=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=202=E3=80=82=20=E5=9C=A8wrongAnswer=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E5=9C=A8=E6=83=A9=E7=BD=9A?= =?UTF-8?q?=E5=8C=BA=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 6 ++++-- .../adaptionsoft/games/GameTest.itsLockedDown.approved.txt | 6 ------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 20f6d24..aff772f 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -82,8 +82,10 @@ public void correctAnswer() { } public void wrongAnswer() { - System.out.println("Question was incorrectly answered"); - players.get(currentPlayer).sendToPenaltyBox(); + if (!players.get(currentPlayer).isInPenaltyBox) { + System.out.println("Question was incorrectly answered"); + players.get(currentPlayer).sendToPenaltyBox(); + } } private void stayInPenaltyBox() { diff --git a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt index 15e17a1..22ff98c 100644 --- a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt +++ b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt @@ -799,8 +799,6 @@ Sue now has 2 Gold Coins. Chet is the current player They have rolled a 4 Chet is not getting out of the penalty box -Question was incorrectly answered -Chet was sent to the penalty box Pat is the current player They have rolled a 3 Pat's new location is 1 @@ -1198,8 +1196,6 @@ Chet now has 2 Gold Coins. Pat is the current player They have rolled a 2 Pat is not getting out of the penalty box -Question was incorrectly answered -Pat was sent to the penalty box Sue is the current player They have rolled a 3 Sue's new location is 10 @@ -1604,8 +1600,6 @@ Pat was sent to the penalty box Sue is the current player They have rolled a 4 Sue is not getting out of the penalty box -Question was incorrectly answered -Sue was sent to the penalty box Chet is the current player They have rolled a 5 Chet's new location is 0 From 8fa27dbfdc1399ed5f6c0cf9523d0191dc5b050e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 15:35:19 +0800 Subject: [PATCH 66/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89isGettingOutOfPenaltyBox=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index aff772f..726cfbc 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -10,7 +10,6 @@ public class Game { HashMap> questionMap = new HashMap<>(); int currentPlayer = 0; - boolean isGettingOutOfPenaltyBox; public Game() { for (Category category : Category.values()) { From c93428aa0e9581a3d1a702257415a0d8de449491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 16:46:13 +0800 Subject: [PATCH 67/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A1.=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B5=8B=E8=AF=95=EF=BC=8C=E6=B7=BB=E5=8A=A0Blues?= =?UTF-8?q?=E5=92=8CHistory=E7=B1=BB=E5=88=AB=E9=97=AE=E9=A2=98=20=20=20?= =?UTF-8?q?=20=20=202.=20=E5=9C=A8Category=E6=9E=9A=E4=B8=BE=E7=B1=BB?= =?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0Blues=E5=92=8CHistory=E7=B1=BB?= =?UTF-8?q?=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Category.java | 7 +- .../games/GameTest.itsLockedDown.approved.txt | 696 +++++++++--------- 2 files changed, 354 insertions(+), 349 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Category.java b/src/main/java/com/adaptionsoft/games/Category.java index 511bd93..2f39548 100644 --- a/src/main/java/com/adaptionsoft/games/Category.java +++ b/src/main/java/com/adaptionsoft/games/Category.java @@ -7,7 +7,12 @@ * Description: **/ public enum Category { - POP("Pop"), SCIENCE("Science"), SPORTS("Sports"), ROCK("Rock"); + POP("Pop"), + SCIENCE("Science"), + SPORTS("Sports"), + ROCK("Rock"), + BLUES("Blues"), + HISTORY("History"); private String value; diff --git a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt index 22ff98c..b453c23 100644 --- a/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt +++ b/src/test/java/com/adaptionsoft/games/GameTest.itsLockedDown.approved.txt @@ -7,8 +7,8 @@ They are player number 3 Chet is the current player They have rolled a 4 Chet's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player @@ -21,100 +21,100 @@ Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 4 -The category is Pop -Pop Question 1 +The category is Blues +Blues Question 1 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 7 -The category is Rock -Rock Question 0 +The category is Science +Science Question 0 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 6 -The category is Sports -Sports Question 1 +The category is Pop +Pop Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 7 -The category is Rock -Rock Question 1 +The category is Science +Science Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 9 -The category is Science -Science Question 0 +The category is Rock +Rock Question 0 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 11 -The category is Rock -Rock Question 2 +The category is History +History Question 0 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 0 The category is Pop -Pop Question 2 +Pop Question 1 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 1 The category is Science -Science Question 1 +Science Question 2 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 2 Pat's new location is 1 The category is Science -Science Question 2 +Science Question 3 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 3 The category is Rock -Rock Question 3 +Rock Question 1 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 5 Chet's new location is 6 -The category is Sports -Sports Question 2 +The category is Pop +Pop Question 2 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 2 The category is Sports -Sports Question 3 +Sports Question 1 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 5 Sue is getting out of the penalty box Sue's new location is 8 -The category is Pop -Pop Question 3 +The category is Sports +Sports Question 2 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 8 -The category is Pop -Pop Question 4 +The category is Sports +Sports Question 3 Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added @@ -154,37 +154,37 @@ Chet was sent to the penalty box Pat is the current player They have rolled a 3 Pat's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 8 -The category is Pop -Pop Question 1 +The category is Sports +Sports Question 0 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box Chet's new location is 8 -The category is Pop -Pop Question 2 +The category is Sports +Sports Question 1 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 4 Pat's new location is 8 -The category is Pop -Pop Question 3 +The category is Sports +Sports Question 2 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 10 -The category is Sports -Sports Question 0 +The category is Blues +Blues Question 1 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player @@ -193,8 +193,8 @@ Chet is not getting out of the penalty box Pat is the current player They have rolled a 1 Pat's new location is 9 -The category is Science -Science Question 2 +The category is Rock +Rock Question 2 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player @@ -204,37 +204,37 @@ Chet is the current player They have rolled a 3 Chet is getting out of the penalty box Chet's new location is 11 -The category is Rock -Rock Question 2 +The category is History +History Question 0 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 2 The category is Sports -Sports Question 1 +Sports Question 3 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 1 Sue is getting out of the penalty box Sue's new location is 11 -The category is Rock -Rock Question 3 +The category is History +History Question 1 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 4 -The category is Pop -Pop Question 4 +The category is Blues +Blues Question 2 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 3 The category is Rock -Rock Question 4 +Rock Question 3 Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added @@ -246,8 +246,8 @@ They are player number 3 Chet is the current player They have rolled a 4 Chet's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player @@ -267,45 +267,45 @@ Sue now has 1 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 8 -The category is Pop -Pop Question 1 +The category is Sports +Sports Question 1 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 5 Pat is getting out of the penalty box Pat's new location is 8 -The category is Pop -Pop Question 2 +The category is Sports +Sports Question 2 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 6 -The category is Sports -Sports Question 1 +The category is Pop +Pop Question 0 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 3 Chet's new location is 11 -The category is Rock -Rock Question 1 +The category is History +History Question 0 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 3 Pat's new location is 11 -The category is Rock -Rock Question 2 +The category is History +History Question 1 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 5 Sue is getting out of the penalty box Sue's new location is 11 -The category is Rock -Rock Question 3 +The category is History +History Question 2 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player @@ -314,15 +314,15 @@ Chet is not getting out of the penalty box Pat is the current player They have rolled a 5 Pat's new location is 4 -The category is Pop -Pop Question 3 +The category is Blues +Blues Question 1 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 4 -The category is Pop -Pop Question 4 +The category is Blues +Blues Question 2 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player @@ -331,15 +331,15 @@ Chet is not getting out of the penalty box Pat is the current player They have rolled a 3 Pat's new location is 7 -The category is Rock -Rock Question 4 +The category is Science +Science Question 0 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 5 -The category is Science -Science Question 0 +The category is History +History Question 3 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player @@ -348,8 +348,8 @@ Chet is not getting out of the penalty box Pat is the current player They have rolled a 2 Pat's new location is 9 -The category is Science -Science Question 1 +The category is Rock +Rock Question 1 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player @@ -360,14 +360,14 @@ They have rolled a 3 Chet is getting out of the penalty box Chet's new location is 2 The category is Sports -Sports Question 2 +Sports Question 3 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 1 The category is Science -Science Question 2 +Science Question 1 Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added @@ -386,8 +386,8 @@ Chet now has 1 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player @@ -400,43 +400,43 @@ Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 5 -The category is Science -Science Question 0 +The category is History +History Question 0 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 5 -The category is Science -Science Question 1 +The category is History +History Question 1 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 8 -The category is Pop -Pop Question 1 +The category is Sports +Sports Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 10 -The category is Sports -Sports Question 1 +The category is Blues +Blues Question 1 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 9 -The category is Science -Science Question 2 +The category is Rock +Rock Question 1 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 3 Sue's new location is 11 -The category is Rock -Rock Question 1 +The category is History +History Question 2 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player @@ -450,15 +450,15 @@ Pat is the current player They have rolled a 1 Pat is getting out of the penalty box Pat's new location is 10 -The category is Sports -Sports Question 2 +The category is Blues +Blues Question 2 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 1 The category is Science -Science Question 3 +Science Question 0 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player @@ -468,36 +468,36 @@ Pat is the current player They have rolled a 4 Pat's new location is 2 The category is Sports -Sports Question 3 +Sports Question 2 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 4 -The category is Pop -Pop Question 2 +The category is Blues +Blues Question 3 Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box Chet's new location is 8 -The category is Pop -Pop Question 3 +The category is Sports +Sports Question 3 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 3 Pat's new location is 5 -The category is Science -Science Question 4 +The category is History +History Question 3 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 5 -The category is Science -Science Question 5 +The category is History +History Question 4 Answer was correct!!!! Sue now has 6 Gold Coins. Chet was added @@ -509,92 +509,92 @@ They are player number 3 Chet is the current player They have rolled a 4 Chet's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 5 -The category is Science -Science Question 0 +The category is History +History Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 4 -The category is Pop -Pop Question 1 +The category is Blues +Blues Question 1 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 5 -The category is Science -Science Question 1 +The category is History +History Question 1 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 9 -The category is Science -Science Question 2 +The category is Rock +Rock Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 7 -The category is Rock -Rock Question 0 +The category is Science +Science Question 0 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 8 -The category is Pop -Pop Question 2 +The category is Sports +Sports Question 0 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 2 The category is Sports -Sports Question 0 +Sports Question 1 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 9 -The category is Science -Science Question 3 +The category is Rock +Rock Question 1 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 10 -The category is Sports -Sports Question 1 +The category is Blues +Blues Question 2 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 6 -The category is Sports -Sports Question 2 +The category is Pop +Pop Question 0 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 5 Sue's new location is 2 The category is Sports -Sports Question 3 +Sports Question 2 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 11 -The category is Rock -Rock Question 1 +The category is History +History Question 2 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player @@ -610,8 +610,8 @@ Sue was sent to the penalty box Chet is the current player They have rolled a 5 Chet's new location is 4 -The category is Pop -Pop Question 3 +The category is Blues +Blues Question 3 Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added @@ -623,8 +623,8 @@ They are player number 3 Chet is the current player They have rolled a 4 Chet's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player @@ -644,58 +644,58 @@ Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 7 -The category is Rock -Rock Question 0 +The category is Science +Science Question 2 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 5 -The category is Science -Science Question 2 +The category is History +History Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 5 -The category is Science -Science Question 3 +The category is History +History Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 9 -The category is Science -Science Question 4 +The category is Rock +Rock Question 0 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 3 Pat's new location is 8 -The category is Pop -Pop Question 1 +The category is Sports +Sports Question 0 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 5 Sue's new location is 10 -The category is Sports -Sports Question 0 +The category is Blues +Blues Question 1 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 3 Chet's new location is 0 The category is Pop -Pop Question 2 +Pop Question 0 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 1 Pat is getting out of the penalty box Pat's new location is 9 -The category is Science -Science Question 5 +The category is Rock +Rock Question 1 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player @@ -706,14 +706,14 @@ They have rolled a 1 Chet is getting out of the penalty box Chet's new location is 1 The category is Science -Science Question 6 +Science Question 3 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 3 Pat's new location is 0 The category is Pop -Pop Question 3 +Pop Question 1 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player @@ -722,15 +722,15 @@ Sue is not getting out of the penalty box Chet is the current player They have rolled a 5 Chet's new location is 6 -The category is Sports -Sports Question 1 +The category is Pop +Pop Question 2 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 1 The category is Science -Science Question 7 +Science Question 4 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player @@ -738,14 +738,14 @@ They have rolled a 3 Sue is getting out of the penalty box Sue's new location is 1 The category is Science -Science Question 8 +Science Question 5 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 7 -The category is Rock -Rock Question 1 +The category is Science +Science Question 6 Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added @@ -757,15 +757,15 @@ They are player number 3 Chet is the current player They have rolled a 5 Chet's new location is 5 -The category is Science -Science Question 0 +The category is History +History Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 5 -The category is Science -Science Question 1 +The category is History +History Question 1 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player @@ -778,22 +778,22 @@ Sue now has 1 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 9 -The category is Science -Science Question 2 +The category is Rock +Rock Question 1 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 5 Pat's new location is 10 -The category is Sports -Sports Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player @@ -803,14 +803,14 @@ Pat is the current player They have rolled a 3 Pat's new location is 1 The category is Science -Science Question 3 +Science Question 0 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 6 -The category is Sports -Sports Question 1 +The category is Pop +Pop Question 0 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player @@ -819,15 +819,15 @@ Chet is not getting out of the penalty box Pat is the current player They have rolled a 4 Pat's new location is 5 -The category is Science -Science Question 4 +The category is History +History Question 2 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 7 -The category is Rock -Rock Question 1 +The category is Science +Science Question 1 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player @@ -841,15 +841,15 @@ Chet was sent to the penalty box Pat is the current player They have rolled a 3 Pat's new location is 8 -The category is Pop -Pop Question 2 +The category is Sports +Sports Question 0 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 11 -The category is Rock -Rock Question 2 +The category is History +History Question 3 Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player @@ -857,14 +857,14 @@ They have rolled a 3 Chet is getting out of the penalty box Chet's new location is 3 The category is Rock -Rock Question 3 +Rock Question 2 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 2 Pat's new location is 10 -The category is Sports -Sports Question 2 +The category is Blues +Blues Question 2 Answer was correct!!!! Pat now has 6 Gold Coins. Chet was added @@ -876,15 +876,15 @@ They are player number 3 Chet is the current player They have rolled a 4 Chet's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 5 -The category is Science -Science Question 0 +The category is History +History Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player @@ -897,78 +897,78 @@ Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 7 -The category is Rock -Rock Question 1 +The category is Science +Science Question 0 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 6 -The category is Sports -Sports Question 0 +The category is Pop +Pop Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 8 -The category is Pop -Pop Question 1 +The category is Sports +Sports Question 0 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 11 -The category is Rock -Rock Question 2 +The category is History +History Question 1 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 3 Pat's new location is 9 -The category is Science -Science Question 1 +The category is Rock +Rock Question 1 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 1 The category is Science -Science Question 2 +Science Question 1 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 4 -The category is Pop -Pop Question 2 +The category is Blues +Blues Question 1 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 10 -The category is Sports -Sports Question 1 +The category is Blues +Blues Question 2 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 2 The category is Sports -Sports Question 2 +Sports Question 1 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 9 -The category is Science -Science Question 3 +The category is Rock +Rock Question 2 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player They have rolled a 3 Pat's new location is 1 The category is Science -Science Question 4 +Science Question 2 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player @@ -982,7 +982,7 @@ Chet is the current player They have rolled a 4 Chet's new location is 1 The category is Science -Science Question 5 +Science Question 3 Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added @@ -994,36 +994,36 @@ They are player number 3 Chet is the current player They have rolled a 5 Chet's new location is 5 -The category is Science -Science Question 0 +The category is History +History Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 1 The category is Science -Science Question 1 +Science Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 1 The category is Science -Science Question 2 +Science Question 1 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 6 -The category is Sports -Sports Question 0 +The category is Pop +Pop Question 0 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 3 Pat's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player @@ -1037,36 +1037,36 @@ Chet is the current player They have rolled a 3 Chet is getting out of the penalty box Chet's new location is 9 -The category is Science -Science Question 3 +The category is Rock +Rock Question 1 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 2 Pat's new location is 6 -The category is Sports -Sports Question 1 +The category is Pop +Pop Question 1 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 7 -The category is Rock -Rock Question 1 +The category is Science +Science Question 2 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 5 Chet's new location is 2 The category is Sports -Sports Question 2 +Sports Question 0 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 2 Pat's new location is 8 -The category is Pop -Pop Question 1 +The category is Sports +Sports Question 1 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player @@ -1081,8 +1081,8 @@ Chet is the current player They have rolled a 5 Chet is getting out of the penalty box Chet's new location is 7 -The category is Rock -Rock Question 2 +The category is Science +Science Question 3 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player @@ -1095,36 +1095,36 @@ Pat now has 5 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 5 -The category is Science -Science Question 5 +The category is History +History Question 1 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 11 -The category is Rock -Rock Question 3 +The category is History +History Question 2 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 5 -The category is Science -Science Question 6 +The category is History +History Question 3 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 4 Sue's new location is 9 -The category is Science -Science Question 7 +The category is Rock +Rock Question 2 Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 1 The category is Science -Science Question 8 +Science Question 5 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player @@ -1134,7 +1134,7 @@ Sue is the current player They have rolled a 5 Sue's new location is 2 The category is Sports -Sports Question 3 +Sports Question 2 Answer was correct!!!! Sue now has 6 Gold Coins. Chet was added @@ -1153,44 +1153,44 @@ Chet was sent to the penalty box Pat is the current player They have rolled a 4 Pat's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 5 Sue's new location is 5 -The category is Science -Science Question 0 +The category is History +History Question 0 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box Chet's new location is 7 -The category is Rock -Rock Question 0 +The category is Science +Science Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 2 Pat's new location is 6 -The category is Sports -Sports Question 1 +The category is Pop +Pop Question 0 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 2 Sue's new location is 7 -The category is Rock -Rock Question 1 +The category is Science +Science Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 10 -The category is Sports -Sports Question 2 +The category is Blues +Blues Question 1 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player @@ -1199,15 +1199,15 @@ Pat is not getting out of the penalty box Sue is the current player They have rolled a 3 Sue's new location is 10 -The category is Sports -Sports Question 3 +The category is Blues +Blues Question 2 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 1 The category is Science -Science Question 1 +Science Question 2 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player @@ -1217,36 +1217,36 @@ Sue is the current player They have rolled a 4 Sue's new location is 2 The category is Sports -Sports Question 4 +Sports Question 1 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 4 -The category is Pop -Pop Question 1 +The category is Blues +Blues Question 3 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 1 Pat is getting out of the penalty box Pat's new location is 7 -The category is Rock -Rock Question 2 +The category is Science +Science Question 3 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 1 Sue's new location is 3 The category is Rock -Rock Question 3 +Rock Question 0 Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 6 -The category is Sports -Sports Question 5 +The category is Pop +Pop Question 1 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player @@ -1255,8 +1255,8 @@ Pat is not getting out of the penalty box Sue is the current player They have rolled a 2 Sue's new location is 5 -The category is Science -Science Question 2 +The category is History +History Question 1 Answer was correct!!!! Sue now has 6 Gold Coins. Chet was added @@ -1268,8 +1268,8 @@ They are player number 3 Chet is the current player They have rolled a 5 Chet's new location is 5 -The category is Science -Science Question 0 +The category is History +History Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player @@ -1283,56 +1283,56 @@ Sue is the current player They have rolled a 1 Sue's new location is 1 The category is Science -Science Question 1 +Science Question 0 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 6 -The category is Sports -Sports Question 1 +The category is Pop +Pop Question 0 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 6 -The category is Sports -Sports Question 2 +The category is Pop +Pop Question 1 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 3 Sue's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 9 -The category is Science -Science Question 2 +The category is Rock +Rock Question 0 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 7 -The category is Rock -Rock Question 0 +The category is Science +Science Question 1 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 5 Sue's new location is 9 -The category is Science -Science Question 3 +The category is Rock +Rock Question 1 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 0 The category is Pop -Pop Question 1 +Pop Question 2 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player @@ -1340,21 +1340,21 @@ They have rolled a 5 Pat is getting out of the penalty box Pat's new location is 0 The category is Pop -Pop Question 2 +Pop Question 3 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 11 -The category is Rock -Rock Question 1 +The category is History +History Question 1 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 5 -The category is Science -Science Question 4 +The category is History +History Question 2 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player @@ -1374,22 +1374,22 @@ Sue now has 5 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 8 -The category is Pop -Pop Question 3 +The category is Sports +Sports Question 1 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 5 Pat's new location is 8 -The category is Pop -Pop Question 4 +The category is Sports +Sports Question 2 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 4 -The category is Pop -Pop Question 5 +The category is Blues +Blues Question 1 Answer was correct!!!! Sue now has 6 Gold Coins. Chet was added @@ -1401,43 +1401,43 @@ They are player number 3 Chet is the current player They have rolled a 4 Chet's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Chet now has 1 Gold Coins. Pat is the current player They have rolled a 4 Pat's new location is 4 -The category is Pop -Pop Question 1 +The category is Blues +Blues Question 1 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 4 -The category is Pop -Pop Question 2 +The category is Blues +Blues Question 2 Answer was correct!!!! Sue now has 1 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 9 -The category is Science -Science Question 0 +The category is Rock +Rock Question 0 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 2 Pat's new location is 6 -The category is Sports -Sports Question 0 +The category is Pop +Pop Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 6 -The category is Sports -Sports Question 1 +The category is Pop +Pop Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player @@ -1445,28 +1445,28 @@ They have rolled a 5 Chet is getting out of the penalty box Chet's new location is 2 The category is Sports -Sports Question 2 +Sports Question 0 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 7 -The category is Rock -Rock Question 0 +The category is Science +Science Question 0 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player They have rolled a 1 Sue's new location is 7 -The category is Rock -Rock Question 1 +The category is Science +Science Question 1 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 3 Chet's new location is 5 -The category is Science -Science Question 1 +The category is History +History Question 0 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player @@ -1474,7 +1474,7 @@ They have rolled a 5 Pat is getting out of the penalty box Pat's new location is 0 The category is Pop -Pop Question 3 +Pop Question 2 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player @@ -1482,49 +1482,49 @@ They have rolled a 5 Sue is getting out of the penalty box Sue's new location is 0 The category is Pop -Pop Question 4 +Pop Question 3 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 7 -The category is Rock -Rock Question 2 +The category is Science +Science Question 2 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 5 -The category is Science -Science Question 2 +The category is History +History Question 1 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 2 The category is Sports -Sports Question 3 +Sports Question 1 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 9 -The category is Science -Science Question 3 +The category is Rock +Rock Question 1 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 6 -The category is Sports -Sports Question 4 +The category is Pop +Pop Question 4 Answer was correct!!!! Pat now has 5 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 3 The category is Rock -Rock Question 3 +Rock Question 2 Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player @@ -1564,8 +1564,8 @@ Sue now has 1 Gold Coins. Chet is the current player They have rolled a 1 Chet's new location is 4 -The category is Pop -Pop Question 0 +The category is Blues +Blues Question 0 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player @@ -1578,23 +1578,23 @@ Pat was sent to the penalty box Sue is the current player They have rolled a 5 Sue's new location is 6 -The category is Sports -Sports Question 0 +The category is Pop +Pop Question 0 Question was incorrectly answered Sue was sent to the penalty box Chet is the current player They have rolled a 3 Chet's new location is 7 -The category is Rock -Rock Question 2 +The category is Science +Science Question 2 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 3 Pat is getting out of the penalty box Pat's new location is 6 -The category is Sports -Sports Question 1 +The category is Pop +Pop Question 1 Question was incorrectly answered Pat was sent to the penalty box Sue is the current player @@ -1604,7 +1604,7 @@ Chet is the current player They have rolled a 5 Chet's new location is 0 The category is Pop -Pop Question 1 +Pop Question 2 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player @@ -1614,15 +1614,15 @@ Sue is the current player They have rolled a 5 Sue is getting out of the penalty box Sue's new location is 11 -The category is Rock -Rock Question 3 +The category is History +History Question 0 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 2 The category is Sports -Sports Question 2 +Sports Question 0 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player @@ -1632,14 +1632,14 @@ Sue is the current player They have rolled a 4 Sue's new location is 3 The category is Rock -Rock Question 4 +Rock Question 2 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 4 -The category is Pop -Pop Question 2 +The category is Blues +Blues Question 1 Answer was correct!!!! Chet now has 6 Gold Coins. Chet was added @@ -1658,8 +1658,8 @@ Chet now has 1 Gold Coins. Pat is the current player They have rolled a 5 Pat's new location is 5 -The category is Science -Science Question 0 +The category is History +History Question 0 Answer was correct!!!! Pat now has 1 Gold Coins. Sue is the current player @@ -1672,72 +1672,72 @@ Sue now has 1 Gold Coins. Chet is the current player They have rolled a 3 Chet's new location is 5 -The category is Science -Science Question 1 +The category is History +History Question 1 Answer was correct!!!! Chet now has 2 Gold Coins. Pat is the current player They have rolled a 2 Pat's new location is 7 -The category is Rock -Rock Question 1 +The category is Science +Science Question 0 Answer was correct!!!! Pat now has 2 Gold Coins. Sue is the current player They have rolled a 4 Sue's new location is 7 -The category is Rock -Rock Question 2 +The category is Science +Science Question 1 Answer was correct!!!! Sue now has 2 Gold Coins. Chet is the current player They have rolled a 4 Chet's new location is 9 -The category is Science -Science Question 2 +The category is Rock +Rock Question 1 Answer was correct!!!! Chet now has 3 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 8 -The category is Pop -Pop Question 0 +The category is Sports +Sports Question 1 Answer was correct!!!! Pat now has 3 Gold Coins. Sue is the current player They have rolled a 1 Sue's new location is 8 -The category is Pop -Pop Question 1 +The category is Sports +Sports Question 2 Answer was correct!!!! Sue now has 3 Gold Coins. Chet is the current player They have rolled a 5 Chet's new location is 2 The category is Sports -Sports Question 1 +Sports Question 3 Question was incorrectly answered Chet was sent to the penalty box Pat is the current player They have rolled a 3 Pat's new location is 11 -The category is Rock -Rock Question 3 +The category is History +History Question 2 Answer was correct!!!! Pat now has 4 Gold Coins. Sue is the current player They have rolled a 2 Sue's new location is 10 -The category is Sports -Sports Question 2 +The category is Blues +Blues Question 0 Answer was correct!!!! Sue now has 4 Gold Coins. Chet is the current player They have rolled a 5 Chet is getting out of the penalty box Chet's new location is 7 -The category is Rock -Rock Question 4 +The category is Science +Science Question 2 Answer was correct!!!! Chet now has 4 Gold Coins. Pat is the current player @@ -1751,20 +1751,20 @@ Sue is the current player They have rolled a 4 Sue's new location is 2 The category is Sports -Sports Question 3 +Sports Question 4 Answer was correct!!!! Sue now has 5 Gold Coins. Chet is the current player They have rolled a 2 Chet's new location is 9 -The category is Science -Science Question 4 +The category is Rock +Rock Question 2 Answer was correct!!!! Chet now has 5 Gold Coins. Pat is the current player They have rolled a 1 Pat's new location is 2 The category is Sports -Sports Question 4 +Sports Question 5 Answer was correct!!!! Pat now has 6 Gold Coins. From 96d9d3cb41a0c893434b2a7e383835f93cd332e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 16:48:29 +0800 Subject: [PATCH 68/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9C=A8Categ?= =?UTF-8?q?ory=E7=B1=BB=E4=B8=AD=E6=B7=BB=E5=8A=A0=20getCurrentCategory=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Category.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/Category.java b/src/main/java/com/adaptionsoft/games/Category.java index 2f39548..39009f3 100644 --- a/src/main/java/com/adaptionsoft/games/Category.java +++ b/src/main/java/com/adaptionsoft/games/Category.java @@ -23,4 +23,9 @@ public enum Category { public String getValue() { return value; } + + public Category getCurrentCategory(int place) { + int index = place % Category.values().length; + return Category.values()[index]; + } } From 9dc9ad78ee761dd7db1b3c3e4e8eeb23af206aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 16:50:22 +0800 Subject: [PATCH 69/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86Game?= =?UTF-8?q?=E7=B1=BB=E4=B8=ADgetCurrentCategory=20=E7=B1=BB=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E4=B8=BA=20Category.getCurrentCategory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Category.java | 2 +- src/main/java/com/adaptionsoft/games/Game.java | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Category.java b/src/main/java/com/adaptionsoft/games/Category.java index 39009f3..e8c9a9a 100644 --- a/src/main/java/com/adaptionsoft/games/Category.java +++ b/src/main/java/com/adaptionsoft/games/Category.java @@ -24,7 +24,7 @@ public String getValue() { return value; } - public Category getCurrentCategory(int place) { + public static Category getCurrentCategory(int place) { int index = place % Category.values().length; return Category.values()[index]; } diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 726cfbc..4cdda52 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -58,16 +58,11 @@ public void roll(int roll) { } private void askQuestion() { - Category currentCategory = currentCategory(); + Category currentCategory = Category.getCurrentCategory(getCurrentPlace()); System.out.println("The category is " + currentCategory.getValue()); System.out.println(questionMap.get(currentCategory).removeFirst()); } - private Category currentCategory() { - int index = getCurrentPlace() % Category.values().length; - return Category.values()[index]; - } - private void nextPlayer() { currentPlayer++; if (currentPlayer == players.size()) currentPlayer = 0; From 65df120cdb1f72892b4c7ecaf3f9f41fe4b8fc86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 16:51:19 +0800 Subject: [PATCH 70/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=20PlayerContainer=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/PlayerContainer.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/java/com/adaptionsoft/games/PlayerContainer.java diff --git a/src/main/java/com/adaptionsoft/games/PlayerContainer.java b/src/main/java/com/adaptionsoft/games/PlayerContainer.java new file mode 100644 index 0000000..46a0666 --- /dev/null +++ b/src/main/java/com/adaptionsoft/games/PlayerContainer.java @@ -0,0 +1,10 @@ +package com.adaptionsoft.games; + +/** + * Created with IntelliJ IDEA. + * User: lai.yi + * Date: 2020/2/2 + * Description: + **/ +public class PlayerContainer { +} From 4c6f0d873c4ee5a413c2de88cf714a1c149b10b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 16:53:13 +0800 Subject: [PATCH 71/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9C=A8=20Pl?= =?UTF-8?q?ayerContainer=20=E7=B1=BB=E4=B8=AD=E5=88=9B=E5=BB=BA=20addPlaye?= =?UTF-8?q?r=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/PlayerContainer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/PlayerContainer.java b/src/main/java/com/adaptionsoft/games/PlayerContainer.java index 46a0666..b864530 100644 --- a/src/main/java/com/adaptionsoft/games/PlayerContainer.java +++ b/src/main/java/com/adaptionsoft/games/PlayerContainer.java @@ -1,5 +1,7 @@ package com.adaptionsoft.games; +import java.util.ArrayList; + /** * Created with IntelliJ IDEA. * User: lai.yi @@ -7,4 +9,10 @@ * Description: **/ public class PlayerContainer { + private ArrayList players = new ArrayList<>(); + + public void addPlayer(String playerName) { + players.add(new Player(playerName)); + System.out.println("They are player number " + players.size()); + } } From 912615a083d7ac5999769edd9aad600d4a83706f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 16:54:20 +0800 Subject: [PATCH 72/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9C=A8=20Pl?= =?UTF-8?q?ayerContainer=20=E7=B1=BB=E4=B8=AD=E5=88=9B=E5=BB=BA=20nextPlay?= =?UTF-8?q?er=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/PlayerContainer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/PlayerContainer.java b/src/main/java/com/adaptionsoft/games/PlayerContainer.java index b864530..dfe3a4f 100644 --- a/src/main/java/com/adaptionsoft/games/PlayerContainer.java +++ b/src/main/java/com/adaptionsoft/games/PlayerContainer.java @@ -10,9 +10,15 @@ **/ public class PlayerContainer { private ArrayList players = new ArrayList<>(); + private int currentPlayer = 0; public void addPlayer(String playerName) { players.add(new Player(playerName)); System.out.println("They are player number " + players.size()); } + + private void nextPlayer() { + currentPlayer++; + if (currentPlayer == players.size()) currentPlayer = 0; + } } From 39ead3d9dc83734e04ba3398f945a30443d8723b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 16:58:37 +0800 Subject: [PATCH 73/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9C=A8=20Pl?= =?UTF-8?q?ayerContainer=20=E7=B1=BB=E4=B8=AD=E5=88=9B=E5=BB=BA=20getCurre?= =?UTF-8?q?ntPlayer=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/PlayerContainer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/adaptionsoft/games/PlayerContainer.java b/src/main/java/com/adaptionsoft/games/PlayerContainer.java index dfe3a4f..32acab5 100644 --- a/src/main/java/com/adaptionsoft/games/PlayerContainer.java +++ b/src/main/java/com/adaptionsoft/games/PlayerContainer.java @@ -17,8 +17,12 @@ public void addPlayer(String playerName) { System.out.println("They are player number " + players.size()); } - private void nextPlayer() { + public void nextPlayer() { currentPlayer++; if (currentPlayer == players.size()) currentPlayer = 0; } + + public Player getCurrentPlayer() { + return players.get(currentPlayer); + } } From e7d61bc1100e9741c00441d6017014526f457528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:01:59 +0800 Subject: [PATCH 74/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=20ArrayList=20=E4=B8=BA=20PlayerContainer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 41 +++++++------------ .../adaptionsoft/games/PlayerContainer.java | 4 ++ 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 4cdda52..60aff2a 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -1,16 +1,13 @@ package com.adaptionsoft.games; -import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.Random; public class Game { - ArrayList players = new ArrayList<>(); + PlayerContainer players = new PlayerContainer(); HashMap> questionMap = new HashMap<>(); - int currentPlayer = 0; - public Game() { for (Category category : Category.values()) { LinkedList list = new LinkedList<>(); @@ -23,36 +20,35 @@ public Game() { } public void run(Random rand) { - while (nobodyWin()) { + while (players.nobodyWin()) { roll(rand.nextInt(5) + 1); if (rand.nextInt(9) == 7) { wrongAnswer(); } else { correctAnswer(); } - nextPlayer(); + players.nextPlayer(); } } public void addPlayer(String playerName) { - players.add(new Player(playerName)); - System.out.println("They are player number " + players.size()); + players.addPlayer(playerName); } public void roll(int roll) { System.out.println(getCurrentPlayerName() + " is the current player"); System.out.println("They have rolled a " + roll); - if (players.get(currentPlayer).isInPenaltyBox) { + if (players.getCurrentPlayer().isInPenaltyBox) { if (roll % 2 != 0) { - players.get(currentPlayer).getOutOfPenaltyBox(); - players.get(currentPlayer).moveTo(roll); + players.getCurrentPlayer().getOutOfPenaltyBox(); + players.getCurrentPlayer().moveTo(roll); askQuestion(); } else { stayInPenaltyBox(); } } else { - players.get(currentPlayer).moveTo(roll); + players.getCurrentPlayer().moveTo(roll); askQuestion(); } } @@ -63,22 +59,17 @@ private void askQuestion() { System.out.println(questionMap.get(currentCategory).removeFirst()); } - private void nextPlayer() { - currentPlayer++; - if (currentPlayer == players.size()) currentPlayer = 0; - } - public void correctAnswer() { - if (!players.get(currentPlayer).isInPenaltyBox) { + if (!players.getCurrentPlayer().isInPenaltyBox) { System.out.println("Answer was correct!!!!"); - players.get(currentPlayer).gainGoldCoin(); + players.getCurrentPlayer().gainGoldCoin(); } } public void wrongAnswer() { - if (!players.get(currentPlayer).isInPenaltyBox) { + if (!players.getCurrentPlayer().isInPenaltyBox) { System.out.println("Question was incorrectly answered"); - players.get(currentPlayer).sendToPenaltyBox(); + players.getCurrentPlayer().sendToPenaltyBox(); } } @@ -87,14 +78,10 @@ private void stayInPenaltyBox() { } private int getCurrentPlace() { - return players.get(currentPlayer).place; + return players.getCurrentPlayer().place; } private String getCurrentPlayerName() { - return players.get(currentPlayer).getName(); - } - - private boolean nobodyWin() { - return players.stream().noneMatch(Player::isWin); + return players.getCurrentPlayer().getName(); } } diff --git a/src/main/java/com/adaptionsoft/games/PlayerContainer.java b/src/main/java/com/adaptionsoft/games/PlayerContainer.java index 32acab5..34175fc 100644 --- a/src/main/java/com/adaptionsoft/games/PlayerContainer.java +++ b/src/main/java/com/adaptionsoft/games/PlayerContainer.java @@ -25,4 +25,8 @@ public void nextPlayer() { public Player getCurrentPlayer() { return players.get(currentPlayer); } + + public boolean nobodyWin(){ + return players.stream().noneMatch(Player::isWin); + } } From 945283a90f44d9be0c1b0465aceed1fd11015305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:04:20 +0800 Subject: [PATCH 75/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86Playe?= =?UTF-8?q?r=E4=B8=ADplace=E5=AD=97=E6=AE=B5=E6=94=B9=E4=B8=BAprivate?= =?UTF-8?q?=E5=B9=B6=E6=B7=BB=E5=8A=A0getter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 2 +- src/main/java/com/adaptionsoft/games/Player.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 60aff2a..f2dcdcb 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -78,7 +78,7 @@ private void stayInPenaltyBox() { } private int getCurrentPlace() { - return players.getCurrentPlayer().place; + return players.getCurrentPlayer().getPlace(); } private String getCurrentPlayerName() { diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index dc1618d..a36c74e 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -8,11 +8,10 @@ **/ public class Player { private String name; - public int place = 0; - public int goldCoin = 0; + private int place = 0; + private int goldCoin = 0; public boolean isInPenaltyBox = false; - public Player(String name) { System.out.println(name + " was added"); this.name = name; @@ -45,8 +44,11 @@ public void getOutOfPenaltyBox() { System.out.println(name + " is getting out of the penalty box"); } - public boolean isWin() { return goldCoin >= 6; } + + public int getPlace() { + return place; + } } From c794fc32e453850f60b1701e40178ac7c199b42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:07:02 +0800 Subject: [PATCH 76/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86Playe?= =?UTF-8?q?r=E4=B8=ADisInPenaltyBox=E5=AD=97=E6=AE=B5=E6=94=B9=E4=B8=BApri?= =?UTF-8?q?vate=E5=B9=B6=E6=B7=BB=E5=8A=A0getter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 10 +++++++--- src/main/java/com/adaptionsoft/games/Player.java | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index f2dcdcb..f68b1ef 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -39,7 +39,7 @@ public void roll(int roll) { System.out.println(getCurrentPlayerName() + " is the current player"); System.out.println("They have rolled a " + roll); - if (players.getCurrentPlayer().isInPenaltyBox) { + if (isCurrentPlayerInPenaltyBox()) { if (roll % 2 != 0) { players.getCurrentPlayer().getOutOfPenaltyBox(); players.getCurrentPlayer().moveTo(roll); @@ -53,6 +53,10 @@ public void roll(int roll) { } } + private boolean isCurrentPlayerInPenaltyBox() { + return players.getCurrentPlayer().isInPenaltyBox(); + } + private void askQuestion() { Category currentCategory = Category.getCurrentCategory(getCurrentPlace()); System.out.println("The category is " + currentCategory.getValue()); @@ -60,14 +64,14 @@ private void askQuestion() { } public void correctAnswer() { - if (!players.getCurrentPlayer().isInPenaltyBox) { + if (!isCurrentPlayerInPenaltyBox()) { System.out.println("Answer was correct!!!!"); players.getCurrentPlayer().gainGoldCoin(); } } public void wrongAnswer() { - if (!players.getCurrentPlayer().isInPenaltyBox) { + if (!isCurrentPlayerInPenaltyBox()) { System.out.println("Question was incorrectly answered"); players.getCurrentPlayer().sendToPenaltyBox(); } diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index a36c74e..020e3cf 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -10,7 +10,7 @@ public class Player { private String name; private int place = 0; private int goldCoin = 0; - public boolean isInPenaltyBox = false; + private boolean isInPenaltyBox = false; public Player(String name) { System.out.println(name + " was added"); @@ -51,4 +51,8 @@ public boolean isWin() { public int getPlace() { return place; } + + public boolean isInPenaltyBox() { + return isInPenaltyBox ; + } } From 2773b687ceb3e38009d023becab5ade4547149a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:08:44 +0800 Subject: [PATCH 77/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=B0=86=20st?= =?UTF-8?q?ayInPenaltyBox=20=E7=A7=BB=E5=85=A5player=E7=B1=BB=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 14 +++++--------- src/main/java/com/adaptionsoft/games/Player.java | 6 +++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index f68b1ef..15349e1 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -45,7 +45,7 @@ public void roll(int roll) { players.getCurrentPlayer().moveTo(roll); askQuestion(); } else { - stayInPenaltyBox(); + players.getCurrentPlayer().stayInPenaltyBox(); } } else { players.getCurrentPlayer().moveTo(roll); @@ -53,10 +53,6 @@ public void roll(int roll) { } } - private boolean isCurrentPlayerInPenaltyBox() { - return players.getCurrentPlayer().isInPenaltyBox(); - } - private void askQuestion() { Category currentCategory = Category.getCurrentCategory(getCurrentPlace()); System.out.println("The category is " + currentCategory.getValue()); @@ -77,10 +73,6 @@ public void wrongAnswer() { } } - private void stayInPenaltyBox() { - System.out.println(getCurrentPlayerName() + " is not getting out of the penalty box"); - } - private int getCurrentPlace() { return players.getCurrentPlayer().getPlace(); } @@ -88,4 +80,8 @@ private int getCurrentPlace() { private String getCurrentPlayerName() { return players.getCurrentPlayer().getName(); } + + private boolean isCurrentPlayerInPenaltyBox() { + return players.getCurrentPlayer().isInPenaltyBox(); + } } diff --git a/src/main/java/com/adaptionsoft/games/Player.java b/src/main/java/com/adaptionsoft/games/Player.java index 020e3cf..313e1e6 100644 --- a/src/main/java/com/adaptionsoft/games/Player.java +++ b/src/main/java/com/adaptionsoft/games/Player.java @@ -53,6 +53,10 @@ public int getPlace() { } public boolean isInPenaltyBox() { - return isInPenaltyBox ; + return isInPenaltyBox; + } + + public void stayInPenaltyBox() { + System.out.println(name + " is not getting out of the penalty box"); } } From 3b260cbc7312420efbe127fe6eba4f474e764d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:14:28 +0800 Subject: [PATCH 78/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=20QuestionContainer=20=E7=B1=BB=EF=BC=8C=E5=B0=81?= =?UTF-8?q?=E8=A3=85question=20HashMap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/adaptionsoft/games/QuestionContainer.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main/java/com/adaptionsoft/games/QuestionContainer.java diff --git a/src/main/java/com/adaptionsoft/games/QuestionContainer.java b/src/main/java/com/adaptionsoft/games/QuestionContainer.java new file mode 100644 index 0000000..114ec51 --- /dev/null +++ b/src/main/java/com/adaptionsoft/games/QuestionContainer.java @@ -0,0 +1,14 @@ +package com.adaptionsoft.games; + +import java.util.HashMap; +import java.util.LinkedList; + +/** + * Created with IntelliJ IDEA. + * User: lai.yi + * Date: 2020/2/2 + * Description: + **/ +public class QuestionContainer { + private HashMap> questionMap = new HashMap<>(); +} From e100ed8fd1bb69577cd7ec2b4c444b0835822b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:16:58 +0800 Subject: [PATCH 79/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9C=A8=20Qu?= =?UTF-8?q?estionContainer=20=E7=B1=BB=E4=B8=AD=E5=88=9B=E5=BB=BA=20getNex?= =?UTF-8?q?tQuestion=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Category.java | 4 +++- src/main/java/com/adaptionsoft/games/Game.java | 1 - src/main/java/com/adaptionsoft/games/QuestionContainer.java | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Category.java b/src/main/java/com/adaptionsoft/games/Category.java index e8c9a9a..f0f8d31 100644 --- a/src/main/java/com/adaptionsoft/games/Category.java +++ b/src/main/java/com/adaptionsoft/games/Category.java @@ -26,6 +26,8 @@ public String getValue() { public static Category getCurrentCategory(int place) { int index = place % Category.values().length; - return Category.values()[index]; + Category category = Category.values()[index]; + System.out.println("The category is " + category.getValue()); + return category; } } diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 15349e1..6a6b83a 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -55,7 +55,6 @@ public void roll(int roll) { private void askQuestion() { Category currentCategory = Category.getCurrentCategory(getCurrentPlace()); - System.out.println("The category is " + currentCategory.getValue()); System.out.println(questionMap.get(currentCategory).removeFirst()); } diff --git a/src/main/java/com/adaptionsoft/games/QuestionContainer.java b/src/main/java/com/adaptionsoft/games/QuestionContainer.java index 114ec51..016814c 100644 --- a/src/main/java/com/adaptionsoft/games/QuestionContainer.java +++ b/src/main/java/com/adaptionsoft/games/QuestionContainer.java @@ -11,4 +11,8 @@ **/ public class QuestionContainer { private HashMap> questionMap = new HashMap<>(); + + public String getNextQuestion(Category category) { + return questionMap.get(category).removeFirst(); + } } From 924b0a8138523f2ef59c3b79d9d5c3fce228710e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:18:06 +0800 Subject: [PATCH 80/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9C=A8=20Qu?= =?UTF-8?q?estionContainer=20=E7=B1=BB=E4=B8=AD=E5=88=9B=E5=BB=BA=E6=9E=84?= =?UTF-8?q?=E9=80=A0=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/adaptionsoft/games/QuestionContainer.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/com/adaptionsoft/games/QuestionContainer.java b/src/main/java/com/adaptionsoft/games/QuestionContainer.java index 016814c..d51b8cd 100644 --- a/src/main/java/com/adaptionsoft/games/QuestionContainer.java +++ b/src/main/java/com/adaptionsoft/games/QuestionContainer.java @@ -12,6 +12,17 @@ public class QuestionContainer { private HashMap> questionMap = new HashMap<>(); + public QuestionContainer() { + for (Category category : Category.values()) { + LinkedList list = new LinkedList<>(); + for (int i = 0; i < 50; i++) { + String question = category.getValue() + " Question " + i; + list.addLast(question); + } + questionMap.put(category, list); + } + } + public String getNextQuestion(Category category) { return questionMap.get(category).removeFirst(); } From a7e41e196376eb185f5e1ee6c3ff33098dbab9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:20:01 +0800 Subject: [PATCH 81/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2Game=20=E7=B1=BB=E4=B8=AD=20questionMap=20=E4=B8=BA=20?= =?UTF-8?q?QuestionContainer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 6a6b83a..104f6b6 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -6,18 +6,7 @@ public class Game { PlayerContainer players = new PlayerContainer(); - HashMap> questionMap = new HashMap<>(); - - public Game() { - for (Category category : Category.values()) { - LinkedList list = new LinkedList<>(); - for (int i = 0; i < 50; i++) { - String question = category.getValue() + " Question " + i; - list.addLast(question); - } - questionMap.put(category, list); - } - } + QuestionContainer questions = new QuestionContainer(); public void run(Random rand) { while (players.nobodyWin()) { @@ -55,7 +44,8 @@ public void roll(int roll) { private void askQuestion() { Category currentCategory = Category.getCurrentCategory(getCurrentPlace()); - System.out.println(questionMap.get(currentCategory).removeFirst()); + String question = questions.getNextQuestion(currentCategory); + System.out.println(question); } public void correctAnswer() { From afbd2ad516d5aea7a96ba3222f3caae27804da3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:22:28 +0800 Subject: [PATCH 82/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=8B=86?= =?UTF-8?q?=E5=88=86=20roll=20=E6=96=B9=E6=B3=95=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=88=A4=E6=96=AD=E8=AF=AD=E5=8F=A5=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E9=99=A4if=E4=B9=8B=E9=97=B4=E7=9A=84=E5=B5=8C?= =?UTF-8?q?=E5=A5=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adaptionsoft/games/Game.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 104f6b6..80cbf9f 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -28,17 +28,18 @@ public void roll(int roll) { System.out.println(getCurrentPlayerName() + " is the current player"); System.out.println("They have rolled a " + roll); - if (isCurrentPlayerInPenaltyBox()) { - if (roll % 2 != 0) { - players.getCurrentPlayer().getOutOfPenaltyBox(); - players.getCurrentPlayer().moveTo(roll); - askQuestion(); - } else { - players.getCurrentPlayer().stayInPenaltyBox(); - } - } else { + if (!isCurrentPlayerInPenaltyBox()) { players.getCurrentPlayer().moveTo(roll); askQuestion(); + return; + } + + if (roll % 2 != 0) { + players.getCurrentPlayer().getOutOfPenaltyBox(); + players.getCurrentPlayer().moveTo(roll); + askQuestion(); + } else { + players.getCurrentPlayer().stayInPenaltyBox(); } } From 5163db4d87064e91a99291d586598ec57ae9dcbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E4=B8=80?= Date: Sun, 2 Feb 2020 17:26:23 +0800 Subject: [PATCH 83/83] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E5=8F=AA=E6=9C=89=E4=B8=80=E8=A1=8C=E7=9A=84getXXX?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E5=B0=86Game=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=87=8F=E5=B0=91=E4=B8=BA6=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/adaptionsoft/games/Game.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/adaptionsoft/games/Game.java b/src/main/java/com/adaptionsoft/games/Game.java index 80cbf9f..2dbad58 100644 --- a/src/main/java/com/adaptionsoft/games/Game.java +++ b/src/main/java/com/adaptionsoft/games/Game.java @@ -1,7 +1,5 @@ package com.adaptionsoft.games; -import java.util.HashMap; -import java.util.LinkedList; import java.util.Random; public class Game { @@ -25,7 +23,7 @@ public void addPlayer(String playerName) { } public void roll(int roll) { - System.out.println(getCurrentPlayerName() + " is the current player"); + System.out.println(players.getCurrentPlayer().getName() + " is the current player"); System.out.println("They have rolled a " + roll); if (!isCurrentPlayerInPenaltyBox()) { @@ -44,7 +42,8 @@ public void roll(int roll) { } private void askQuestion() { - Category currentCategory = Category.getCurrentCategory(getCurrentPlace()); + int currentPlace = players.getCurrentPlayer().getPlace(); + Category currentCategory = Category.getCurrentCategory(currentPlace); String question = questions.getNextQuestion(currentCategory); System.out.println(question); } @@ -63,14 +62,6 @@ public void wrongAnswer() { } } - private int getCurrentPlace() { - return players.getCurrentPlayer().getPlace(); - } - - private String getCurrentPlayerName() { - return players.getCurrentPlayer().getName(); - } - private boolean isCurrentPlayerInPenaltyBox() { return players.getCurrentPlayer().isInPenaltyBox(); }