Start() public method

public Start ( ) : void
return void
Example #1
0
        private void RobotTurn(ref bool MyTurn)
        {
            if (MyTurn == false)
            {
                Random random = new Random();

                labelWhosTurn.Text = "ХОД РОБОТА"; labelWhosTurn.ForeColor = Color.Red;
                Cursor             = Cursors.WaitCursor;
                TurnTimer.Interval = random.Next(5000, 7000);
                TurnTimer.Start();
            }
        }
Example #2
0
        protected virtual bool BeginTurn(Direction newDirection)
        {
            if (m_TurnTimer != null)
            {
                m_TurnTimer.Stop();
            }

            m_TurnTimer = new TurnTimer(this, newDirection);
            m_TurnTimer.Start();

            return(true);
        }
Example #3
0
        protected virtual bool BeginTurn(Direction newDirection)
        {
            if (_currentTurnTimer != null)
            {
                _currentTurnTimer.Stop();
            }

            _currentTurnTimer = new TurnTimer(this, newDirection);
            _currentTurnTimer.Start();

            return(true);
        }
Example #4
0
        public void StartPexeso(int row, int columns)
        {
            CreateCardsForGame(row, columns);
            Score = 0;

            RoundTimer.Start();
            ChoseSecondCardTimer.Start();
            TurnTimer.Start();

            RoundStopWatch.Start();
            TurnStopWatch.Start();
            //ChoseSecondCardStopwatch.Start();
        }
Example #5
0
        }   // Timerları yavaşlatma işlemini gerçekleştiren buton

        private void turnTimerControl_Click(object sender, EventArgs e)
        {
            if (btnPlayStop.AccessibleName == "1")
            {
                TurnTimer.Stop();
                btnPlayStop.AccessibleName = "2";
                btnPlayStop.Image          = Properties.Resources.playButton;
            }
            else
            {
                TurnTimer.Start();
                btnPlayStop.AccessibleName = "1";
                btnPlayStop.Image          = Properties.Resources.pauseButton;
            }
        }  // Timerları durdurup , başlatma işlemini gerçekleştiren buton
Example #6
0
 // loop thread: runs processes that can't be event driven
 private void UpdateLoop()
 {
     TurnTimer.Start();
     while (Running)
     {
         if (TurnTimer.ElapsedMilliseconds > TurnTimeLimit)
         {
             foreach (Player player in controllers.Player.GetAllPlayers())
             {
                 player.EndedTurn = true;
             }
             EndTurn(TurnEndReason.TimeOut);
             TurnTimer.Restart();
         }
     }
 }