예제 #1
0
 public mazeElement(int _width, int _height, Color _color, eBounds _direction)
 {
     width = _width;
     height = _height;
     box = new frame(width, height);
     setColor(_color);
     setDirection(_direction);
 }
예제 #2
0
        private void initMazeElements(int row, int column, int width, int height, Color color, eBounds bounds)
        {
            elements = new mazeElement[row, column];
            coords = new Point[row, column];

            for (int i = 0; i < row; i++)
            {
                for (int j = 0; j < column; j++)
                {
                    elements[i, j] = new mazeElement(width, height, color, bounds);
                    coords[i, j] = new Point(j * width, i * height);
                }
            }
        }
예제 #3
0
            private eBounds invVertical(eBounds _bounds)
            {
                eBounds result = _bounds;
                if ( ((_bounds & eBounds.Up) == eBounds.Up) && ((_bounds & eBounds.Down) == eBounds.Down) ) return _bounds;
                if (((_bounds & eBounds.Up) != eBounds.Up) && ((_bounds & eBounds.Down) != eBounds.Down)) return _bounds;

                result = result ^ eBounds.Up ^ eBounds.Down;
                return result;
            }
예제 #4
0
            private eBounds invHorizontal(eBounds _bounds)
            {
                eBounds result = _bounds;
                if (((_bounds & eBounds.Right) == eBounds.Right) && ((_bounds & eBounds.Left) == eBounds.Left)) return _bounds;
                if (((_bounds & eBounds.Right) != eBounds.Right) && ((_bounds & eBounds.Left) != eBounds.Left)) return _bounds;

                result = result ^ eBounds.Right ^ eBounds.Left;
                return result;
            }
예제 #5
0
 public void setBounds(eBounds _bounds)
 {
     bounds = _bounds;
 }
예제 #6
0
 public cellBounds(eBounds BR)
 {
     bounds = BR;
 }
예제 #7
0
 public Cell(eBounds _bounds)
     : this(0, 0, _bounds)
 {
 }
예제 #8
0
 public Cell(int _width, int _height, eBounds _bounds)
 {
     Width = _width;
     Height = _height;
     setBounds(_bounds);
 }
예제 #9
0
 private void setBounds(eBounds _Bounds)
 {
     Bounds = _Bounds;
     if (changeBounds != null) changeBounds(Bounds);
 }
예제 #10
0
 public mazeGraphicArray(int row_number, int column_number, int cell_width, int cell_height, Color bound_color, eBounds bounds)
 {
     initMazeElements(row_number, column_number, cell_width, cell_height, bound_color, bounds);
     map = new frame(Width, Height);
 }