inBounds static method
检查坐标是否在矩形范围内
Implementation
static bool inBounds(
HexCoordinate hex,
int minCol,
int maxCol,
int minRow,
int maxRow,
bool isPointy,
) {
final (col, row) = isPointy ? hex.toOffsetPointy() : hex.toOffsetFlat();
return col >= minCol && col <= maxCol && row >= minRow && row <= maxRow;
}