diff --git a/src/main/java/Game.java b/src/main/java/Game.java index 7d8e3e1..ed51b7b 100644 --- a/src/main/java/Game.java +++ b/src/main/java/Game.java @@ -72,7 +72,7 @@ public class Game { */ public boolean checkDice(int dice, Player p, int countRolls, Game g) { int figuresInBase = p.checkFigureInBase(p.figures); - if(countRolls >= 3) return false; + if(countRolls >= 3) return dice == 6; if(figuresInBase == 4) { return true; } else if (figuresInBase < 4) { diff --git a/src/test/java/GameTest.java b/src/test/java/GameTest.java index 656d705..a11362d 100644 --- a/src/test/java/GameTest.java +++ b/src/test/java/GameTest.java @@ -87,6 +87,12 @@ public class GameTest { 5, 1, true + ), + Arguments.of("Figures on Field - d: 6 - c: 1", + Arrays.asList(0, -1, -1, -1), + 6, + 3, + true ) ); }