|
1 | 1 | # mafia
|
2 | 2 | :dollar: Web Server Application For Mafia Game Playing On Local Network
|
3 | 3 |
|
4 |
| -## Roles |
| 4 | +## Usage |
| 5 | +After cloning into mafia using command bellow: |
| 6 | +``` |
| 7 | +$git clone https://github.com/sadrasabouri/mafia |
| 8 | +``` |
| 9 | +You should do these tiny steps: |
| 10 | +1. Instaling requiremets: |
| 11 | +First check if you have `pip3` installed in your system: |
| 12 | +``` |
| 13 | +$pip3 --version |
| 14 | +pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) |
| 15 | +``` |
| 16 | +if you already have installed `pip3` youu should see something like above, otherwise run the command bellow to install it: |
| 17 | +``` |
| 18 | +$sudo apt install python3-pip |
| 19 | +``` |
| 20 | +Otherwise/Then install <b>mafia</b> requirements by |
| 21 | +``` |
| 22 | +$pip3 install -r requirements.txt |
| 23 | +``` |
| 24 | +Now everything is ready, lets play: |
| 25 | +run the command `$python3 mafia.py number_of_players[int]`, for example imagine you want to play mafia with 5 players. |
| 26 | +``` |
| 27 | +$python3 mafia.py 5 |
| 28 | +``` |
| 29 | +There you go, now each player can open a browser and type `serverhost:port_name`. |
| 30 | + |
| 31 | +In defualt mode your desired address should be `server_ip:5000`. |
| 32 | + |
| 33 | +Each player should see a page like this in his/her browser: |
| 34 | +<img src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/doc/Pictures/mobile_browser.png"> |
| 35 | +And the GOD can track player's role by checking CLI: |
| 36 | +<img src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/doc/Pictures/CLI.png"> |
| 37 | + |
| 38 | +### Roles |
5 | 39 | | Role | image(s) |
|
6 | 40 | | :-------------: |:----------------------------------------------------------------------------------------------------------------------------: |
|
7 | 41 | | Don | <img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Don_1.png"> |
|
|
12 | 46 | | Anti-attack | <img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Anti-attack_1.png"> |
|
13 | 47 | | Resident | <img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Resident_1.png"><img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Resident_2.png"><img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Resident_3.png"><img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Resident_4.png"> |
|
14 | 48 |
|
15 |
| -### References |
| 49 | +## References |
16 | 50 | Icons made by <a href="https://www.flaticon.com/authors/vectors-market" title="Vectors Market">Vectors Market</a> from <a href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
|
0 commit comments