6236c42928e90399d7c3242bdd21e1fcdd1d6011
Dev Ghai Removed the contorted conce...

Dev Ghai authored 11 years ago

1) #define DEVELOPING
Dev Ghai Revert "Removing byte order...

Dev Ghai authored 11 years ago

2) 
3) using System;
4) using System.Collections.Generic;
5) using System.IO;
6) using System.Diagnostics;
7) 
8) namespace Boggle
9) {
10)     public class Boggle
11)     {
12)         static void PrintWords(HashSet<WordOnBoard> words)
13)         {
14)             int score = 0;
15)             foreach (WordOnBoard word in words)
16)             {
17)                 Console.Write("{0} [{1}], ", word.Word, word.Score);
18)                 score += word.Score;
19)             }
20)             Console.WriteLine("\n\nTotal score for this board: {0}", score);
21)         }
22)         static void Main(string[] args)
23)         {
24)             Stopwatch st = new Stopwatch();
25)             BoggleList bl = new BoggleList();
26)             Console.WriteLine("Current directory: {0}", Directory.GetCurrentDirectory());
27) #if !DEVELOPING
28)             string input;
29)             bool isError = false;
30) #endif
31)             int boardSideLength = 3;
32)             int minWordLength = 4;
33) 
34)             char wordListInput = 'Z';
Dev Ghai Removed the contorted conce...

Dev Ghai authored 11 years ago

35)             SupportedLists listToUseForLookup;
Dev Ghai Revert "Removing byte order...

Dev Ghai authored 11 years ago

36)             
37) #if !DEVELOPING
38)             do
39)             {
40)                 isError = false;
41)                 Console.WriteLine("Please enter the word list that you wish to use [Z for Zingarelli, T for TWS or standard scrabble list]: ");
42)                 input = Console.ReadLine();
43)                 if (!char.TryParse(input, out wordListInput))
44)                 {
45)                     Console.WriteLine("Invalid Input. Couldn't parse character");
46)                     isError = true;
47)                 }
48)                 wordListInput = char.ToUpper(wordListInput);
49)                 if (wordListInput != 'T' && wordListInput != 'Z')
50)                 {
51)                     Console.WriteLine("Please enter only T or Z.");
52)                     isError = true;
53)                 }
54)             } while (isError);
55) #endif
56)             switch (wordListInput)
57)             {
58)                 case 'T':
Dev Ghai Removed the contorted conce...

Dev Ghai authored 11 years ago

59)                     listToUseForLookup = SupportedLists.TWS;
Dev Ghai Revert "Removing byte order...

Dev Ghai authored 11 years ago

60)                     break;
61) 
62)                 case 'Z':
Dev Ghai Removed the contorted conce...

Dev Ghai authored 11 years ago

63)                     listToUseForLookup = SupportedLists.ZINGARELLI;