From: Phlip Date: 2001-12-16T11:34:52+09:00 Subject: [ruby-talk:28657] Re: test-first Nat Pryce sez: > From: "Daniel" >> In the first case, your talking about collision detection. No automated >> test can be devised for that, a person has to look at the screen and >> decide if the ball should have changed directions, or continued on its >> course. > > I haved written automatic tests for pixel perfect collision detection of > sprites in a shoot-em-up video game. It was completely straightfoward: > identify the boundary conditions and then test situations far from the > boundary conditions, and on either side adjacent to the boundary > condition. In my exalted opinion, this project is an amazingly successful vindication of the concepts of test-first coding with merciless refactoring on a heavily geometric app: http://flea.sourceforge.net The sad truth is that for every complex math algorithm, you should write two implementations of it and compete them against each other. Then you are free to refactor the source of the production one. -- Phlip phlip_cpp@yahoo.com http://www.greencheese.org/LucidScheming -- My opinions are those of your employer --