done
This commit is contained in:
parent
53a65a328e
commit
5be7b09d73
@ -19,6 +19,5 @@ namespace PIbd_22_Kalyshev_Y_V_MotorBoat_Base
|
||||
Weight = weight <= 0 ? rnd.Next(30, 100) : weight;
|
||||
BodyColor = bodyColor;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -103,10 +103,10 @@ namespace PIbd_22_Kalyshev_Y_V_MotorBoat_Base
|
||||
using (FileStream fs = new(filename, FileMode.Create))
|
||||
using (StreamWriter sw = new StreamWriter(fs))
|
||||
{
|
||||
sw.WriteLine($"MapsCollection{Environment.NewLine}");
|
||||
sw.WriteLine("MapsCollection");
|
||||
foreach (var storage in _mapStorages)
|
||||
{
|
||||
sw.WriteLine($"{storage.Key}{separatorDict}{storage.Value.GetData(separatorDict, separatorData)}{Environment.NewLine}");
|
||||
sw.WriteLine($"{storage.Key}{separatorDict}{storage.Value.GetData(separatorDict, separatorData)}");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -126,8 +126,10 @@ namespace PIbd_22_Kalyshev_Y_V_MotorBoat_Base
|
||||
{
|
||||
string str;
|
||||
int count = 0;
|
||||
_mapStorages.Clear();
|
||||
while ((str = sr.ReadLine()) != null)
|
||||
{
|
||||
if (str == "") { break; }
|
||||
if (count == 0)
|
||||
{
|
||||
if (!str.Contains("MapsCollection"))
|
||||
@ -139,7 +141,6 @@ namespace PIbd_22_Kalyshev_Y_V_MotorBoat_Base
|
||||
continue;
|
||||
}
|
||||
}
|
||||
_mapStorages.Clear();
|
||||
var elem = str.Split(separatorDict);
|
||||
AbstractMap map = null;
|
||||
switch (elem[1])
|
||||
|
Loading…
Reference in New Issue
Block a user