private CrossWordField LoadCrossWordField() { string[] words = { "Belinda", "Leib", "Bein", "Alien", "Nie" }; Dictionary <string, int> wordDirections = new Dictionary <string, int>() { { words[0], 0 }, { words[1], 1 }, { words[2], 1 }, { words[3], 1 }, { words[4], 1 } }; Dictionary <string, int> wordIndexesOnBase = new Dictionary <string, int>() { { words[0], -1 }, { words[1], 2 }, { words[2], 4 }, { words[3], 6 }, { words[4], 1 } }; Dictionary <string, string> wordBaseWord = new Dictionary <string, string>() { { words[0], "" }, { words[1], words[0] }, { words[2], words[0] }, { words[3], words[0] }, { words[4], words[0] } }; Dictionary <string, Vector2> wordStartingCoordinations = new Dictionary <string, Vector2>() { { words[0], new Vector2(5, 7) }, { words[1], new Vector2(5, 9) }, { words[2], new Vector2(2, 11) }, { words[3], new Vector2(5, 13) }, { words[4], new Vector2(3, 8) } }; CrossWordField field = gameObject.AddComponent <CrossWordField>(); field.FillData(words, wordDirections, wordIndexesOnBase, wordBaseWord, wordStartingCoordinations); field.SetLetter(this.letter); field.ShowEverything(); //field.ShowNothing(); return(field); }
private List <string> GetUniqueLetters() { CrossWordField field = this.LoadCrossWordField(); return(field.GetUniqueLetters()); }