diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/SearchBoard.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/SearchBoard.java b/core/src/ch/asynk/tankontank/engine/SearchBoard.java index d00d056..dd6a798 100644 --- a/core/src/ch/asynk/tankontank/engine/SearchBoard.java +++ b/core/src/ch/asynk/tankontank/engine/SearchBoard.java @@ -522,8 +522,14 @@ public class SearchBoard if (path.contains(filter)) ok += 1; } - if (ok == s) - paths.add(path); + if (ok == s) { + if (path.size() == (s + 2)) { + paths.clear(); + paths.add(path); + return paths; + } else + paths.add(path); + } } return paths; |