diff --git a/WarmlyLocomotive/WarmlyLocomotive/FormMapWithSetLocomotives.cs b/WarmlyLocomotive/WarmlyLocomotive/FormMapWithSetLocomotives.cs
index 5e890ab..44686b3 100644
--- a/WarmlyLocomotive/WarmlyLocomotive/FormMapWithSetLocomotives.cs
+++ b/WarmlyLocomotive/WarmlyLocomotive/FormMapWithSetLocomotives.cs
@@ -74,8 +74,8 @@ namespace WarmlyLocomotive
FormLocomotive form = new();
if (form.ShowDialog() == DialogResult.OK)
{
- DrawningObjectLocomotive car = new(form.SelectedLocomotive);
- if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + car != -1)
+ DrawningObjectLocomotive locomotive = new(form.SelectedLocomotive);
+ if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + locomotive != -1)
{
MessageBox.Show("Объект добавлен");
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
diff --git a/WarmlyLocomotive/WarmlyLocomotive/MapWithSetLocomotivesGeneric.cs b/WarmlyLocomotive/WarmlyLocomotive/MapWithSetLocomotivesGeneric.cs
index ab5b5d2..c5cf58b 100644
--- a/WarmlyLocomotive/WarmlyLocomotive/MapWithSetLocomotivesGeneric.cs
+++ b/WarmlyLocomotive/WarmlyLocomotive/MapWithSetLocomotivesGeneric.cs
@@ -42,7 +42,7 @@ namespace WarmlyLocomotive
///
public MapWithSetLocomotivesGeneric(int picWidth, int picHeight, U map)
{
- int width = picWidth / _placeSizeWidth;
+ int width = picWidth / (_placeSizeWidth + 30);
int height = picHeight / _placeSizeHeight;
_setLocomotives = new SetLocomotivesGeneric(width * height);
_pictureWidth = picWidth;
diff --git a/WarmlyLocomotive/WarmlyLocomotive/MapsCollection.cs b/WarmlyLocomotive/WarmlyLocomotive/MapsCollection.cs
index e172901..6abc264 100644
--- a/WarmlyLocomotive/WarmlyLocomotive/MapsCollection.cs
+++ b/WarmlyLocomotive/WarmlyLocomotive/MapsCollection.cs
@@ -56,7 +56,6 @@ namespace WarmlyLocomotive
/// Название карты
public void DelMap(string name)
{
- // TODO Прописать логику для удаления
if (_mapStorages.ContainsKey(name))
{
_mapStorages.Remove(name);
@@ -71,7 +70,6 @@ namespace WarmlyLocomotive
{
get
{
- // TODO Продумать логику получения объекта
if (ind != String.Empty)
{
MapWithSetLocomotivesGeneric value;
diff --git a/WarmlyLocomotive/WarmlyLocomotive/SetLocomotivesGeneric.cs b/WarmlyLocomotive/WarmlyLocomotive/SetLocomotivesGeneric.cs
index edcd3c2..b8c7371 100644
--- a/WarmlyLocomotive/WarmlyLocomotive/SetLocomotivesGeneric.cs
+++ b/WarmlyLocomotive/WarmlyLocomotive/SetLocomotivesGeneric.cs
@@ -34,8 +34,6 @@ namespace WarmlyLocomotive
///
public int Insert(T locomotive)
{
- // TODO вставка в начало набора
- // TODO проверка на _maxCount
if (_maxCount == Count)
{
return -1;
@@ -51,8 +49,6 @@ namespace WarmlyLocomotive
///
public int Insert(T locomotive, int position)
{
- // TODO проверка позиции
- // TODO вставка по позиции
if (position < 0 || position >= Count || _maxCount == Count)
{
return -1;
@@ -67,7 +63,6 @@ namespace WarmlyLocomotive
///
public T Remove(int position)
{
- // TODO проверка позиции
if (position < 0 || position >= Count)
{
return null;
@@ -93,8 +88,6 @@ namespace WarmlyLocomotive
}
set
{
- // TODO проверка позиции
- // TODO вставка в список по позиции
if (position >= 0 && position < Count)
{
_places[position] = value;