Clause getBoxCoverageRequirement(ViewType& view, size_t boxSize, CellType reqCellType) { Clause req; for (int row = view.height()-boxSize; row < view.height(); row++) { for (int col = view.width()-boxSize; col < view.width(); col++) { req |= view[row][col] == reqCellType; } } return req; }
inline bool isInside(const ViewType& v, const CoordType i, const CoordType j) { return i>=0 && j>=0 && i<v.width() && j<v.height(); }