Exemplo n.º 1
0
        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
            }
        }
Exemplo n.º 2
0
        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));
        }