From 0d121cac76bc84eb5238140f922f3ef1782d0910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 3 Jun 2020 18:02:05 +0200 Subject: =?UTF-8?q?Board=20:=20add=20distance(=E2=80=A6)=20default=20to=20?= =?UTF-8?q?Geometry.EUCLIDEAN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/ch/asynk/gdx/boardgame/boards/Board.java | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v1.1-2-g2b99