summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-07-10 20:31:28 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-07-10 20:31:28 +0200
commit5b808951945b900819669a989cced457fb0068ce (patch)
tree20da1c0b5a37868eaa6580f22999270b141124b2 /core
parent9c3a50e677eac6d8df5c5bf1cf88f08ac155ac39 (diff)
downloadgdx-boardgame-5b808951945b900819669a989cced457fb0068ce.zip
gdx-boardgame-5b808951945b900819669a989cced457fb0068ce.tar.gz
HexBoard : no float comparaison
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java2
1 files changed, 1 insertions, 1 deletions
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;
}