diff --git a/Laba1Loco/Laba1Loco/SetGeneric.cs b/Laba1Loco/Laba1Loco/SetGeneric.cs
index a63353d..5483060 100644
--- a/Laba1Loco/Laba1Loco/SetGeneric.cs
+++ b/Laba1Loco/Laba1Loco/SetGeneric.cs
@@ -113,12 +113,12 @@ namespace Laba1Loco
/// Проход по списку
///
///
- public IEnumerable GetTrains(int? maxCars = null)
+ public IEnumerable GetTrains(int? maxTrains = null)
{
for (int i = 0; i < _places.Count; ++i)
{
yield return _places[i];
- if (maxCars.HasValue && i == maxCars.Value)
+ if (maxTrains.HasValue && i == maxTrains.Value)
{
yield break;
}
diff --git a/Laba1Loco/Laba1Loco/TrainsGenericCollection.cs b/Laba1Loco/Laba1Loco/TrainsGenericCollection.cs
index 83c66a1..3ad62b6 100644
--- a/Laba1Loco/Laba1Loco/TrainsGenericCollection.cs
+++ b/Laba1Loco/Laba1Loco/TrainsGenericCollection.cs
@@ -120,15 +120,15 @@ where U : IMoveableObject
private void DrawObjects(Graphics g)
{
int i = 0;
- foreach (var car in _collection.GetTrains())
+ foreach (var train in _collection.GetTrains())
{
- if (car != null)
+ if (train != null)
{
- car.SetPosition((i % (_pictureWidth / _placeSizeWidth)) * _placeSizeWidth, (i / (_pictureWidth / _placeSizeWidth)) * _placeSizeHeight);
- if (car is DrawingLoco)
- (car as DrawingLoco).DrawTransport(g);
+ train.SetPosition((i % (_pictureWidth / _placeSizeWidth)) * _placeSizeWidth, (i / (_pictureWidth / _placeSizeWidth)) * _placeSizeHeight);
+ if (train is DrawingLoco)
+ (train as DrawingLoco).DrawTransport(g);
else
- car.DrawTransport(g);
+ train.DrawTransport(g);
}
i++;
}