コード例 #1
0
ファイル: WordSearchState.cs プロジェクト: nbduke/puzzles
        public override bool Equals(object other)
        {
            WordSearchState otherState = other as WordSearchState;

            return(otherState != null &&
                   LastTileAdded.Location.Equals(otherState.LastTileAdded.Location));
        }
コード例 #2
0
ファイル: WordFinder.cs プロジェクト: nbduke/puzzles
        private void SearchStartingAtTile(
            Tile tile,
            FlexibleBacktrackingSearch <WordSearchState> stateSearcher,
            bool useAlternate = false)
        {
            var startingState = new WordSearchState(tile, Dictionary, useAlternate);

            stateSearcher.Search(startingState, node => ProcessSearchNode(node));
        }