public bool CanMove() { if (CurrentMap == null) return false; GenerateRandomMoveDirection(); var tempPosition = new Position(Position.X, Position.Y); tempPosition.Move(moveDirection); return !(tempPosition.X < CurrentMap.MinLeft || tempPosition.X > CurrentMap.MaxLeft || tempPosition.Y < CurrentMap.MinTop || tempPosition.Y > CurrentMap.MaxTop); }
public bool CanMove() { if (CurrentMap == null) { return(false); } var tempPosition = new Position(Position.X, Position.Y); tempPosition.Move(GetMoveDirection()); return(!(tempPosition.X < CurrentMap.MinLeft || tempPosition.X > CurrentMap.MaxLeft || tempPosition.Y < CurrentMap.MinTop || tempPosition.Y > CurrentMap.MaxTop)); }
public void Move() { Position.Move(moveDirection); }
public void Move() { Position.Move(GetMoveDirection()); }