Agliullov D. A. Lab Work 4 Base #12

Merged
eegov merged 17 commits from Lab4 into Lab3 2022-10-14 10:07:19 +04:00
2 changed files with 8 additions and 3 deletions
Showing only changes of commit 2f1f850316 - Show all commits

View File

@ -34,6 +34,8 @@ namespace AirBomber
return DrawMapWithObject();
}
public bool HasMap => _map != null;
/// <summary>Проверяет наличие непроходимых участков в заданной области</summary>
/// <param name="area">Заданная область</param>
/// <param name="iBarrier">i-ый индекс первого барьера, который был найден в области</param>

View File

@ -34,6 +34,9 @@ namespace AirBomber
/// Карта
/// </summary>
private readonly U _map;
public U Map => _map;
/// <summary>
/// Конструктор
/// </summary>
@ -93,7 +96,7 @@ namespace AirBomber
var airplane = _setAirplanes[i];
if (airplane != null)
{
return _map.CreateMap(_pictureWidth, _pictureHeight, airplane);
return Map.CreateMap(_pictureWidth, _pictureHeight, airplane);
}
}
return new(_pictureWidth, _pictureHeight);
@ -105,9 +108,9 @@ namespace AirBomber
/// <returns></returns>
public Bitmap MoveObject(Direction direction)
{
if (_map != null)
if (Map != null)
{
return _map.MoveObject(direction);
return Map.MoveObject(direction);
}
return new(_pictureWidth, _pictureHeight);
}