Skip to main content

Play mastermind with python !

Project description


This package allows you to play Mastermind directly into a jupyter notebook/lab IDE. It has been made using the great ipywidgets python library.


pip install mastermind

How to use in a jupyter notebook

Copy and paste the following lines into a cell of a notebook and run it:

from mastermind import MastermindNotebook
game = MastermindNotebook()

The game should display, you can start playing by choosing one color for each position and click on "Confirm combination" button !

GitHub Logo

How to use in jupyter lab

To use in jupyter lab, don't forget to install the jupyter widget extension:

jupyter labextension install @jupyter-widgets/jupyterlab-manager

Once this is done, you can proceed in the same way as for the jupyter notebook use.

State of development

  • A Tkinter interface must be developed to play outside a notebook, feel free to contribute !

  • Add a DB to record all the games for one user

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mastermind-0.7.tar.gz (4.4 kB view hashes)

Uploaded source

Built Distribution

mastermind-0.7-py2.py3-none-any.whl (140.5 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page