From c1efe11b684fa3cc66c4960ad150b1a5e5404a6f Mon Sep 17 00:00:00 2001 From: fdai7753 Date: Sun, 4 Feb 2024 19:40:27 +0100 Subject: [PATCH] Added ghost spawns to Map --- src/main/java/pacmanGame/Map.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/pacmanGame/Map.java b/src/main/java/pacmanGame/Map.java index 8e9371f..5768e63 100644 --- a/src/main/java/pacmanGame/Map.java +++ b/src/main/java/pacmanGame/Map.java @@ -19,8 +19,8 @@ public class Map { "wwwwwww.wweeeeeeeeeeww.wwwwwww", "wwwwwww.wwewwwwwwwweww.wwwwwww", "wwwwwww.wweweeeeeeweww.wwwwwww", - "eeeeeee.eeeweeeeeeweee.eeeeeee", - "wwwwwww.wweweeeeeeweww.wwwwwww", + "eeeeeee.eeewe1ee3eweee.eeeeeee", + "wwwwwww.wwewe2ee4eweww.wwwwwww", "wwwwwww.wweweeeeeeweww.wwwwwww", "wwwwwww.wwewwwwwwwweww.wwwwwww", "wwwwwww.wweeeeeeeeeeww.wwwwwww", @@ -38,12 +38,18 @@ public class Map { "wwwwwwwwwwwwwwwwwwwwwwwwwwwwww", "wwwwwwwwwwwwwwwwwwwwwwwwwwwwww" }; - + + public final int ghostSpawnCount = 4; + public final HashMap mapTypes = new HashMap(){{ this.put("e", "empty"); this.put("s", "empty"); this.put(".", "dot"); this.put("w", "wall"); + + for(int i = 0; i < 10; i++) { + this.put(i+"", "empty"); + } }}; public Cell[][] cells;