public bool isTriboxMyNeighbour(TriBox tri) { if (tri == null) { return(false); } if (tri.GetBoxes().ToList().Any(x => x == null)) { return(false); } foreach (Box b in tri.GetBoxes()) { if (isMyNeighbour(b, true) == false) { return(false); } } return(true); }
public bool isCenterBox() { if (tribox == null) { return(false); } return(this != tribox.GetBoxes().First() && this != tribox.GetBoxes().Last()); }