Skip to content

Commit

Permalink
Added update method
Browse files Browse the repository at this point in the history
  • Loading branch information
bagarozzi committed Apr 1, 2024
1 parent 43f9694 commit 659ff67
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main/java/it/unibo/bombardero/map/api/MapManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ public interface MapManager {

void triggerArenaCollapse();

void update();
}
17 changes: 14 additions & 3 deletions src/main/java/it/unibo/bombardero/map/impl/MapManagerImpl.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package it.unibo.bombardero.map.impl;

import java.util.Random;
import java.util.Set;
import java.util.TreeSet;
import java.util.stream.IntStream;
Expand All @@ -21,8 +22,13 @@ public MapManagerImpl(GameMap map) {

@Override
public void generateBreakableWalls() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'generateBreakableWalls'");
/* new Random()
.ints(0, Utils.MAP_COLS)
.boxed()
.mapToObj(x -> new Pair(IntStream.ints(0, Utils.MAP_ROWS).findAny(), x))
.filter(coord -> map.isEmpty(coord))
.forEach(coord -> map.addBreakableWall(coord));
*/
}

@Override
Expand All @@ -38,7 +44,6 @@ public void placeUnbreakableWalls() {
.forEach(coord -> map.addUnbreakableWall(coord, new UnbreakableWall()));
}

@Override
public void placeNextWall() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'placeNextWall'");
Expand All @@ -49,5 +54,11 @@ public void triggerArenaCollapse() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'triggerArenaCollpse'");
}

@Override
public void update() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'update'");
}

}

0 comments on commit 659ff67

Please sign in to comment.