Skip to content

Lerbert/mastermind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mastermind

A command line version of the mastermind game. You can try to break the code yourself or watch Donald Knuth's algorithm do the work.

usage: game.py [-h] [-p | -k] [-s | -r] [-c] [PEGS]

MASTERMIND Break the code using the hints you get. N black pegs --> correct
color and position for N pegs of your guess, N white pegs --> correct color
but wrong position for N pegs of your guess

positional arguments:
  PEGS          number of pegs used in the game

optional arguments:
  -h, --help    show this help message and exit
  -p, --player  break the code yourself
  -k, --knuth   use Knuth's algorithm to break the code
  -s, --select  choose the code yourself
  -r, --random  start with a random code
  -c, --cheat   display the code at game start

About

A command line version of the mastermind game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages