Beispiel #1
0
        private void btnRestart_Click(object sender, EventArgs e)
        {
            // Hide victory text and button
            labelVictory.Visible = false;
            btnRestart.Visible   = false;
            Pong.ActiveForm.Focus();

            // Revert the scores back to 0
            player1.RestartScore();
            player2.RestartScore();

            // Start ball movemenet and restart its position
            ball.Reset();
            BallMovement.Start();
        }