Exemplo n.º 1
0
        private void StartGame()
        {
            GameStatus = GAME_STATUS.IN_GAME;
            UserScore  = 0;
            CompScore  = 0;

            UserScoreLabel.Text = UserScore.ToString();
            CompScoreLabel.Text = CompScore.ToString();

            CompRacket.Enabled = false;
            Ball.Enabled       = false;

            RestartButton.Enabled = false;
            RestartButton.Hide();

            UserRacket.Enabled = true;
            UserRacket.Focus();
        }
Exemplo n.º 2
0
        private void StartGame()
        {
            GameStatus    = GAME_STATUS.IN_GAME;
            UserScore     = 0;
            CompScore     = 0;
            Ball.Location = new Point(UserRacket.Left + UserRacket.Size.Width / 2 - Size.Width / 2, UserRacket.Top - UserRacket.Size.Height);

            UserScoreLabel.Text = UserScore.ToString();
            CompScoreLabel.Text = CompScore.ToString();

            CompRacket.Enabled = false;
            Ball.Enabled       = false;

            RestartButton.Enabled = false;
            RestartButton.Hide();

            UserRacket.Enabled = true;
            UserRacket.Focus();
        }