Violet, you're not lost at all, because everything you observe is correct.
checkBounds() effects direction reversals by negating the deltas but the current iteration's deltas have already been applied, immediately before checkBounds() was called in moveSprite() (though the DOM has not yet been updated). The deltas are not re-applied after checkBounds() returns, at least not in the current iteration. The first application of any direction reversal (negated delta) occurs at the next iteration.
In other words, at each iteration, moveSprite() does two things:applies the current deltas and displays the sprite in its new position
calls checkBounds() to adjust, when necessary, the deltas for the next iteration.
The position of the statement checkBounds(); within moveSprite() is slightly confusing. Try moving the statement to the very bottom of moveSprite() and it should be much clearer that it has no effect until the next iteration.Airshow