예제 #1
0
def eat_food(cell):
	for f in range(NUM_FOOD):
		nom = food[f]
		if cells_collide(cell, nom):
			new_radius = palgame.get_radius(cell) + (1 - palgame.get_radius(cell) / 100)
			palgame.set_radius(cell, new_radius)
			food[f] = palgame.get_random_food()
예제 #2
0
def eat_cells(cell):
	for b in range(NUM_CELLS):
		other_cell = cells[b]
		if cell != other_cell and cells_collide(cell, other_cell):
			radius = palgame.get_radius(cell)
			if radius >= palgame.get_radius(other_cell):
				new_radius = radius + (1 - radius / 100)
				palgame.set_radius(cell, new_radius)
				cells[b] = palgame.get_random_ball()