summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/SearchBoard.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/SearchBoard.java b/core/src/ch/asynk/tankontank/engine/SearchBoard.java
index 536ea85..8c5b93a 100644
--- a/core/src/ch/asynk/tankontank/engine/SearchBoard.java
+++ b/core/src/ch/asynk/tankontank/engine/SearchBoard.java
@@ -92,6 +92,11 @@ public class SearchBoard
return nodes[((col - colOffset)) + (row * cols)];
}
+ public int distance(Node from, Node to)
+ {
+ return distance(from.col, from.row, to.col, to.row);
+ }
+
public int distance(int col0, int row0, int col1, int row1)
{
int dx = Math.abs(col1 - col0);