Вторая лабораторная работа

This commit is contained in:
Катя Ихонкина 2022-10-11 12:39:54 +04:00
parent fa4cf4f7f0
commit a4d08824ed
4 changed files with 2 additions and 7 deletions

View File

@ -17,7 +17,6 @@ namespace MotorBoat
protected readonly Random _random = new();
protected readonly int _freeRoad = 0;
protected readonly int _barrier = 1;
public Bitmap CreateMap(int width, int height, IDrawningObject drawningObject)
{
_width = width;
@ -158,9 +157,9 @@ namespace MotorBoat
if (leftXinS < 0 || bottomYinS > _height || topYinS<0 || rightX > _width) { return false; }
for (int j = topYinS; j < bottomYinS; j++)
for (int j = topYinS; j <= bottomYinS; j++)
{
for (int i = leftXinS; i < rightXinS; i++)
for (int i = leftXinS; i <= rightXinS; i++)
{
if (_map[i, j] == _barrier)
{

View File

@ -13,7 +13,5 @@ namespace MotorBoat
Down = 2,
Left = 3,
Right = 4,
DownLeft=5,
DownRight=6,
}
}

View File

@ -34,7 +34,6 @@ namespace MotorBoat
void IDrawningObject.DrawningObject(Graphics g)
{
// TODO
_boat.DrawTransport(g);
}
}

View File

@ -28,5 +28,4 @@ namespace MotorBoat
SportLine = sportLine;
}
}
}