diff options
author | pacien | 2018-01-11 21:27:07 +0100 |
---|---|---|
committer | pacien | 2018-01-11 21:27:07 +0100 |
commit | 7fc6fc06bf5b1e6c3a07640cfb2ac7456e030e06 (patch) | |
tree | 9150ef2c6b66de7a81c4d0abe9fee45f6831aae8 /src/main/java | |
parent | 1347f30afbed7ee9c149f77534f5e75fbe819b98 (diff) | |
download | wallj-7fc6fc06bf5b1e6c3a07640cfb2ac7456e030e06.tar.gz |
Unify width/height order
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/board/Board.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/board/Board.java b/src/main/java/fr/umlv/java/wallj/board/Board.java index a4ac421..c846fd3 100644 --- a/src/main/java/fr/umlv/java/wallj/board/Board.java +++ b/src/main/java/fr/umlv/java/wallj/board/Board.java | |||
@@ -21,7 +21,7 @@ public final class Board { | |||
21 | * @param height height in tiles | 21 | * @param height height in tiles |
22 | */ | 22 | */ |
23 | public Builder(int width, int height) { | 23 | public Builder(int width, int height) { |
24 | this.map = new BlockType[width][height]; | 24 | map = new BlockType[height][width]; |
25 | } | 25 | } |
26 | 26 | ||
27 | /** | 27 | /** |
@@ -30,7 +30,7 @@ public final class Board { | |||
30 | * @return the Builder | 30 | * @return the Builder |
31 | */ | 31 | */ |
32 | public Builder setBlockTypeAt(TileVec2 pos, BlockType type) { | 32 | public Builder setBlockTypeAt(TileVec2 pos, BlockType type) { |
33 | map[pos.getCol()][pos.getRow()] = type; | 33 | map[pos.getRow()][pos.getCol()] = type; |
34 | return this; | 34 | return this; |
35 | } | 35 | } |
36 | 36 | ||
@@ -55,7 +55,7 @@ public final class Board { | |||
55 | * @return the element at the given position | 55 | * @return the element at the given position |
56 | */ | 56 | */ |
57 | public BlockType getBlockTypeAt(TileVec2 pos) { | 57 | public BlockType getBlockTypeAt(TileVec2 pos) { |
58 | return map[pos.getCol()][pos.getRow()]; | 58 | return map[pos.getRow()][pos.getCol()]; |
59 | } | 59 | } |
60 | 60 | ||
61 | /** | 61 | /** |