My implementation of Mastermind - a code-breaking game for two players. Please see Wikipedia article for extendet info.
Save Mastermind folder in your chosen location
And then inside of it execute:
$ bundle
To play the game run:
ruby Mastermind\run_game\play.rb
Setup mode will begin and you will be able to set:
1. number of players
2. Name of each player
3. Role of each player
After that, play mode will begin and you will be able to setup the code and hack the code.
If you choose to play against AI, you can be either hacker or mastermind. Try to be faster than the AI code breaker!! It's almost perfect :)
- Input should be secured to prevent crushing
- AI is based on Donald Knuth Five-guess algorithm, but it's not perfect yet. But it is pretty darn good already :)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
* See license.txt for usage details.