diff --git a/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/AirplanesGenericCollection.cs b/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/AirplanesGenericCollection.cs index 3bf46ba..b7600f7 100644 --- a/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/AirplanesGenericCollection.cs +++ b/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/AirplanesGenericCollection.cs @@ -67,13 +67,13 @@ namespace ProjectAirplaneWithRadar.Generics private void DrawObjects(Graphics g) { int i = 0; - foreach (var monorail in _collection.GetAirplanes()) + foreach (var airplane in _collection.GetAirplanes()) { - if (monorail != null) + if (airplane != null) { int inRow = _pictureWidth / _placeSizeWidth; - monorail.SetPosition(i % inRow * _placeSizeWidth, _pictureHeight - _pictureHeight % _placeSizeHeight - (i / inRow + 1) * _placeSizeHeight); - monorail.DrawTransport(g); + airplane.SetPosition(i % inRow * _placeSizeWidth, _pictureHeight - _pictureHeight % _placeSizeHeight - (i / inRow + 1) * _placeSizeHeight); + airplane.DrawTransport(g); } i++; } diff --git a/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/AirplanesGenericStorage.cs b/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/AirplanesGenericStorage.cs index 45b8e45..b9c169d 100644 --- a/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/AirplanesGenericStorage.cs +++ b/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/AirplanesGenericStorage.cs @@ -40,6 +40,5 @@ namespace ProjectAirplaneWithRadar.Generics return null; } } - } } diff --git a/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/SetGeneric.cs b/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/SetGeneric.cs index 4b90b21..da5fc74 100644 --- a/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/SetGeneric.cs +++ b/ProjectAirplaneWithRadar/ProjectAirplaneWithRadar/SetGeneric.cs @@ -53,12 +53,12 @@ namespace ProjectAirplaneWithRadar.Generics return; } } - public IEnumerable GetAirplanes(int? maxMonorails = null) + public IEnumerable GetAirplanes(int? maxAirplanes = null) { for (int i = 0; i < _places.Count; ++i) { yield return _places[i]; - if (maxMonorails.HasValue && i == maxMonorails.Value) + if (maxAirplanes.HasValue && i == maxAirplanes.Value) { yield break; }