Вторая лабораторная работа
This commit is contained in:
parent
fa4cf4f7f0
commit
a4d08824ed
@ -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)
|
||||
{
|
||||
|
@ -13,7 +13,5 @@ namespace MotorBoat
|
||||
Down = 2,
|
||||
Left = 3,
|
||||
Right = 4,
|
||||
DownLeft=5,
|
||||
DownRight=6,
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ namespace MotorBoat
|
||||
|
||||
void IDrawningObject.DrawningObject(Graphics g)
|
||||
{
|
||||
// TODO
|
||||
_boat.DrawTransport(g);
|
||||
}
|
||||
}
|
||||
|
@ -28,5 +28,4 @@ namespace MotorBoat
|
||||
SportLine = sportLine;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user