Skip to content

Commit

Permalink
FusionRoom un peu opti
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinBeauchet committed Feb 27, 2021
1 parent fa2ee79 commit be5e4ba
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/main/java/Model/Map.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand All @@ -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)) {
Expand Down

0 comments on commit be5e4ba

Please sign in to comment.