Exemplo n.º 1
0
 public Tetris(CircularQueue <ushort> matrixs, Brush terisBrush)
 {
     m_matrixs = matrixs;
     this.Fill = terisBrush;
 }
Exemplo n.º 2
0
        static TetrisController()
        {
            /*
             *  0100 0000
             *  0100 1111
             *  0100 0000
             *  0100 0000
             */
            TetrisIGroup = new CircularQueue <ushort>(new ushort[] { 17476, 3840 });

            /*
             *  0010 0100 0011 0000
             *  0010 0111 0010 0111
             *  0110 0000 0010 0001
             *  0000 0000 0000 0000
             */
            TetrisJGroup = new CircularQueue <ushort>(new ushort[] { 8800, 18176, 12832, 1808 });

            /*
             *  0100 0000 1100 0010
             *  0100 1110 0100 1110
             *  0110 1000 0100 0000
             *  0000 0000 0000 0000
             */
            TetrisLGroup = new CircularQueue <ushort>(new ushort[] { 17504, 3712, 50240, 11776 });

            /*
             *  0000
             *  0110
             *  0110
             *  0000
             */
            TetrisOGroup = new CircularQueue <ushort>(new ushort[] { 1632 });

            /*
             *  0100 0011
             *  0110 0110
             *  0010 0000
             *  0000 0000
             */
            TetrisSGroup = new CircularQueue <ushort>(new ushort[] { 17952, 13824 });

            /*
             *  0010 0010 0000 0010
             *  0111 0011 0111 0110
             *  0000 0010 0010 0010
             *  0000 0000 0000 0000
             */
            TetrisTGroup = new CircularQueue <ushort>(new ushort[] { 9984, 8992, 1824, 9760 });

            /*
             *  0010 0110
             *  0110 0011
             *  0100 0000
             *  0000 0000
             */
            TetrisZGroup = new CircularQueue <ushort>(new ushort[] { 9792, 25344 });
            TetrisI      = new Tetris(TetrisIGroup, Brushes.Red);
            TetrisJ      = new Tetris(TetrisJGroup, Brushes.Cyan);
            TetrisL      = new Tetris(TetrisLGroup, Brushes.Yellow);
            TetrisO      = new Tetris(TetrisOGroup, Brushes.Blue);
            TetrisS      = new Tetris(TetrisSGroup, Brushes.Green);
            TetrisT      = new Tetris(TetrisTGroup, Brushes.Orange);
            TetrisZ      = new Tetris(TetrisZGroup, Brushes.Purple);
            Tetris       = new List <Tetris>(new Tetris[] { TetrisI, TetrisJ, TetrisL, TetrisO, TetrisS, TetrisT, TetrisZ });
        }