Consider this 3d vector:
const SIZE = 'some_size';
std::vector<std ::vector<std::v ector<char> > >GRID(SIZE,
std::vector<std ::vector<char> >(SIZE,
std::vector<cha r>(SIZE)));
It can be viewed as coords for SIZE^3 different points in a 3d space:
Now, instead of point consider Cubes.
They each have 6 sides:
front - z+
back - z-
top - y+
bottom - y-
rigth - x+
left - x-
(+/- being direction on the axis)
Each of the 6 sides can be turned on/off so you get like a 3d
labyrinth.
And now for the tricky part:
1.
No point/cube can be completely closed, i.e. the sum of the 6 bit
defining it must be < 6 or if you and the bits the result must be 0,
ect.
allso consider only using 3 bits to define each point/cube in the grid.
2.
There must be away from any given point/cube to another.
To help this the cube is infinite/finite, what i mean is best shown
with an example:
The Grid is the size of 16^3
Sudenly you find your self at point 17,17,17 (x,y,z) how ever it is no
problem bacause the point is allso defined as 1,1,1 (x,y,z)
Now only one question remains...
How to do it the easy way?
Hope to get some mindblowing ideas... ;-)