0

Why?

How to make the blue block move in the direction of the red one. That is, to follow the red one. I can't solve this problem. https://code.sololearn.com/WltfgxBli2yy/?ref=app

23rd Mar 2021, 5:25 PM
Удцдцддвщп Йдцлшаоплы
Удцдцддвщп Йдцлшаоплы - avatar
4 Respostas
23rd Mar 2021, 6:05 PM
Oma Falk
Oma Falk - avatar
+ 4
if(blue.distance > red.distance) { blue.distance -= blue.speed } if(blue.distance < red.distance) { blue.distance += blue.speed }
24th Mar 2021, 7:11 AM
Oma Falk
Oma Falk - avatar
+ 1
Who will be able to solve this riddle of the 21st century?
23rd Mar 2021, 5:28 PM
Удцдцддвщп Йдцлшаоплы
Удцдцддвщп Йдцлшаоплы - avatar
+ 1
@frogged Yes, but how?
23rd Mar 2021, 6:59 PM
Удцдцддвщп Йдцлшаоплы
Удцдцддвщп Йдцлшаоплы - avatar