Exemple #1
0
 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>();
 }
Exemple #2
0
 /// <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;
 }
Exemple #3
0
 public static void RemoveFlag(ref CellOptions e, CellOptions v)
 {
     e &= ~v;
 }
Exemple #4
0
 public static bool HasFlag(CellOptions e, CellOptions v)
 {
     return((e & v) == v);
 }
Exemple #5
0
 public static void AddFlag(ref CellOptions e, CellOptions v)
 {
     e |= v;
 }