Animation lends itself to test-driven development just as much as any other feature. However, it also lends itself to manual testing, since it helps to observe if our code is doing the right thing according to our eyes. This is particularly true because animation is not something that most programmers do every day. When something is new, it's often better to do lots of manual tests to verify behavior in addition to your tests.
In fact, while preparing for this chapter I did a lot of manual testing. The walk-through that you're about to be presented with was not a start-to-finish affair for me. I had to play with a number of different approaches, taking many wrong turns. There were many times that I opened my browser to the forward 100 or right 90 type to verify what was actually happening.
Once my code was working, I then had to refactor it and clean...