This is the classic bowling game code kata, it's an illustration of test driven development.
I was first made aware of it in one of Uncle Bob's (Robert C Martin) videos on CleanCoders.com. I've produced this as an example of doing it using Delphi. This video was produced for the Intensive Delphi online conference, you can find the channel for it here.
There are a lot of things skipped in this this kata (edge cases, bad input etc.), but it does provide a simple and clear introduction on how to do TDD. Watch it on YouTube.