示例#1
0
        //Roteer de huidige tetromino
        public Tetromino Rotate()
        {
            Tetromino result = new Tetromino();
            result.blocks = new Block[Height, Width];
            result.position = position;

            for (int x = 0; x < Height; x++)
                for (int y = 0; y < Width; y++)
                    result.blocks[x, y] = blocks[y, x]; //Spiegelen in de lijn y = x

            result = result.Mirror(); //Verticaal spiegelen

            return result;
        }