From fb2b518ee47f3177fb060550db4f4ae1f48348c4 Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Fri, 28 Apr 2023 03:21:10 +0200 Subject: [PATCH] FIX BUG: inversion des lignes et des colonnes --- src/FileManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FileManager.java b/src/FileManager.java index 2089309..ac06b5f 100644 --- a/src/FileManager.java +++ b/src/FileManager.java @@ -30,7 +30,7 @@ public class FileManager { value = ds.readByte(); bit = 0; } - if (((value >> (7 - bit)) & 1) == 1) grid.getSquare(i, j).setWall(); + if (((value >> (7 - bit)) & 1) == 1) grid.getSquare(j, i).setWall(); bit++; } } @@ -80,7 +80,7 @@ public class FileManager { byte value = 0; for (int i = 0; i < grid.getSize(); i++) { for (int j = 0; j < grid.getSize(); j++) { - Square square = grid.getSquare(i, j); + Square square = grid.getSquare(j, i); if (square.isWall()) { value |= 1 << (7 - bit); }