public LabGen(int H, int W) { w = W; h = H; map = new CellOptions[h][]; for (int i = 0; i < h; i++) { map[i] = new CellOptions[w]; for (int j = 0; j < w; j++) { map[i][j] = CellOptions.NONE; } } rnd = new Random(); CellList = new List <CellData>(); }
/// <summary> /// Determines if the cell has the specified option. /// </summary> /// <param name="option">The option to check</param> /// <returns><c>true</c> if the cell has the specified option; otherwise, <c>false</c></returns> public bool HasOption(CellOptions option) { return (Option & (uint)option) != 0; }
public static void RemoveFlag(ref CellOptions e, CellOptions v) { e &= ~v; }
public static bool HasFlag(CellOptions e, CellOptions v) { return((e & v) == v); }
public static void AddFlag(ref CellOptions e, CellOptions v) { e |= v; }