summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-04 00:57:37 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-04 00:57:37 +0200
commit8d3d8ce82c6ac13545f20f588786b69b5358c405 (patch)
tree5bdec95843b174d7e63351ffc0f6105ab2c57499 /core/src/ch/asynk/tankontank
parent671789f726229b072b37f417f58b711b3ab2c878 (diff)
downloadRustAndDust-8d3d8ce82c6ac13545f20f588786b69b5358c405.zip
RustAndDust-8d3d8ce82c6ac13545f20f588786b69b5358c405.tar.gz
SearchBoard: on filtering if one path matches and has the exact size, chose it
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/SearchBoard.java10
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;