Exemple #1
0
        // Initialize some random stuff.
        private void Form1_Load(object sender, EventArgs e)
        {
            paddle = Paddle.getInstance();

            ballsCanCollide = false;

            chances.Text = "Chances left " + lives;

            InitializePaddle(paddle);


            initializeBalls();

            initializeBlocks();


            observers = unitsObservers.getObservers();

            doubleBuffer();
        }
Exemple #2
0
        private void resetTheGame()
        {
            lives = 50;

            collisions.Items.Clear();

            observers.Clear(); //Remove all elements in the ArrayList

            unitsObservers = new UnitsObservers();

            initializeBlocks();

            initializeBalls();

            observers = unitsObservers.getObservers();

            tmrMoveBall.Enabled = true;
        }