Package: python_hangman
A well tested, cli, python version-agnostic, multi-platform hangman game. It’s built following a TDD workflow and a MVC design pattern. Each component services a sensibly distinct logical purpose.  Python Hangman is a version agnostic, tox tested, travis-backed program! Documented and distributed.FeaturesHangman!Documentation:https://python_hangman.readthedocs.orgOpen Source:https://github.com/bionikspoon/python_hangmanIdiomatic code.Thoroughly tested with very high coverage.Python version agnostic.Demonstrates MVC design out of the scope of web development.MIT licenseCompatibilityPython 2.6Python 2.7Python 3.3Python 3.4Python 3.5PyPyInstallationAt the command line either via easy_install or pip$mkvirtualenvhangman# optional for venv users$pipinstallpython_hangman$hangmanUninstall$pipuninstallpython_hangmanGoals2.0.0MVC pattern.  The goal was to explicitly demonstrate an MVC pattern out of the scope of web development.Idiomatic code.  In this overhaul there’s a big emphasis on idiomatic code.  The code should be describing its’ own intention with the clarity your grandmother could read.1.0.0Learning!  This was a Test Driven Development(TDD) exercise.Also, explored:Tox, test automationTravis CIPython version agnostic programmingSetuptoolsPublishing on pipCoverage via coverallsDocumentation with sphinx and ReadTheDocsCookiecutter developmentDesignThis game roughly follows theModel-View-Controller(MVC)pattern.  In the latest overhaul, these roles have been explicitly named:hangman.model,hangman.view,hangman.controller.Traditionally in MVC thecontrolleris the focal point.  It tells theviewwhat information to collect from the user and what to show.  It uses that information to communicate with themodel–also, the data persistence later–and determine the next step.  This Hangman MVC adheres to these principalsModelThe model is very simply the hangman game instance–hangman.model.Hangman.  It’s a class.  Every class should have “state” and the methods of that class should manage that state.  In this case, the “state” is the current “state of the game”.  The public API are for managing that state.The entirety of the game logic is contained inhangman.model.Hangman.  You could technically play the game in the python console by instantiating the class, submitting guesses with the methodhangman.model.Hangman.guessand printing the game state.For example:>>>fromhangman.modelimportHangman>>>game=Hangman(answer='hangman')>>>game.guess('a')hangman(status='_A___A_',misses=[],remaining_turns=10)>>>game.guess('n').guess('z').guess('e')hangman(status='_AN__AN',misses=['E','Z'],remaining_turns=8)>>>game.status'_AN__AN'>>>game.misses['E','Z']>>>game.remaining_turns8Viewhangman.viewis a collection of stateless functions that represent the presentation layer.  When called these functions handles printing the art to the console, and collecting input from the user.ControllerIn this program, thecontrolleris actually the “game_loop”–hangman.controller.game_loop.  I still think of it as acontrollerbecause the role it plays–communicating I/O from the view with the model-persistence layer.The controller tells the view later what to print and what data to collect.  It uses that information update the state of the game (model) and handle game events.Call DiagramCreditsTools used in rendering this package:Cookiecutterbionikspoon/cookiecutter-pypackageforked fromaudreyr/cookiecutter-pypackageHistoryNext ReleaseStay Posted2.2.0 (2015-18-05)Fixed max recursion issue with game loop.Updated requirements.Removed gratuitous docs – less is more.2.2.1 Handle ctrl+d EOF to exit.2.2.2 Fix broken coverage report.2.2.3 Fix broken wheel2.1.0 (2015-18-05)Updated docs, divided and automated in a more reasonable way.renamed the github repo to mirror pypi name.2.1.1 Fix pypi’s rst render2.0.0 (2015-12-05)Establishing a changelog.Massive refactoring, explicit MVC structure.Code is even more idiomatic!Created aFlashMessageutility.Removed poorly implemented classes in favor of stateless functions.Add, Remove support for py35, py32.100% code coverage. (2 untestable, inconsequential lines ignored)