diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-21 15:41:58 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-21 15:41:58 +0100 |
commit | add0f037b8d4213c19028fc0993ef974c016d26d (patch) | |
tree | c7a2c892630a919a36bc6e2fb842b008105209ee /core/src | |
parent | 50919f5cf9a544a45600c4b6a7c5cbddda60b1c7 (diff) | |
download | RustAndDust-add0f037b8d4213c19028fc0993ef974c016d26d.zip RustAndDust-add0f037b8d4213c19028fc0993ef974c016d26d.tar.gz |
Path: fix fitness initialisation
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/Path.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Path.java b/core/src/ch/asynk/rustanddust/engine/Path.java index 5df92ac..44b0a1f 100644 --- a/core/src/ch/asynk/rustanddust/engine/Path.java +++ b/core/src/ch/asynk/rustanddust/engine/Path.java @@ -36,6 +36,7 @@ public class Path implements Disposable, Pool.Poolable this.cost = -1; this.roadMarch = true; this.tiles = null; + this.fitness = 0; } protected void init(int size) @@ -44,6 +45,9 @@ public class Path implements Disposable, Pool.Poolable tiles = new ArrayList<Tile>(size); else tiles. ensureCapacity(size); + cost = -1; + roadMarch = true; + fitness = 0; } @Override |