示例#1
0
        private void BtnPartA_Click(object sender, RoutedEventArgs e)
        {
            if (game != null || gameDrawer != null)
            {
                EndGame();
            }
            tbResult.Text = "";

            Thread.Sleep(1000);

            game       = new Game(tbCode.Text);
            gameDrawer = new GameDraw(ref tbResult, ref tbScore, ref game);

            gameDrawer.Start();
            game.PlayThread();
        }
示例#2
0
        private void BtnPart2_Click(object sender, RoutedEventArgs e)
        {
            if (game != null || gameDrawer != null)
            {
                EndGame();
            }

            tbResult.Text = "";

            Thread.Sleep(1000);
            game       = new Game(tbCode.Text);
            gameDrawer = new GameDraw(ref tbResult, ref tbScore, ref game);

            gameDrawer.Start();
            game.PlayUnlimited();

            LeftButton.IsEnabled  = true;
            StayButton.IsEnabled  = true;
            RightButton.IsEnabled = true;
        }