Percolation/Bond percolation: Difference between revisions

C++: fill returns bools
(C++ version enhanced)
(C++: fill returns bools)
Line 233:
typedef unsigned int cell;
 
intbool fill(cell* p) {
if ((*p & FILL)) return 0false;
*p |= FILL;
if (p >= end) return 1true; // success: reached bottom row
 
return (!(p[0] & BWALL) && fill(p + m)) || (!(p[0] & RWALL) && fill(p + 1)) ||
Anonymous user