Ejemplo n.º 1
0
 // This method is run when the mainboard is powered up or reset.
 void ProgramStarted()
 {
     //Debug.Print("Program Started");
     /// starts mastermind game
     MasterMind mm = new MasterMind(displayTE35, joystick, button, multicolorLED);
     mm.start();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// constructor, gets all peripherals needed for the UI
        /// </summary>
        /// <param name="inputFinished">an EventHandler which will be called when the input in a round is completed successfully</param>
        public GameView(MasterMind masterMind, Gadgeteer.Modules.Module.DisplayModule display, Gadgeteer.Modules.GHIElectronics.Joystick joystick, 
            Gadgeteer.Modules.GHIElectronics.MulticolorLED led, EventHandler inputFinished)
        {
            this.masterMind = masterMind;

            //store Gadgeteer device references for later use
            this.display = display;
            this.joystick = joystick;
            this.led = led;

            //event handler which will be invoked when the user finished his input..we just pass this to the current ColorCodeInput
            this.inputFinished = inputFinished;

            //start with the first round!
            display.SimpleGraphics.Clear();
            display.SimpleGraphics.DisplayText("Mastermind - good luck!", Resources.GetFont(Resources.FontResources.NinaB), GT.Color.White, CODE_X_POS, WELCOME_Y_POS);
            createColorCodeInput(0);
        }