aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/fr/umlv/java/wallj/board/BoardParser.java2
-rw-r--r--src/test/java/fr/umlv/java/wallj/board/BoardParserTest.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/board/BoardParser.java b/src/main/java/fr/umlv/java/wallj/board/BoardParser.java
index a9dca27..c6d0cd8 100644
--- a/src/main/java/fr/umlv/java/wallj/board/BoardParser.java
+++ b/src/main/java/fr/umlv/java/wallj/board/BoardParser.java
@@ -23,7 +23,7 @@ public final class BoardParser {
23 Board.Builder b = new Board.Builder(Matrix.getWidth(map), Matrix.getHeight(map)); 23 Board.Builder b = new Board.Builder(Matrix.getWidth(map), Matrix.getHeight(map));
24 for (ListIterator<List<BlockType>> line = map.listIterator(); line.hasNext(); ) 24 for (ListIterator<List<BlockType>> line = map.listIterator(); line.hasNext(); )
25 for (ListIterator<BlockType> block = line.next().listIterator(); block.hasNext(); ) 25 for (ListIterator<BlockType> block = line.next().listIterator(); block.hasNext(); )
26 b.setBlockTypeAt(TileVec2.of(line.previousIndex(), block.nextIndex()), block.next()); 26 b.setBlockTypeAt(TileVec2.of(block.nextIndex(), line.previousIndex()), block.next());
27 27
28 return b.build(); 28 return b.build();
29 } 29 }
diff --git a/src/test/java/fr/umlv/java/wallj/board/BoardParserTest.java b/src/test/java/fr/umlv/java/wallj/board/BoardParserTest.java
index 87ca08a..903128f 100644
--- a/src/test/java/fr/umlv/java/wallj/board/BoardParserTest.java
+++ b/src/test/java/fr/umlv/java/wallj/board/BoardParserTest.java
@@ -38,7 +38,7 @@ final class BoardParserTest {
38 Assertions.assertEquals(board.getDim(), TileVec2.of(blocks[0].length, blocks.length)); 38 Assertions.assertEquals(board.getDim(), TileVec2.of(blocks[0].length, blocks.length));
39 for (int row = 0; row < blocks.length; ++row) 39 for (int row = 0; row < blocks.length; ++row)
40 for (int col = 0; col < blocks[0].length; ++col) 40 for (int col = 0; col < blocks[0].length; ++col)
41 Assertions.assertEquals(board.getBlockTypeAt(TileVec2.of(row, col)), blocks[row][col]); 41 Assertions.assertEquals(board.getBlockTypeAt(TileVec2.of(col, row)), blocks[row][col]);
42 } 42 }
43 43
44} 44}