public bool CanFigureMoveToPoint(Figure figure, Point point)
{
Contract.Requires(figure != null);
if (figure.Size.Width == 1 && figure.Size.Height == 1) return IsStandable(point.X, point.Y);
bool canMove = true;
List<Point> list = new List<Point>();
for (int x = point.X;
x < point.X + (figure.Orientation.Equals(Orientation.V) ? figure.Size.Width : figure.Size.Height);
x++)
{
for (int y = point.Y;
y < point.Y + (figure.Orientation.Equals(Orientation.V) ? figure.Size.Height : figure.Size.Width);
y++)
{
canMove &= IsStandable(x, y) || (IsSquareWithinBoard(x, y) && this[x, y].Figure == figure);
}
}
return canMove;
}