Commit message (Collapse)AuthorAgeFilesLines
* Allow strategies to acces the standard library and add examplesHEADmasterRichard Maw2013-04-185-0/+44
| | | | | | | iterative was higher-lower.lua, interactive asks for a guess, binary_search always guesses in the middle of the range, and refines the search area cheating always gets it right in 0 guesses
* Remove global variablesRichard Maw2013-04-181-7/+9
| | | | | Instead of using global variables, the check_match function can use closed over values.
* Load a lua script as the strategyRichard Maw2013-04-182-22/+51
| | | | | | | | This adds `-f strategy.lua` as a parameter to higher-lower, which loads the given script, passes a function to check the guess, the lower bound and the upper bound. It is expected to return the final result.
* Add a higher-lower guessing gameRichard Maw2013-04-153-0/+97