Exemplo n.º 1
0
void fill_set(struct point_set * set, FILE * fin) {
    struct point point = {};
    while (fscanf(fin, "%Lf %Lf", &point.x, &point.y) == 2) {
        if (point_set_contains(set, &point) == false) {
            set->vec[set->size++] = point;
        }
    }
}
Exemplo n.º 2
0
/*
 * Aux function -- see below
 */
static void cave_room_aux(struct point_set *seen, int y, int x)
{
	if (point_set_contains(seen, y, x))
		return;

	if (!square_isroom(cave, y, x))
		return;

	/* Add it to the "seen" set */
	add_to_point_set(seen, y, x);
}