Вторая лабораторная
This commit is contained in:
parent
9594bcedae
commit
a9f3a7a521
@ -102,25 +102,10 @@ namespace Catamaran
|
||||
{
|
||||
_drawingObject.MoveObject(direction);
|
||||
}
|
||||
else _drawingObject.MoveObject(OppositDirection(direction));
|
||||
return DrawMapWithObject();
|
||||
}
|
||||
|
||||
private static Direction OppositDirection(Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case Direction.Up:
|
||||
return Direction.Down;
|
||||
case Direction.Down:
|
||||
return Direction.Up;
|
||||
case Direction.Left:
|
||||
return Direction.Right;
|
||||
case Direction.Right:
|
||||
return Direction.Left;
|
||||
}
|
||||
return Direction.None;
|
||||
}
|
||||
|
||||
private bool SetObjectOnMap()
|
||||
{
|
||||
if (_drawingObject == null || _map == null)
|
||||
|
Loading…
Reference in New Issue
Block a user