protected BaseWordConstructor(int startLetter, WordSearchBox wordSearchBox) { StartLetter = startLetter; WordSearchBox = wordSearchBox; maxLettersToSearchCalculator = new MaxLettersToSearchCalculator( StartLetter, WordSearchBox.Width, WordSearchBox.Height); }
public static SearchEngine Get(IEngineData searchEngineData) { var wordSearchBox = new WordSearchBox(searchEngineData.Letters, searchEngineData.Width); var expectedWords = searchEngineData.ExpectedWords; var wordList = new WordList(); wordList.AddWordsToList(expectedWords); return new SearchEngine(wordSearchBox, wordList); }
protected void TestAWordIsntFound(string wordSearchLetters, int boxWidth, int wordLength, Func <WordSearchBox, IWordConstructor> createWordConstructor) { var searchBox = new WordSearchBox(wordSearchLetters, boxWidth); var wordConstructor = createWordConstructor(searchBox); var result = TestAWordCheck(searchBox, wordLength, wordConstructor); Assert.IsFalse(result.Item2); }
public static SearchEngine Get(IEngineData searchEngineData) { var wordSearchBox = new WordSearchBox(searchEngineData.Letters, searchEngineData.Width); var expectedWords = searchEngineData.ExpectedWords; var wordList = new WordList(); wordList.AddWordsToList(expectedWords); return(new SearchEngine(wordSearchBox, wordList)); }
private void ShowSearchWordBox(List <string> usedChars) { WordSearchBox wordBox = gameObject.AddComponent <WordSearchBox>(); wordBox.InsertLetters(usedChars); wordBox.InsertSearchBaseGO(this.searchBase); //wordBox.InsertLetterGO(this.searchLetter); wordBox.DrawBase(); }
public UpWordConstructor(int startLetter, WordSearchBox wordSearchBox) : base(startLetter, wordSearchBox) { }
public DiagonallyRightUpWordConstructor(int startLetter, WordSearchBox wordSearchBox) : base(startLetter, wordSearchBox) { }
public DiagonallyRightDownWordConstructor(int startLetter, WordSearchBox wordSearchBox) : base(startLetter, wordSearchBox) { }
public SearchEngine(WordSearchBox wordSearchBox, WordList wordList) { this.wordSearchBox = wordSearchBox; this.wordList = wordList; }
private Tuple <string, bool> TestAWordCheck(WordSearchBox wordSearchBox, int length, IWordConstructor wordConstructor) { var searchEngine = new SearchEngine(wordSearchBox, new WordList()); return(searchEngine.CheckWordOfOneLengthInOneDirection(length, wordConstructor)); }
public DiagonallyLeftUpWordConstructor(int startLetter, WordSearchBox wordSearchBox) : base(startLetter, wordSearchBox) { }