summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-30 01:13:19 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-30 01:13:19 +0200
commit2a00944af0e955e23e48fa2c3bd1f1d20c179df9 (patch)
tree1b1fdf65bc525ff69c51f249d947aa826aae3edd /core/src/ch/asynk/tankontank/engine
parente7fd685dc2ec8f8f99624d7de9cb205fd082bcbc (diff)
downloadRustAndDust-2a00944af0e955e23e48fa2c3bd1f1d20c179df9.zip
RustAndDust-2a00944af0e955e23e48fa2c3bd1f1d20c179df9.tar.gz
SearchBoard: remove useless check param for lineOfSight()
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/SearchBoard.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/SearchBoard.java b/core/src/ch/asynk/tankontank/engine/SearchBoard.java
index 57e75cf..20b7d73 100644
--- a/core/src/ch/asynk/tankontank/engine/SearchBoard.java
+++ b/core/src/ch/asynk/tankontank/engine/SearchBoard.java
@@ -288,11 +288,6 @@ public class SearchBoard
public List<Node> lineOfSight(int x0, int y0, int x1, int y1)
{
- return lineOfSight(x0, y0, x1, y1, true);
- }
-
- public List<Node> lineOfSight(int x0, int y0, int x1, int y1, boolean check)
- {
los.clear();
// orthogonal axis
@@ -319,9 +314,9 @@ public class SearchBoard
}
if (dx == 0)
- return verticalLineOfSight(x0, y0, x1, y1, check);
+ return verticalLineOfSight(x0, y0, x1, y1);
if (dx == (3 * dy))
- return diagonalLineOfSight(x0, y0, x1, y1, check);
+ return diagonalLineOfSight(x0, y0, x1, y1);
int dx3 = 3 * dx;
int dy3 = 3 * dy;
@@ -363,7 +358,7 @@ public class SearchBoard
return los;
}
- private List<Node> verticalLineOfSight(int x0, int y0, int x1, int y1, boolean check)
+ private List<Node> verticalLineOfSight(int x0, int y0, int x1, int y1)
{
int d = ( (y1 > y0) ? 1 : -1);
int x = x0;
@@ -388,7 +383,7 @@ public class SearchBoard
return los;
}
- private List<Node> diagonalLineOfSight(int x0, int y0, int x1, int y1, boolean check)
+ private List<Node> diagonalLineOfSight(int x0, int y0, int x1, int y1)
{
int dy = ( (y1 > y0) ? 1 : -1);
int dx = ( (x1 > x0) ? 1 : -1);