private static IBoggleDictionary GetBoggleDictionary(BoardProperties.DictionaryType name) { string dictionaryName = Enum.GetName(typeof(BoardProperties.DictionaryType), name); switch (dictionaryName.ToLower()) { case Constants.ENGLISHLITE_DICTIONARY: return(new EnglishLite()); case Constants.SPANISH_DICTIONARY: return(new Spanish()); case Constants.ENGLISH_DICTIONARY: return(new EnglishLite()); //not implemented return default default: return(new EnglishLite()); //return default } }
public static IBoard CreateBoard(BoardProperties.BoardStyle style, BoardProperties.DictionaryType dictionary, BoardProperties.BoardType board, string letters) { IBoggleDictionary boardDictionary = GetBoggleDictionary(dictionary); return(GetBoard(board, boardDictionary, style, letters)); }