Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Console-based Hangman game in Python
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
client.py
dictionary.txt
hangman.py
messenger.py
server.py

README.md

Console-based Hangman game in Python, with a smidge of networking.

Written during Hacker School, Batch[4], Fall 2012.

Hangman

Rules

  • Words randomly chosen from dictionary.txt
  • Guess 1 letter at a time
  • 6 incorrect guesses ends the game

Usage

Run this command:

python hangman.py

A sample game. Can you guess the answer?

        -----
        |   |
        O   |
       /|\  |
            |
            |
        ---------

Incorrect guesses: a, o, s, i
Progress: _unner
Guess a letter:

In case you were wondering, it was dunner.

Smidge of Networking

This is hardly a networking game. You can run server.py and have multiple clients playing via client.py. Unfortunately, it is still single player. Haven't come up with a fun way to make it multi-player yet... suggestions welcome!

Acknowledgements

Thanks to Nick from HS for helping me get started, working out the server/client state machine logic, and refactoring :)

Something went wrong with that request. Please try again.