public void SetWall(Pt pt0, Pt pt1, bool b) { Pt[] n = Neighbours(pt0); int i = IndexOf(n, pt1); if (i == -1) { return; } if (pt0.CompareTo(pt1) < 0) { SetWall(pt1, pt0, b); return; } SetWall(pt0, SetBit(GetWall(pt0), i, b)); }
public bool GetWall(Pt pt0, Pt pt1) { Pt[] n = Neighbours(pt0); int i = IndexOf(n, pt1); if (i == -1) { return(false); } #if WALL_SINGLE //if (i * 2 >= n.Length) if (pt0.CompareTo(pt1) < 0) { return(GetWall(pt1, pt0)); } #endif return(GetBit(GetWall(pt0), i)); }