diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-03 16:23:43 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-03 16:23:43 +0200 |
commit | 072cc1e97e942f8dd2654fbf59d109516621d1f0 (patch) | |
tree | c9a4eb4ce63ac67eaf9224d76276d9b723fcfa0f /core/src/ch/asynk | |
parent | 79793cf2dd5cad2af5fa513a7213292d2ee53f86 (diff) | |
download | RustAndDust-072cc1e97e942f8dd2654fbf59d109516621d1f0.zip RustAndDust-072cc1e97e942f8dd2654fbf59d109516621d1f0.tar.gz |
PathBuilder: quick -> shortest
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/PathBuilder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java index 609fe8b..fe98041 100644 --- a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java +++ b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java @@ -239,16 +239,16 @@ public class PathBuilder implements Disposable } } - public int toggleCtrlTile(Tile tile, boolean quick) + public int toggleCtrlTile(Tile tile, boolean shortest) { if (ctrlTiles.contains(tile)) ctrlTiles.remove(tile); else ctrlTiles.add(tile); - return filterPaths(quick); + return filterPaths(shortest); } - private int filterPaths(boolean quick) + private int filterPaths(boolean shortest) { int s = ctrlTiles.size(); @@ -261,7 +261,7 @@ public class PathBuilder implements Disposable ok += 1; } if (ok == s) { - if (quick && path.tiles.size() == (s + 0)) { // from and to are not part of the path + if (shortest && path.tiles.size() == (s + 0)) { // from and to are not part of the path filteredPaths.clear(); filteredPaths.add(path); tiles.clear(); |