public mazeElement(int _width, int _height, Color _color, eBounds _direction) { width = _width; height = _height; box = new frame(width, height); setColor(_color); setDirection(_direction); }
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); } } }
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; }
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; }
public void setBounds(eBounds _bounds) { bounds = _bounds; }
public cellBounds(eBounds BR) { bounds = BR; }
public Cell(eBounds _bounds) : this(0, 0, _bounds) { }
public Cell(int _width, int _height, eBounds _bounds) { Width = _width; Height = _height; setBounds(_bounds); }
private void setBounds(eBounds _Bounds) { Bounds = _Bounds; if (changeBounds != null) changeBounds(Bounds); }
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); }