/**
 * This function checks if a given shape is completely within the given bounds.
 */
fun isShapeWithinBounds(shape: List<Pair<Int, Int>>, bounds: Pair<Pair<Int, Int>, Pair<Int, Int>>): Boolean {

    // Check if any of the points of the shape fall outside the bounds
    for (point in shape) {
        if (point.first < bounds.first.first || point.first > bounds.second.first) {
            return false
        }
        if (point.second < bounds.first.second || point.second > bounds.second.second) {
            return false
        }
    }
    return true
}
/**
 * This function checks if a given shape is completely within the given bounds.
 */
fun isShapeWithinBounds(shape: List<Pair<Int, Int>>, bounds: Pair<Pair<Int, Int>, Pair<Int, Int>>): Boolean {
/**
 * This function checks if a given shape is completely within the given bounds.
 */
fun isShapeWithinBounds(shape: List<Pair<Int, Int>>, bounds: Pair<Pair<Int, Int>, Pair<Int, Int>>): Boolean {

    // Check if any of the points of the shape fall outside the bounds
    for (point in shape) {
        if (point.first < bounds.first.first || point.first > bounds.second.first) {
            return false
        }
        if (point.second < bounds.first.second || point.second > bounds.second.second) {
            return false
        }
    }
    return true
}