public static void SolveBoard(string boardState, Action<string[]> callback) { //Init Board and Wordlist char[] letterList = string.Join("", boardState.Split(new string[] { ",", "\r\n"}, StringSplitOptions.RemoveEmptyEntries)).ToCharArray(); CurrentWordList = FullWordList.LimitWordsByLetterList(letterList); MyBoard.SetBoardState(boardState); //Init Solve Cycle Members CompletedCallback = callback; CompletedWords = 0; ExpectedWords = CurrentWordList.FullWordList.Length; FoundWords = new List<string>(); QueueWorkTasks(); }
public static void InitState(short boardSize) { MyBoard = new Board(boardSize); FullWordList = new Wordlist(File.ReadAllText(WORD_LIST_PATH)); }