summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/gdx/board
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2018-09-14 10:55:39 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2018-09-14 10:55:39 +0200
commitc075340985d0a5b815cdfde847f32b418078d501 (patch)
treededb6aeaa0c6d001475cdd619baaa7dd6e3af503 /core/src/ch/asynk/gdx/board
parent180bff76ac34bbf8a23d39d5be94729fbeac7d18 (diff)
downloadgdx-boardgame-c075340985d0a5b815cdfde847f32b418078d501.zip
gdx-boardgame-c075340985d0a5b815cdfde847f32b418078d501.tar.gz
Hex/Square Board : values are final
Diffstat (limited to 'core/src/ch/asynk/gdx/board')
-rw-r--r--core/src/ch/asynk/gdx/board/board/HexBoard.java20
-rw-r--r--core/src/ch/asynk/gdx/board/board/SquareBoard.java6
2 files changed, 13 insertions, 13 deletions
diff --git a/core/src/ch/asynk/gdx/board/board/HexBoard.java b/core/src/ch/asynk/gdx/board/board/HexBoard.java
index 9d56a7c..da81071 100644
--- a/core/src/ch/asynk/gdx/board/board/HexBoard.java
+++ b/core/src/ch/asynk/gdx/board/board/HexBoard.java
@@ -6,16 +6,16 @@ import ch.asynk.gdx.board.Board;
public class HexBoard implements Board
{
- private float side; // length of the side of the hex
- private float x0; // bottom left x offset
- private float y0; // bottom left y offset
- private BoardFactory.BoardOrientation orientation;
-
- private float w; // side to side orthogonal distance
- private float dw; // half hex : w/2
- private float dh; // hex top : s/2
- private float h; // square height : s + dh
- private float slope; // dh / dw
+ private final float side; // length of the side of the hex
+ private final float x0; // bottom left x offset
+ private final float y0; // bottom left y offset
+ private final BoardFactory.BoardOrientation orientation;
+
+ private final float w; // side to side orthogonal distance
+ private final float dw; // half hex : w/2
+ private final float dh; // hex top : s/2
+ private final float h; // square height : s + dh
+ private final float slope; // dh / dw
// BoardOrientation.VERTICAL : 2 vertical sides : 2 vertices pointing up and down
// coordinates
diff --git a/core/src/ch/asynk/gdx/board/board/SquareBoard.java b/core/src/ch/asynk/gdx/board/board/SquareBoard.java
index f8da8d3..9485e20 100644
--- a/core/src/ch/asynk/gdx/board/board/SquareBoard.java
+++ b/core/src/ch/asynk/gdx/board/board/SquareBoard.java
@@ -6,9 +6,9 @@ import ch.asynk.gdx.board.Board;
public class SquareBoard implements Board
{
- private float side; // length of the side of a square
- private float x0; // bottom left x offset
- private float y0; // bottom left y offset
+ private final float side; // length of the side of a square
+ private final float x0; // bottom left x offset
+ private final float y0; // bottom left y offset
public SquareBoard(float side, float x0, float y0)
{