diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-04 23:16:14 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-04 23:16:14 +0200 |
commit | f7167d18cadb0cbe7798f524d5dd348d86bc5ec5 (patch) | |
tree | 2b6cd585cf65c1b0af18e35f8d540def98fda8c2 /core | |
parent | ac23dc2e9dfa2bacfbdfccafe392cbef48a6320a (diff) | |
download | gdx-boardgame-f7167d18cadb0cbe7798f524d5dd348d86bc5ec5.zip gdx-boardgame-f7167d18cadb0cbe7798f524d5dd348d86bc5ec5.tar.gz |
Board : add lineOfSight(Tile, Tile, Collection<Tile>)
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/boards/Board.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/boards/Board.java b/core/src/ch/asynk/gdx/boardgame/boards/Board.java index 6d8d1b5..8abfc34 100644 --- a/core/src/ch/asynk/gdx/boardgame/boards/Board.java +++ b/core/src/ch/asynk/gdx/boardgame/boards/Board.java @@ -22,6 +22,11 @@ public interface Board extends TileKeyGenerator public boolean lineOfSight(int x0, int y0, int x1, int y1, Collection<Tile> tiles); + default public boolean lineOfSight(Tile from, Tile to, Collection<Tile> tiles) + { + return lineOfSight(from.x, from.y, to.x, to.y, tiles); + } + enum Geometry { EUCLIDEAN, |