What is the reason for not removing an element using the elem.remove () method; ?
The Old Game Lines code contains the doTryMoveBallToNewPosition_End function, which is responsible for deleting the old ball (what moved to the target) and creating a new one at the target point - yes, it can be done for another, but that is not the question. The question is why the remove () method does not remove SOMETHING an element after the fact in this function. For this reason, there is added a control deletion of the same element again - and this always works. My thoughts are only assumption that the animation is still complete sometimes at the time of removal. I tried to use endElement for a slave animate tag - but that didn't help. So far the problem has been solved so far - but I don’t like the solution. Who can tell the reason for this behavior and how beautifully to solve it in such an implementation. https://code.sololearn.com/Wv209I1zo26q/?ref=app