Why it is not move my blue dot | Sololearn: Learn to code for FREE!

0

Why it is not move my blue dot

https://code.sololearn.com/Wy3IGbhE0EOc/?ref=app

1/23/2022 12:44:25 AM

Aiwbn H

2 Answers

New Answer

+1

You need to draw your rect again with updated value and remove old one I dont know very well canvas, so old rect have some border :D Best is to make some draw function, to dont repeat same code. Set parameters to take color, and you can have both draw and delete old in one code. https://code.sololearn.com/Wx8Illqc150O/?ref=app

+1

Ty man