diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-22 10:34:35 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-22 10:34:35 +0200 |
commit | b2b836b8c7a6a5dc0dddf8e85502f4903d4f2686 (patch) | |
tree | 36c3b7fa54b9725ff8b3cd886667aa4dd5c5d338 /core/src | |
parent | 5fe1c326cdf6a686072adb84ba2aeb7377505aaa (diff) | |
download | RustAndDust-b2b836b8c7a6a5dc0dddf8e85502f4903d4f2686.zip RustAndDust-b2b836b8c7a6a5dc0dddf8e85502f4903d4f2686.tar.gz |
Board: remove fields cols and rows
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index 5dd7b3c..e8c56d7 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -58,8 +58,6 @@ public abstract class Board extends Image implements Disposable } private Config cfg; - private int cols; - private int rows; private Tile[][] board; boolean transform; @@ -79,8 +77,6 @@ public abstract class Board extends Image implements Disposable super(texture); this.cfg = cfg; this.board = board; - this.cols = cfg.cols - 1; - this.rows = cfg.rows - 1; } @Override @@ -337,7 +333,7 @@ public abstract class Board extends Image implements Disposable } // validate hex - if ((col < 0) || (row < 0) || (row > rows) || (col > cols) || (oddRow && ((col + 1)> cols))) + if ((col < 0) || (row < 0) || (row >= cfg.rows) || (col >= cfg.cols) || (oddRow && ((col + 1) >= cfg.cols))) hex.set(-1, -1); else hex.set(col, row); |