/hangman

Primary LanguagePython

Hangman

Install

python setup.py install

Run

3dhangman

Development

pip install -e ".[dev]"

Run tests

pytest

Play via Python API

>>> from hangman import GameSession
>>> session = GameSession.with_default_words()
>>> game = session.new()
>>> game.play('b')
False
>>> game.play('o')
True
>>> game
Game<['o', None, None, None, None], finished=False, attempts_left=4>