Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Fixed? solution in Clear category for Frogs Collision by StefanPochmann
from operator import sub
def frogs_collision(frog1, frog2):
x, y, dx, dy = map(sub, frog1, frog2)
t = (dx and x // dx) or (dy and y // dy) or -1
if t * dx == x and t * dy == y and t < 0:
return -t
April 20, 2024
Comments: