aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/fr/umlv
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/fr/umlv')
-rw-r--r--src/main/java/fr/umlv/java/wallj/board/Board.java6
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 /**