Play is the highest form of research
This project aims to be a learning tool, but this is a real application - not a toy example. The important difference to a "real" program is that the nasty details that usually screw with the nice and simple design and make the code grow tentacles and other cruft are kept at a minimum to enable you to explore the code as a nice little completely non-linear story. It came to life in a non-linear fashion and should also be read that way.
Emphasis is put on pythonic ways to code and on using the power of the Open Source ecosystem.
- Complete rules of Mau Mau
- Two different strategies:
- Simple random strategy for a computer player
- Strategy that adds interactivity so a human can play against the computer
Implementation and tools¶
- Installable as command line tool
- Functions to run multiple games and collect stats
- Use of magic methods to create custom classes which behave like inbuilt data types
- Logging with stdlib logging module
- Flexible command line interface (add new functions without adjusting code)
- Automatic tests with pytest, tox and Travis CI
- Static code analysis: flake8, QuantifiedCode, pytest, Travis CI and Appveyor
- Version handling from source control with setuptools scm
- Automatic generation and deployment of documentation with MkDocs
- Developer task automation with tox (run tests, build and deploy documentation)
- Included Linux and Windows development environments via vagrant.