Beispiel #1
0
def place_water(pos, water_blocks, water_rects, other_blocks1, other_blocks2, image):
	water = Water(image)
	water.rect.center = pos
	while not water.rect.right % 15 == 0:
		water.rect = water.rect.move(-1, 0)
	while not water.rect.bottom % 15 == 0:
		water.rect = water.rect.move(0, -1)
	if water.rect.collidelist(water_rects) < 0 and  water.rect.collidelist(other_blocks1) < 0 and  water.rect.collidelist(other_blocks2) < 0:
		water_blocks.append(water)
	return water_blocks