private int internal_encumbrance;
private int possible_to_close;
private int is_closed;
private int max_internal_encumbrance;

/*
 * Implement an object that can contain things.
 * The 'remove()' function is implemented by the '/basic/move.c' object
 * and will take care of any objects inside this object.
 */
void set_max_internal_encumbrance(int max) {
    max_internal_encumbrance = max;
}

int query_internal_encumbrance() {
    return internal_encumbrance;
}

/*
 * This function is called from move()
 */
int receive_objects() {
    if (is_closed)
	return 0;
    return 1;
}

int add_encumbrance(int enc) {
    if (max_internal_encumbrance == 0)
	return 1;
    if (enc + internal_encumbrance > max_internal_encumbrance)
	return 0;
    internal_encumbrance += enc;
    return 1;
}
