Skip to main content

A simple Hangman Multiplayer Game by CLI in python!

Project description

CI black Open Source Love MIT Licence


Hangman Multiplayer Game


Getting started »
· Report Bug · Request Feature

A simple hangman game built with Python 🐍

HMG is my first project I do in Python using sockets, so if you find some error I would appreciate if you let me know through issues tracker.

Demo

hmg-demo

Installation

$ pip install hmg

This installs two execuables. The hmg-server and the hmg-client. You can check the cli help for more options:

$ hmg-server --help
usage: hmg-server [-h] [-H HOST] [-p PORT] [-w WORD]

options:
  -h, --help            show this help message and exit
  -H HOST, --host HOST
  -p PORT, --port PORT
  -w WORD, --word WORD  Word to use instead of internet (usefull for testing)

$ hmg-client --help
usage: hmg-client [-h] [-H HOST] [-p PORT] [-c BOARD_CHAR]

options:
  -h, --help            show this help message and exit
  -H HOST, --host HOST
  -p PORT, --port PORT
  -c BOARD_CHAR, --board-char BOARD_CHAR
                        Char used for fill board

Running

First run server. Also you can run server on another host, for example in my Raspberry Pi:

$ hmg-server --host 0.0.0.0

Now start the players in different terminals or computers:

For server executed without --host argument, just:

$ hmg-client

For server executed with --host argument:

$ hmg-client --host 192.168.1.15

The 192.168.1.15 is the RPi IP.

Enjoy 🎮 🎉 !

Developers

Run pip install -e ".[dev]" to install all dependencies used by the development environment.

Check the make command for useful tasks such as tests and lint.

$ make
flake8           Execute flake8
tests            Execute unit tests
format           Execute black formater
format-check     Execute black formater without modify files

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgments

  • rich: an awesome Python library for text and formatting in the terminal ❤️.
  • API Palabras Aleatorias: for the words used in game 🙂.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

hmg-0.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

hmg-0.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file hmg-0.1.tar.gz.

File metadata

  • Download URL: hmg-0.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.2

File hashes

Hashes for hmg-0.1.tar.gz
Algorithm Hash digest
SHA256 5112aeabb576745a8fda467edd6d19457c0a27bc32d4670548368eb08e62405c
MD5 78f046606c3312ae0a52bf4403544ac5
BLAKE2b-256 06a1aab5319b3791b5fe907b388373633d3c7997a24f51b070f6cc897aa20873

See more details on using hashes here.

File details

Details for the file hmg-0.1-py3-none-any.whl.

File metadata

  • Download URL: hmg-0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.2

File hashes

Hashes for hmg-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d669b311d782c580eb691b350c3051a8da1dfb70739d5c7d0f053f1ec856678
MD5 5ac472525d6d3b9e5202876fb22d12df
BLAKE2b-256 ef12a84d8dc4cfc5d759fed94d1b2554d8a371911ac6b92e4dd5328e411f293e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page