コード例 #1
0
ファイル: TBlock.cs プロジェクト: vincaslt/TetrisCSharp
 protected override void InitializeBlock()
 {
     Sheets[0][0, 1] = Sheets[0][1, 0] = Sheets[0][1, 1] = Sheets[0][1, 2] = new Square(Brush);
     Sheets[1][0, 1] = Sheets[1][1, 1] = Sheets[1][1, 2] = Sheets[1][2, 1] = new Square(Brush);
     Sheets[2][1, 0] = Sheets[2][1, 1] = Sheets[2][1, 2] = Sheets[2][2, 1] = new Square(Brush);
     Sheets[3][0, 1] = Sheets[3][1, 0] = Sheets[3][1, 1] = Sheets[3][2, 1] = new Square(Brush);
 }
コード例 #2
0
ファイル: OBlock.cs プロジェクト: vincaslt/TetrisCSharp
 protected override void InitializeBlock()
 {
     Sheets[0][0, 0] = Sheets[0][0, 1] = Sheets[0][1, 0] = Sheets[0][1, 1] = new Square(Brush);
     Sheets[1] = (Square[,])Sheets[0].Clone();
     Sheets[2] = (Square[,])Sheets[0].Clone();
     Sheets[3] = (Square[,])Sheets[0].Clone();
 }
コード例 #3
0
ファイル: Block.cs プロジェクト: vincaslt/TetrisCSharp
        protected Square[][,] Sheets; // rotation x dimension x dimension

        #endregion Fields

        #region Constructors

        protected Block(Brush brush)
        {
            Sheets = new Square[4][,]; // 4x4 is standard
            for (var i = 0; i < 4; i++)
            {
                Sheets[i] = new Square[4,4];
            }
            Brush = brush;

            InitializeBlock();
        }