Ejemplo n.º 1
0
        // <------------------- HELPER METHODS ------------------>
        /// <summary>
        /// Method to move the blocks down when play ends
        /// </summary>
        private void MoveRowsDown()
        {
            timerDraw.Enabled = false;
            for (float f = 0; f < Constants.BLOCK_HEIGHT; f += Constants.BLOCK_MOVE_SPEED)
            {
                foreach (Row row in rows)
                {
                    row.MoveRowDown();
                    this.Refresh();
                }
            }
            rows.Add(new Row());
            this.Refresh();
            timerDraw.Enabled = true;
            if (IsGameOver())
            {
                MessageBox.Show("Game Over.");
                GenerateNewGame();
            }

            ballStart.GenerateNewPositions();
        }