Исправил условие в функции
This commit is contained in:
parent
2c774e7f39
commit
1e3c260993
@ -64,7 +64,7 @@ public class DrawningAccordionBus
|
|||||||
/// <returns>true - границы заданы, false - проверка не пройдена, нельзя
|
/// <returns>true - границы заданы, false - проверка не пройдена, нельзя
|
||||||
public bool SetPictureSize(int width, int height)
|
public bool SetPictureSize(int width, int height)
|
||||||
{
|
{
|
||||||
if (_drawningAccordionBusWidth < width && _drawningAccordionBusHeight < height)
|
if (_drawningAccordionBusWidth < width || _drawningAccordionBusHeight < height)
|
||||||
{
|
{
|
||||||
_pictureWidth = width;
|
_pictureWidth = width;
|
||||||
_pictureHeight = height;
|
_pictureHeight = height;
|
||||||
@ -90,8 +90,8 @@ public class DrawningAccordionBus
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Random rnd = new Random();
|
Random rnd = new Random();
|
||||||
_startPosX = rnd.Next(0, _pictureWidth.Value - _drawningAccordionBusWidth);
|
_startPosX = rnd.Next(0, 256);
|
||||||
_startPosY = rnd.Next(0, _pictureHeight.Value - _drawningAccordionBusHeight);
|
_startPosY = rnd.Next(0, 256);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool MoveTransport(DirectionType direction)
|
public bool MoveTransport(DirectionType direction)
|
||||||
|
Loading…
Reference in New Issue
Block a user