Wayne Lambert
A simulation of the numbers game on the TV show, Countdown
The Countdown Numbers project uses the logic from the numbers game on Countdown to enable a player to play against the computer (which I call Rachel) attempting to get the closest value to the target number as possible.
This actually came about as a natural continuation of developing the countdown letters game. I simply wondered whether I could develop the numbers game as well.
The numbers game is harder to develop than the letters game as it requires more thought in terms of validating the answer and finding a solution to the calculation used to arrive at the game's target number.
It involves using some of Python's non-standard data structures to efficiently perform the calculations.
A further development led me to create a database model to store the results of each of the games for reference and later retrieval. This is an example of using a database table to store a program's logic rather than to capture user-defined input from forms.
I am largely happy with the project, however, I would like to use hypothesis to test against some possible edge cases for a player's calculation input. Since there's a large combination of operators, brackets, and numbers that can be applied to a game's calculation, there's likely to be some sequence of characters that I haven't thought about testing.
Information and rules of the game was sourced from http://datagenetics.com/blog/august32014/index.html