/// <summary>
 /// Initializes a new instance of the <see cref="SearchPathFinder"/> class.
 /// </summary>
 /// <param name="start">The start cell. Presumably where
 /// the <see cref="Actor"/> is located.</param>
 /// <param name="destination">Where we would like to get.</param>
 public SearchPathFinder(Cell start, Location destination)
 {
     this.destination = destination;
     startCell = start;
     level = start.Level;
 }
        /// <summary>
        /// Tests whether we can enter the specified cell
        /// from the specified direction.
        /// </summary>
        /// <param name="cell">The cell.</param>
        /// <param name="fromDirection">From direction.</param>
        /// <returns></returns>
        bool Enter(Cell cell, Direction fromDirection)
        {
            bool result = false;
            if (cell.CanEnter)
            {
                result = true;
            }
            else if (!treasurePushed && cell.CellContents is Treasure)
            {
                treasurePushed = true;
                result = true;
            }

            /* If we were successful and this isn't the last cell where
             we have previously pushed a treasure, then we add it to moves.
             The reason we check for the last cell and treasurePushed
             is because we want the treasure to be located at the destination
             at the end of the move. */
            if (result && !(cell.Location == destination && treasurePushed))
            {
                Move move = new Move(fromDirection);
                moves.Add(move);
            }

            return result;
        }