Polevoy S.V Lab_work6 #7

Closed
ChipsEater wants to merge 9 commits from LabWork06 into LabWork05
Showing only changes of commit 8abded35c8 - Show all commits

View File

@ -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));
}