Skip to content

Commit 38a7901

Browse files
committed
add : Usage section added.
1 parent 7fe01a4 commit 38a7901

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
11
# mafia
22
:dollar: Web Server Application For Mafia Game Playing On Local Network
33

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
539
| Role | image(s) |
640
| :-------------: |:----------------------------------------------------------------------------------------------------------------------------: |
741
| Don | <img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Don_1.png"> |
@@ -12,5 +46,5 @@
1246
| Anti-attack | <img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Anti-attack_1.png"> |
1347
| 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"> |
1448

15-
### References
49+
## References
1650
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

Comments
 (0)