From be5e4ba760d353e613b3f9bc0d3e32948d3aa471 Mon Sep 17 00:00:00 2001 From: QuentinBeauchet Date: Sat, 27 Feb 2021 23:03:46 +0100 Subject: [PATCH] FusionRoom un peu opti --- src/main/java/Model/Map.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/Model/Map.java b/src/main/java/Model/Map.java index 55e1185..ed3ae7f 100644 --- a/src/main/java/Model/Map.java +++ b/src/main/java/Model/Map.java @@ -240,7 +240,7 @@ public void ligne(Position pos1, Position pos2) { } } for (Position p : chemin) { - set(p, new Cell(true, Cell.CellType.PATH)); + set(p, new Cell(true, Cell.CellType.NORMAL)); } } @@ -259,14 +259,6 @@ public void RoomFusion(){ ligneV2(Procedure.getRandomPosition(getRooms().get(i)),Procedure.getRandomPosition(getRooms().get(i+3))); } - for (int y = 0; y < getSIZEY(); y++) { - for (int x = 0; x < getSIZEX(); x++) { - if(get(x,y).getType().equals(Cell.CellType.PATH)){ - set(x,y,new Cell(true, Cell.CellType.NORMAL)); - } - } - } - for (int y = 0; y < getSIZEY(); y++) { for (int x = 0; x < getSIZEX(); x++) { if (get(x, y).getType().equals(Cell.CellType.VOID)) {