A simple Hangman Multiplayer Game by CLI in python!
Project description
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
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5112aeabb576745a8fda467edd6d19457c0a27bc32d4670548368eb08e62405c |
|
MD5 | 78f046606c3312ae0a52bf4403544ac5 |
|
BLAKE2b-256 | 06a1aab5319b3791b5fe907b388373633d3c7997a24f51b070f6cc897aa20873 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d669b311d782c580eb691b350c3051a8da1dfb70739d5c7d0f053f1ec856678 |
|
MD5 | 5ac472525d6d3b9e5202876fb22d12df |
|
BLAKE2b-256 | ef12a84d8dc4cfc5d759fed94d1b2554d8a371911ac6b92e4dd5328e411f293e |