Example #1
0
        public BoggleClone()
        {
            InitializeComponent();

            // initialize the library, first run always uses a tree library for efficiency sake.
            lib = new TreeLibrary();
            lib.BuildLibrary("lexicon.txt");

            // initialize the dice
            dice = new Dice();
            dice.rollDice();

            // add the controls & buttons
            loader = new LibraryLoader();
            this.Controls.Add(loader);
            //loader.loadTimeL.Text = ts.Milliseconds.ToString();
            gameStatusController = new GameStatus();
            this.Controls.Add(gameStatusController);
            // add the library loader button listener
            loader.libLoadB.Click += new System.EventHandler(this.libLoadB_Click);
            loader.resizeB.Click += new System.EventHandler(this.resizeB_Click);
            gameStatusController.submitB.Click += new EventHandler(this.submitB_Click);
            gameStatusController.solveB.Click += new EventHandler(solveB_Click);
            setupBoard();

            // roll the dice
            //this.gameStatusController.startGame();
        }
 public CatelogController(LibraryInterface asset, CheckOutInterface checkout)
 {
     _asset    = asset;
     _checkout = checkout;
 }
Example #3
0
 /// <summary>
 /// Create the dice given a library with a distribution of letters and a number of dice to represent it on
 /// </summary>
 /// <param name="lib">Already loaded library with info on letter distribution</param>
 /// <param name="count">The number of dice on the board</param>
 public Dice(LibraryInterface lib, int count)
 {
 }
Example #4
0
 private void libLoadB_Click(object sender, EventArgs e)
 {
     Stopwatch sw = new Stopwatch();
     sw.Start();
     switch (loader.libTypeLB.SelectedIndex)
     {
         case 0:
             this.lib = new TreeLibrary();
             break;
         case 1:
             this.lib = new HashLibrary();
             break;
         case 2:
             this.lib = new ArrayLibrary();
             break;
         default:
             break;
     }
     this.lib.BuildLibrary(Strings.LexiconFile);
     sw.Stop();
     this.loader.loadTimeL.Text = String.Format("{0} ms", sw.ElapsedMilliseconds);
 }
Example #5
0
 /// <summary>
 /// Given a library with a distribution of letters, create a 4X4 board layout
 /// </summary>
 /// <param name="lib">Already loaded library with info on letter distribution</param>
 public Dice(LibraryInterface lib)
 {
 }