From 0250b70a5d6c0a1de8e400d29ae0146caaad69fc Mon Sep 17 00:00:00 2001 From: Nic0Nic0Nii Date: Tue, 24 May 2022 16:04:40 +0000 Subject: [PATCH] refactor so that modifyTile is now directly accessible from Maps Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 --- src/sig/RabiClone.java | 6 +++--- src/sig/map/Map.java | 6 +++--- src/sig/map/Maps.java | 5 +++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/sig/RabiClone.java b/src/sig/RabiClone.java index a03903d..44ec568 100644 --- a/src/sig/RabiClone.java +++ b/src/sig/RabiClone.java @@ -47,13 +47,13 @@ public class RabiClone{ OBJ.add(new Player(p)); for (int i=0;i<12;i++) { - CURRENT_MAP.getMap().ModifyTile(0, i, Tile.WALL); + CURRENT_MAP.ModifyTile(0, i, Tile.WALL); } for (int i=0;i<36;i++) { - CURRENT_MAP.getMap().ModifyTile(i, 11, Tile.FLOOR); + CURRENT_MAP.ModifyTile(i, 11, Tile.FLOOR); } for (int i=0;i<10;i++) { - CURRENT_MAP.getMap().ModifyTile(i+5, 8, Tile.PLATFORM_LEDGE); + CURRENT_MAP.ModifyTile(i+5, 8, Tile.PLATFORM_LEDGE); } Map.SaveMap(CURRENT_MAP); diff --git a/src/sig/map/Map.java b/src/sig/map/Map.java index 54bef5f..3be2cfb 100644 --- a/src/sig/map/Map.java +++ b/src/sig/map/Map.java @@ -36,8 +36,8 @@ public class Map { try { int marker=0; DataOutputStream stream = new DataOutputStream(new FileOutputStream(map.getFile())); - while (marker