示例#1
0
        /// <summary>
        /// Writes next brick to the game board
        /// </summary>
        private void DrawNextBrick()
        {
            var pair = GameBoard.Labels.ElementAt(3);
            var x    = pair.Value[0] + pair.Key.Length / 2;
            var y    = pair.Value[1] + 1;

            NextBrick.Move(x / GameBoard.BoardScaling[0], y / GameBoard.BoardScaling[1]);
            NextBrick.Write();
        }
示例#2
0
        /// <summary>
        /// Prepares next brick to be active brick.
        /// </summary>
        private void MakeNextBrickActive()
        {
            NextBrick.Erase();
            ActiveBrick = NextBrick;
            var pair = GameBoard.Labels.ElementAt(3);
            var x    = pair.Value[0] + pair.Key.Length / 2;
            var y    = pair.Value[1] + 1;

            ActiveBrick.Move(-x / GameBoard.BoardScaling[0], -y / GameBoard.BoardScaling[1]); // move to original position
            ActiveBrick.Move(GameBoard.TheoreticalSize[0] / 2 - 1, 0);                        // move to middle top of the board

            ActiveBrick.Write();
        }