diff --git a/Code/src/main/java/org/example/GameLoop.java b/Code/src/main/java/org/example/GameLoop.java index 141a953..36efeeb 100644 --- a/Code/src/main/java/org/example/GameLoop.java +++ b/Code/src/main/java/org/example/GameLoop.java @@ -30,10 +30,12 @@ public void setup(){ //generate walls Obstacle.walls = Wall.generateWalls(rows, cols, this); - //generate shops - Obstacle.shops = Shop.generateShops(rows, cols, this); - //generate coins - Coin.setCoinsInEmptySpaces(this); + if (PVE) { + //generate shops + Obstacle.shops = Shop.generateShops(rows, cols, this); + //generate coins + Coin.setCoinsInEmptySpaces(this); + } //generate rocks Obstacle.rocks = BreakableRock.generateRocks(rows,cols, this, 0.5f); Obstacle.lessRocks = BreakableRock.generateLessRocks(rows,cols, this, 0.3f); @@ -42,9 +44,9 @@ public void setup(){ Obstacle.initializeObstacleGrid(); Obstacle.initializeObstacleGridPVP(); - - Character.enemies = Enemy.generateEnemies(this); - + if (PVE) { + Character.enemies = Enemy.generateEnemies(this); + } Character.players = Player.setPlayer1(this); Character.players = Player.setPlayer2(this); @@ -461,4 +463,4 @@ private static void gameEndDetectPVP() { //System.out.println("Player 1 won!"); } } -} \ No newline at end of file +}