Exemple #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            engine.GameLoop();
            //main logic of game, 1 loop
            UpdateUI();
            //sets display, unit info, round

            if (engine.IsGameOver)
            //if no closest unit
            {
                timer.Stop();
                UpdateUI();
                lblMap.Text = engine.WinningFaction + " WON!\n" + lblMap.Text;
                //took text in there, added a thing for who won
                gameState = GameState.ENDED;
                //enumeration
                btnStartPause.Text = "Restart";
                //change button text
            }
        }