From 8abded35c8395366fb175c05404cdbcbe2e0fd25 Mon Sep 17 00:00:00 2001 From: ChipsEater Date: Tue, 22 Nov 2022 15:59:06 +0400 Subject: [PATCH] Fixes --- MapsCollection.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MapsCollection.java b/MapsCollection.java index 3b90b3c..016f466 100644 --- a/MapsCollection.java +++ b/MapsCollection.java @@ -147,6 +147,7 @@ public class MapsCollection { if (!map.getMap().getClass().getSimpleName().equals(reader.readLine())) { return false; } + map._setArtilleries.clear(); } else { map = switch (reader.readLine()) { case "SimpleMap" -> new MapWithSetArtilleriesGeneric<>(_pictureWidth, _pictureHeight, new SimpleMap()); @@ -155,8 +156,6 @@ public class MapsCollection { }; } - map._setArtilleries.clear(); - while ((currentLine = reader.readLine()) != null) { map._setArtilleries.insert(DrawingObjectArtillery.create(currentLine)); }