diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-03 18:02:05 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-03 18:02:05 +0200 |
commit | 0d121cac76bc84eb5238140f922f3ef1782d0910 (patch) | |
tree | 23b80238e3d5d3b1a73fa2ac52a42a1f537687c1 | |
parent | c3cc1a9a66b944179c759e112272912d87decf13 (diff) | |
download | gdx-boardgame-0d121cac76bc84eb5238140f922f3ef1782d0910.zip gdx-boardgame-0d121cac76bc84eb5238140f922f3ef1782d0910.tar.gz |
Board : add distance(…) default to Geometry.EUCLIDEAN
-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 020d12a..6d8d1b5 100644 --- a/core/src/ch/asynk/gdx/boardgame/boards/Board.java +++ b/core/src/ch/asynk/gdx/boardgame/boards/Board.java @@ -30,6 +30,11 @@ public interface Board extends TileKeyGenerator } public float distance(int x0, int y0, int x1, int y1, Geometry geometry); + default public float distance(int x0, int y0, int x1, int y1) + { + return distance(x0, y0, x1, y1, Geometry.EUCLIDEAN); + } + default public void dropInPlace(Piece piece, Vector2 v) { toBoard(piece.getCX(), piece.getCY(), v); |