Exemplo n.º 1
0
 private bool InBounds(Cell cell)
 {
     int x, y;
     cell.GetPosition(out x, out y);
     return _x1 < x && x < _x2 && _y1 < y && y < _y2;
 }
Exemplo n.º 2
0
            public DFSGenerator(int id, Maze maze, int[] mapping, Random rnd, Cell cell, int x1, int y1, int x2, int y2)
            {
                _id = id;
                _rnd = rnd;
                _maze = maze;
                _mapping = mapping;
                _stack = new Stack<long>();
                _stack.Push(cell.Key);
                cell.GetPosition(out _cx, out _cy);
                _mapping[(int)cell.Key] = _id;

                _x1 = x1;
                _y1 = y1;
                _x2 = x2;
                _y2 = y2;
            }