Esempio n. 1
0
        /// <summary>
        /// テトリミノの描写
        /// </summary>
        private void CurrentTetriminoDraw()
        {
            Point position = _currentTetrimino.GetCurrentPosition();

            Point[] Shapes = _currentTetrimino.GetCurrentShape();
            Brush   Color  = _currentTetrimino.GetCurrentColor();

            foreach (Point Shape in Shapes)
            {
                BlockControls[(int)(Shape.X + position.X) + ((Cols / 2) - 1),
                              (int)(Shape.Y + position.Y + 2)].Background = Color;
            }
        }
Esempio n. 2
0
        private void CurrentTetraminoDraw()
        {
            var position = _currentTetramino.GetCurrentPosition();
            var shape    = _currentTetramino.GetCurrentShape();
            var color    = _currentTetramino.GetCurrentColor();

            foreach (var point in shape)
            {
                _blockControls[(int)(point.X + position.X) + ((_cols / 2) - 1), (int)(point.Y + position.Y) + 2]
                .Background = color;
            }
        }