Descent.Model.Board.Board.RemoveFigure C# (CSharp) Method

RemoveFigure() private method

Removes a figure from all squares where it was previously on the board
private RemoveFigure ( Point point ) : void
point Point /// The point where the figure is standing ///
return void
        internal void RemoveFigure(Point point)
        {
            Contract.Requires(IsSquareWithinBoard(point.X, point.Y));
            Contract.Requires(this[point] != null);
            Contract.Ensures(this[point].Figure == null);

            Figure figure = this[point].Figure;
            point = FiguresOnBoard[figure]; // Get top left corner if big monster
            if (figure is Hero)
            {
                heroesInTown.Add((Hero)figure);
            }

            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++)
                {
                    this[x, y].Figure = null;
                }
            }

            figuresOnBoard.Remove(figure);
        }