From 999f216dc3edeea1ae39f8c1afbdb1a1305c0e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D0=B6=D0=B8=D0=B2=D0=B8=D0=BD?= Date: Mon, 5 Dec 2022 01:22:45 +0400 Subject: [PATCH] names --- .../FormMapWithSetStormtroopers.cs | 6 ++--- .../MapWithSetStormtroopersGeneric.cs | 26 +++++++++---------- .../Stormtrooper/SetStormtroopersGeneric.cs | 10 +++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Stormtrooper/Stormtrooper/FormMapWithSetStormtroopers.cs b/Stormtrooper/Stormtrooper/FormMapWithSetStormtroopers.cs index 8db5e4f..5309d0f 100644 --- a/Stormtrooper/Stormtrooper/FormMapWithSetStormtroopers.cs +++ b/Stormtrooper/Stormtrooper/FormMapWithSetStormtroopers.cs @@ -26,7 +26,7 @@ namespace Stormtrooper /// /// Объект от класса карты с набором объектов /// - private MapWithSetStormtroopersGeneric _mapCarsCollectionGeneric; + private MapWithSetStormtroopersGeneric _mapStormtroopersCollectionGeneric; /// /// Конструктор @@ -75,8 +75,8 @@ namespace Stormtrooper FormStormtrooper form = new(); if (form.ShowDialog() == DialogResult.OK) { - DrawningObjectStormtrooper car = new(form.SelectedStormtrooper); - if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + car != -1) + DrawningObjectStormtrooper stormtrooper = new(form.SelectedStormtrooper); + if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + stormtrooper != -1) { MessageBox.Show("Объект добавлен"); pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); diff --git a/Stormtrooper/Stormtrooper/MapWithSetStormtroopersGeneric.cs b/Stormtrooper/Stormtrooper/MapWithSetStormtroopersGeneric.cs index 488025c..240aa65 100644 --- a/Stormtrooper/Stormtrooper/MapWithSetStormtroopersGeneric.cs +++ b/Stormtrooper/Stormtrooper/MapWithSetStormtroopersGeneric.cs @@ -53,11 +53,11 @@ namespace Stormtrooper /// Перегрузка оператора сложения /// /// - /// + /// /// - public static int operator + (MapWithSetStormtroopersGeneric map, T car) + public static int operator + (MapWithSetStormtroopersGeneric map, T stormtrooper) { - return map._setStormtroopers.Insert(car); + return map._setStormtroopers.Insert(stormtrooper); } /// /// Перегрузка оператора вычитания @@ -80,7 +80,7 @@ namespace Stormtrooper Graphics gr = Graphics.FromImage(bmp); ShowOnMap(); DrawBackground(gr); - DrawCars(gr); + DrawStormtroopers(gr); return bmp; } /// @@ -90,9 +90,9 @@ namespace Stormtrooper public Bitmap ShowOnMap() { Shaking(); - foreach (var boat in _setStormtroopers.GetStormtroopers()) + foreach (var stormtrooper in _setStormtroopers.GetStormtroopers()) { - return _map.CreateMap(_pictureWidth, _pictureHeight, boat); + return _map.CreateMap(_pictureWidth, _pictureHeight, stormtrooper); } return new(_pictureWidth, _pictureHeight); } @@ -121,10 +121,10 @@ namespace Stormtrooper { for (; j > i; j--) { - var boat = _setStormtroopers[j]; - if (boat != null) + var stormtrooper = _setStormtroopers[j]; + if (stormtrooper != null) { - _setStormtroopers.Insert(boat, i); + _setStormtroopers.Insert(stormtrooper, i); _setStormtroopers.Remove(j); break; } @@ -159,14 +159,14 @@ namespace Stormtrooper /// Метод прорисовки объектов /// /// - private void DrawCars(Graphics g) + private void DrawStormtroopers(Graphics g) { int x = (_pictureWidth / _placeSizeWidth) * _placeSizeWidth - _placeSizeWidth; int y = 5; - foreach (var boat in _setStormtroopers.GetStormtroopers()) + foreach (var stormtrooper in _setStormtroopers.GetStormtroopers()) { - boat?.SetObject(x, y, _pictureWidth, _pictureHeight); - boat?.DrawningObject(g); + stormtrooper?.SetObject(x, y, _pictureWidth, _pictureHeight); + stormtrooper?.DrawningObject(g); x -= _placeSizeWidth; if (x < 0) { diff --git a/Stormtrooper/Stormtrooper/SetStormtroopersGeneric.cs b/Stormtrooper/Stormtrooper/SetStormtroopersGeneric.cs index 01365ab..359f2d3 100644 --- a/Stormtrooper/Stormtrooper/SetStormtroopersGeneric.cs +++ b/Stormtrooper/Stormtrooper/SetStormtroopersGeneric.cs @@ -32,7 +32,7 @@ namespace Stormtrooper /// /// Добавление объекта в набор /// - /// Добавляемый автомобиль + /// Добавляемый автомобиль /// public int Insert(T stormtrooper) { @@ -52,7 +52,7 @@ namespace Stormtrooper /// /// Добавление объекта в набор на конкретную позицию /// - /// Добавляемый автомобиль + /// Добавляемый автомобиль /// Позиция /// public bool Insert(T stormtrooper, int position) @@ -113,11 +113,11 @@ namespace Stormtrooper /// public IEnumerable GetStormtroopers() { - foreach (var boat in _places) + foreach (var stormtrooper in _places) { - if (boat != null) + if (stormtrooper != null) { - yield return boat; + yield return stormtrooper; } else {