From 5b808951945b900819669a989cced457fb0068ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 10 Jul 2020 20:31:28 +0200 Subject: HexBoard : no float comparaison --- core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java index 54b8268..23b02bd 100644 --- a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java +++ b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java @@ -601,7 +601,7 @@ public class HexBoard implements Board if (dst.searchCount != searchCount) { dst.searchCount = searchCount; add = true; - } else if ((dst.f > total) || (rm && !dst.roadMarch && dst.f == total)) { + } else if ((dst.f > total) || (rm && !dst.roadMarch && Math.abs(dst.f - total) < 0.001)) { stack.remove(dst); add = true; } -- cgit v1.1-2-g2b99