Exemplo n.º 1
0
        public WordSearchState(
            string currentString,
            IPrefixTreeNode dictionaryNode)
        {
            Validate.IsNotNullOrEmpty(currentString);
            Validate.IsNotNull(dictionaryNode, "dictionaryNode");

            CurrentString  = currentString;
            DictionaryNode = dictionaryNode;
        }
Exemplo n.º 2
0
        private WordSearchState(
            string prefix,
            Tile nextTile,
            IPrefixTreeNode nextNode,
            bool useAlternate = false)
        {
            string nextLetters = useAlternate ? nextTile.AlternateLetters : nextTile.Letters;

            CurrentString  = prefix + nextLetters;
            LastTileAdded  = nextTile;
            DictionaryNode = nextNode;
        }
Exemplo n.º 3
0
        public WordSearchState(
            Tile startingTile,
            PrefixTreeDictionary dictionary,
            bool useAlternate = false)
        {
            Validate.IsNotNull(startingTile, "startingTile");
            Validate.IsNotNull(dictionary, "dictionary");

            CurrentString  = useAlternate ? startingTile.AlternateLetters : startingTile.Letters;
            LastTileAdded  = startingTile;
            DictionaryNode = dictionary.FindNode(CurrentString);
        }