コード例 #1
0
        public TapeGrid(string tape, int width, int height, CellGrid element)
            : base(tape, width, height)
        {
            var reflections = element.GetCellsReflections();

            for (var i = 0; i <= 3; i++)
            {
                elements[i * 2] =
                    new CellGrid(reflections[i * 2],
                                 i % 2 == 0 ? element.width : element.height,
                                 i % 2 == 0 ? element.height : element.width);

                elements[i * 2 + 1] =
                    new CellGrid(reflections[i * 2 + 1],
                                 i % 2 == 0 ? element.width : element.height,
                                 i % 2 == 0 ? element.height : element.width);
            }
        }