Ejemplo n.º 1
0
        public GameForm()
        {
            this.FormWidth  = this.Width;
            this.FormHeight = this.Height;

            this.InitializeComponent();

            this.ProgresiveBarTimer          = new Timer();
            this.ProgresiveBarTimer.Interval = TimeForPlayerTurn * 1000;
            this.ProgresiveBarTimer.Tick    += this.ProgresiveBarTimerTick;

            this.updateControlsTimer.Start();
            this.updateControlsTimer.Interval = 2000;
            this.updateControlsTimer.Tick    += this.UpdateControlsTick;

            this.InitializeControlsArrays();

            IRenderer renderer = new GuiRenderer(this);

            IInputHandlerer inputHandlerer = new GuiInputHandlerer(this);

            this.gameEngine = new GameEngine(renderer, inputHandlerer);

            try
            {
                this.gameEngine.GameInit();
            }
            catch (InputValueException ex)
            {
                renderer.ShowMessage(ex.Message);
            }
        }
Ejemplo n.º 2
0
        public GameForm()
        {
            this.FormWidth = this.Width;
            this.FormHeight = this.Height;

            this.InitializeComponent();

            this.ProgresiveBarTimer = new Timer();
            this.ProgresiveBarTimer.Interval = TimeForPlayerTurn * 1000;
            this.ProgresiveBarTimer.Tick += this.ProgresiveBarTimerTick;

            this.updateControlsTimer.Start();
            this.updateControlsTimer.Interval = 2000;
            this.updateControlsTimer.Tick += this.UpdateControlsTick;

            this.InitializeControlsArrays();

            IRenderer renderer = new GuiRenderer(this);

            IInputHandlerer inputHandlerer = new GuiInputHandlerer(this);

            this.gameEngine = new GameEngine(renderer, inputHandlerer);

            try
            {
                this.gameEngine.GameInit();
            }
            catch (InputValueException ex)
            {
                renderer.ShowMessage(ex.Message);
            }
        }