Example #1
0
        private void SetupNewGame()
        {
            dropDownTimer.Enabled  = false;
            dropDownTimer.Interval = DEFAULT_DROPDOWN_INTERVAL;
            level            = 0;
            rows             = 0;
            points           = 0;
            pointsLabel.Text = "0";
            levelLabel.Text  = "0";
            linesLabel.Text  = "0";
            paused           = false;
            pauseButton.Text = "Pause";
            pos     = new Point(new Random().Next(COLS - 1) + 1, START_Y);
            tetFact = new TetrominoFactory();

            if (futureShapes.Count > 0)
            {
                futureShapes.Clear();
            }

            FillMovesQueue();
            tet = futureShapes.Dequeue();
            InitializeGrid();

            moveTetrimino(pos);
        }
Example #2
0
        private void SetupNewGame()
        {
            dropDownTimer.Enabled = false;
            dropDownTimer.Interval = DEFAULT_DROPDOWN_INTERVAL;
            level = 0;
            rows = 0;
            points = 0;
            pointsLabel.Text = "0";
            levelLabel.Text = "0";
            linesLabel.Text = "0";
            paused = false;
            pauseButton.Text = "Pause";
            pos = new Point(new Random().Next(COLS - 1) + 1, START_Y);
            tetFact = new TetrominoFactory();

            if (futureShapes.Count > 0)
                futureShapes.Clear();

            FillMovesQueue();
            tet = futureShapes.Dequeue();
            InitializeGrid();

            moveTetrimino(pos);
        }