├── .github
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── .gitignore
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── doc
└── Pictures
│ ├── CLI.png
│ ├── mafia_game.png
│ └── mobile_browser.png
├── mafia.py
├── mafia_params.py
├── requirements.txt
├── static
├── css
│ └── style.css
├── images
│ ├── Warns
│ │ ├── cross.png
│ │ └── play.png
│ └── roles
│ │ ├── Boxer_1.png
│ │ ├── Boxer_2.png
│ │ ├── Bride_1.png
│ │ ├── Bride_2.png
│ │ ├── Bride_3.png
│ │ ├── Bride_4.png
│ │ ├── Bride_5.png
│ │ ├── Bulletproof_1.png
│ │ ├── Bulletproof_2.png
│ │ ├── Bulletproof_3.png
│ │ ├── Bulletproof_4.png
│ │ ├── Bulletproof_5.png
│ │ ├── Bulletproof_6.png
│ │ ├── Bulletproof_7.png
│ │ ├── Bulletproof_8.png
│ │ ├── Bulletproof_9.png
│ │ ├── Bus Driver_1.png
│ │ ├── Bus Driver_2.png
│ │ ├── Bus Driver_3.png
│ │ ├── Chef_1.png
│ │ ├── Chef_2.png
│ │ ├── Chef_3.png
│ │ ├── Clown_1.png
│ │ ├── Clown_2.png
│ │ ├── Curious Kid_1.png
│ │ ├── Curious Kid_2.png
│ │ ├── Detective_1.png
│ │ ├── Detective_2.png
│ │ ├── Detective_3.png
│ │ ├── Doctor_1.png
│ │ ├── Doctor_10.png
│ │ ├── Doctor_2.png
│ │ ├── Doctor_3.png
│ │ ├── Doctor_4.png
│ │ ├── Doctor_5.png
│ │ ├── Doctor_6.png
│ │ ├── Doctor_7.png
│ │ ├── Doctor_8.png
│ │ ├── Doctor_9.png
│ │ ├── Don_1.png
│ │ ├── Don_2.png
│ │ ├── Don_3.png
│ │ ├── Don_4.png
│ │ ├── Genie_1.png
│ │ ├── Genie_2.png
│ │ ├── Grandma_1.png
│ │ ├── Grandma_2.png
│ │ ├── Groom_1.png
│ │ ├── Groom_2.png
│ │ ├── Groom_3.png
│ │ ├── Groom_4.png
│ │ ├── Hit Man_1.png
│ │ ├── Hit Man_2.png
│ │ ├── Insane_1.png
│ │ ├── Insane_2.png
│ │ ├── Insane_3.png
│ │ ├── Jailer_1.png
│ │ ├── Jailer_2.png
│ │ ├── Judge_1.png
│ │ ├── Judge_2.png
│ │ ├── Judge_3.png
│ │ ├── Judge_4.png
│ │ ├── Judge_5.png
│ │ ├── Judge_6.png
│ │ ├── Kind Wife_1.png
│ │ ├── Kind Wife_2.png
│ │ ├── Kind Wife_3.png
│ │ ├── Kind Wife_4.png
│ │ ├── Lawyer_1.png
│ │ ├── Lawyer_2.png
│ │ ├── Lawyer_3.png
│ │ ├── Made Man_1.png
│ │ ├── Made Man_2.png
│ │ ├── Mafia_1.png
│ │ ├── Mafia_10.png
│ │ ├── Mafia_11.png
│ │ ├── Mafia_12.png
│ │ ├── Mafia_2.png
│ │ ├── Mafia_3.png
│ │ ├── Mafia_4.png
│ │ ├── Mafia_5.png
│ │ ├── Mafia_6.png
│ │ ├── Mafia_7.png
│ │ ├── Mafia_8.png
│ │ ├── Mafia_9.png
│ │ ├── Magician_1.png
│ │ ├── Magician_2.png
│ │ ├── Magician_3.png
│ │ ├── Magician_4.png
│ │ ├── Miller_1.png
│ │ ├── Miller_2.png
│ │ ├── Miller_3.png
│ │ ├── Miller_4.png
│ │ ├── Postman_1.png
│ │ ├── Postman_2.png
│ │ ├── Postman_3.png
│ │ ├── Priest_1.png
│ │ ├── Priest_2.png
│ │ ├── Priest_3.png
│ │ ├── Rebel_1.png
│ │ ├── Rebel_2.png
│ │ ├── Rebel_3.png
│ │ ├── Reporter_1.png
│ │ ├── Reporter_2.png
│ │ ├── Reporter_3.png
│ │ ├── Reporter_4.png
│ │ ├── Reporter_5.png
│ │ ├── Reporter_6.png
│ │ ├── Resident_1.png
│ │ ├── Resident_10.png
│ │ ├── Resident_11.png
│ │ ├── Resident_12.png
│ │ ├── Resident_13.png
│ │ ├── Resident_14.png
│ │ ├── Resident_15.png
│ │ ├── Resident_16.png
│ │ ├── Resident_17.png
│ │ ├── Resident_18.png
│ │ ├── Resident_19.png
│ │ ├── Resident_2.png
│ │ ├── Resident_20.png
│ │ ├── Resident_21.png
│ │ ├── Resident_3.png
│ │ ├── Resident_4.png
│ │ ├── Resident_5.png
│ │ ├── Resident_6.png
│ │ ├── Resident_7.png
│ │ ├── Resident_8.png
│ │ ├── Resident_9.png
│ │ ├── Serial Killer_1.png
│ │ ├── Serial Killer_2.png
│ │ ├── Serial Killer_3.png
│ │ ├── Serial Killer_4.png
│ │ ├── Serial Killer_5.png
│ │ ├── Serial Killer_6.png
│ │ ├── Student_1.png
│ │ ├── Student_2.png
│ │ ├── Undercover Cop_1.png
│ │ └── Undercover Cop_2.png
├── js
│ └── main.js
└── voices
│ ├── ban.mp3
│ ├── beep.mp3
│ └── kill.mp3
└── templates
├── 404.html
├── GOD.html
├── Player.html
├── base.html
├── base_action.html
└── index.html
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | pip-wheel-metadata/
24 | share/python-wheels/
25 | *.egg-info/
26 | .installed.cfg
27 | *.egg
28 | MANIFEST
29 |
30 | # PyInstaller
31 | # Usually these files are written by a python script from a template
32 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
33 | *.manifest
34 | *.spec
35 |
36 | # Installer logs
37 | pip-log.txt
38 | pip-delete-this-directory.txt
39 |
40 | # Unit test / coverage reports
41 | htmlcov/
42 | .tox/
43 | .nox/
44 | .coverage
45 | .coverage.*
46 | .cache
47 | nosetests.xml
48 | coverage.xml
49 | *.cover
50 | *.py,cover
51 | .hypothesis/
52 | .pytest_cache/
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 |
74 | # PyBuilder
75 | target/
76 |
77 | # Jupyter Notebook
78 | .ipynb_checkpoints
79 |
80 | # IPython
81 | profile_default/
82 | ipython_config.py
83 |
84 | # pyenv
85 | .python-version
86 |
87 | # pipenv
88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
91 | # install all needed dependencies.
92 | #Pipfile.lock
93 |
94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95 | __pypackages__/
96 |
97 | # Celery stuff
98 | celerybeat-schedule
99 | celerybeat.pid
100 |
101 | # SageMath parsed files
102 | *.sage.py
103 |
104 | # Environments
105 | .env
106 | .venv
107 | env/
108 | venv/
109 | ENV/
110 | env.bak/
111 | venv.bak/
112 |
113 | # Spyder project settings
114 | .spyderproject
115 | .spyproject
116 |
117 | # Rope project settings
118 | .ropeproject
119 |
120 | # mkdocs documentation
121 | /site
122 |
123 | # mypy
124 | .mypy_cache/
125 | .dmypy.json
126 | dmypy.json
127 |
128 | # Pyre type checker
129 | .pyre/
130 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at sabouri.sadra@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Sadra Sabouri
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # mafia
2 | :dollar: Web Server Application For Mafia Game Playing On Local Network
3 |
4 | Playing mafia game made easy simply by having:
5 | + a system to run mafia on it (We call it FekroBot)
6 | + a hotspot that can provide a local host for us (your WIFI modem or your mobile hotspot)
7 |
8 | There you go, lets play some mafia :sunglasses:.
9 |
10 |
11 |
12 | ## Usage
13 | After cloning into mafia using command bellow:
14 | ```
15 | $ git clone https://github.com/sadrasabouri/mafia
16 | ```
17 | You should do these tiny steps:
18 |
19 | 0. [Install pip3]
20 |
21 | First check if you have `pip3` installed in your system:
22 | ```
23 | $ pip3 --version
24 | pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
25 | ```
26 | if you already have installed `pip3` you should see something like above, otherwise run the command bellow to install it:
27 | ```
28 | $ sudo apt install python3-pip
29 | ```
30 | 1. Instaling requiremets:
31 |
32 | Then install mafia requirements by
33 | ```
34 | $ pip3 install -r requirements.txt
35 | ```
36 | 2. Run the server application
37 |
38 | Now everything is ready, lets play:
39 | run the command `$python3 mafia.py number_of_players[int]`, for example imagine you want to play mafia with 5 players.
40 | ```
41 | $ python3 mafia.py 5
42 | ```
43 | 3. Getting roles
44 |
45 | There you go, now each player can open a browser and type `serverhost:port_name`.
46 |
47 | In defualt mode your address should be `server_ip:5000`.
48 | | What player should see in the browser |
49 | |:-------------------------------------:|
50 | |
|
51 |
52 | 4. Tracing roles from commandline
53 |
54 | After each role assignment a message will be prompt to GOD's commandline which inform players ip, id and his/her role,
55 | players should inform the GOD with thier unique id so that GOD can find who is who.
56 |
57 | | What GOD should see in the CLI |
58 | |:------------------------------:|
59 | |
|
60 |
61 | ## Game Rules
62 | Mafia is a social deduction game, created by Dimitry Davidoff in 1986. The game models a conflict between two groups: an informed minority (the mafia team), and an uninformed majority (the Residents).
63 | At the start of the game, each player is secretly assigned a role affiliated with one of these teams. The game has two alternating phases:
64 |
65 | + Night Phase
66 |
67 | a night role during which those with night killing powers may covertly kill other players
68 |
69 | All players close their eyes. The GOD then instructs all Mafias to open their eyes and acknowledge their accomplices. The mafias suggest a "victim" by silently gesturing to indicate their target and to show unanimity then Don (Mafia's head) should decide whom to be killed then close their eyes again.
70 | A similar process occurs for other roles with nightly actions. In the case of the Detector, the GOD may indicate the target's innocence or guilt by using gestures such as nodding or head shaking.
71 |
72 | + Day Phase
73 |
74 | a day role, in which surviving players debate the identities of players and vote to eliminate a suspect.
75 |
76 | The GOD instructs players to open their eyes. Discussion ensues among the living players. At any point, a player may accuse someone of being a mafia and prompt others to vote to eliminate them. If over half of the players do so, the accused person should go to the court.Players which goes to the court may have a speech defending theirselves from not being mafia, then GOD should take votes again and this time the player with maximum vote will dead and night begins. Otherwise, the phase continues until an elimination occurs.
77 | Dead players are not permitted to attempt to influence the remainder of the game.Because players have more freedom to deliberate, days tend to be longer than nights.
78 |
79 | The game continues until a faction achieves its win condition; for the Residents, this usually means eliminating the whole mafia team, while for the minority this usually means reaching numerical parity with the Residents.
80 |
81 | ### Roles
82 |
83 | #### Mafia Team
84 | | Role | image(s) | Descriptions |
85 | |:----:|:--------:|:------------:|
86 | | Don |
| Don is the boss of the mafia group. At night mode Don decides whom to be killed from the mafia team.Don can't be detected by detective. |
87 | | Hit Man |
| Hit Man is a rather powerful member of mafia team. His/Her shots won't fail even if the doctor save or the victim is Bulletproof. Hit Man can use his shot only one time during the game his shot will be replaced by one of mafia's night shot. |
88 | | Made Man |
| Made Man is the one of the most powerful participant of the mafia team. Made Man gets up at night and turn one of the members of city team to Mafia. |
89 | | Kind Wife |
| Kind Wife is mafia team's sweetheart. After the day she died the mafia team get up and kill two suspects instead of one to take her revenge. |
90 | | Mafia |
| Mafia is the simple participant of the mafia team. Mafia gets up at night and try to decide which one of the players they want to kill, detective can detect this kind of mafia in night mode. |
91 |
92 | #### City Team
93 | | Role | image(s) | Descriptions |
94 | |:----:|:--------:|:------------:|
95 | | Rebel |
| Rebel is from city team which gets up at night mode and kills a person.if the victim was chosen from residents, Rebel (him/her)self may die. |
96 | | Doctor |
| Doctor is a helpful participant of city team which gets up after mafia team and tries to rescue a person (or two in the first night) from mafia's shot. |
97 | | Detective |
| Detective is from city team gets up at night mode and tries to ask GOD if someone is good (Resident, Doctor, Rebel, Bulletproof) or bad(Mafia), but his/her first attempt to ask from. Don may be answered incorrect by GOD. |
98 | | Bulletproof |
| Bulletproof is the most powerful resident which doesn't hurt from night shots. he/she won't die through night mode. |
99 | | Bride |
| Bride is a member of city team. Bride has been engaged to Groom recently at nigh both of them will get up and see each other after death of each one of them, other one can kill anyone as a revenge of his/her sweetheart at night phase. |
100 | | Groom |
| Groom is a member of city team. Groom has been engaged to Bride recently at nigh both of them will get up and see each other after death of each one of them, other one can kill anyone as a revenge of his/her sweetheart at night phase. |
101 | | Chef |
| Chef is critical member of city team. After his/her death city team should win at last after 3 days. |
102 | | Miller |
| Miller is a member of city team. When Detective ask GOD about Millers role the result will be bad(Mafia) so Detective will be confused about Millers role and asume he/she as a mafia team member. |
103 | | Undercover Cop |
| Undercover Cop is a member of city team but he/she will act just like mafia (wakes up at night) and decide whome to be killed). |
104 | | Reporter |
| Reporter is a city team member. GOD will inform Reporter who was chosen by Made Man to become Mafia. |
105 | | Grandma |
| Grandma with gun is a frightening member of city team. She will kill anyone who tries to kill her at night. Mafia and other roles with kiling power should be aware of her. |
106 | | Student |
| Student is a innocent city team member. After His/Her death, players will kill two players at day court. |
107 | | Postman |
| Postman is a member of city team. After Postman's death he/she can select a player to die with him/her. With this power Postman can help city team by killing a mafia member. |
108 | | Clown |
| Clown is a member of city team. Clown forces someone to reveal his/her role for another players. Clown can do this just for one time and this should take place at night, GOD should be informed whos role to be reavealed. |
109 | | Resident |
| Resident is the typical player of the game. he/she has no power but to blame mafia in order to remove them from the game in day mode. |
110 |
111 | ## References
112 | Icons made by Vectors Market and Pixel perfect from www.flaticon.com.
113 |
114 | Sounds from Soundjay.
115 |
116 | + [https://en.wikipedia.org/wiki/Mafia_(party_game)](https://en.wikipedia.org/wiki/Mafia_(party_game))
117 |
--------------------------------------------------------------------------------
/doc/Pictures/CLI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/doc/Pictures/CLI.png
--------------------------------------------------------------------------------
/doc/Pictures/mafia_game.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/doc/Pictures/mafia_game.png
--------------------------------------------------------------------------------
/doc/Pictures/mobile_browser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/doc/Pictures/mobile_browser.png
--------------------------------------------------------------------------------
/mafia.py:
--------------------------------------------------------------------------------
1 | from sys import argv
2 | from random import randrange, shuffle
3 | from flask import Flask, render_template, url_for, request
4 | from flask_httpauth import HTTPBasicAuth
5 | from mafia_params import *
6 |
7 | app = Flask(__name__)
8 | auth = HTTPBasicAuth()
9 | auth_GOD = HTTPBasicAuth()
10 | preshared_key = ""
11 | id = 0
12 | nPlayers = 0
13 | roles = []
14 | ip2role_index_name = {}
15 | nComments = 0
16 | comments_ordered = []
17 |
18 | @auth.verify_password
19 | def verify_password(username, password):
20 | if len(username) > 0:
21 | return username
22 | return None
23 |
24 | @app.route('/')
25 | @auth.login_required
26 | def index():
27 | global id, ip2role_index_name
28 | username = str(auth.current_user())
29 | role = ""
30 | image_name = ""
31 | ip = str(request.remote_addr)
32 |
33 | if ip in ip2role_index_name.keys():
34 | return render_template("Player.html", player=ip2role_index_name[ip])
35 | else:
36 | if id > nPlayers:
37 | return render_template("404.html", is_farsi=True)
38 | role = roles[id]
39 | ip2role_index_name[ip] = [role,
40 | str(randrange(1, nRoles[role] + 1)),
41 | username,
42 | "alive",
43 | False]
44 | image_name = role + "_" + str(ip2role_index_name[ip][1])
45 | print("*" * 20, "New Player","*" * 20)
46 | toGod = ip + " : " + str(id) + " : " + username + " --> " + role
47 | toGod += "/" + role2fa[role] #TODO: Just in Farsi Mode
48 | print(toGod)
49 | id += 1
50 | return render_template("index.html",
51 | image_name=image_name,
52 | role_name=role, role_name_fa=role2fa[role],
53 | description=descriptions[role], description_fa=descriptions_fa[role],
54 | is_farsi=True)
55 |
56 |
57 | @auth_GOD.verify_password
58 | def verify_password_god(username, password):
59 | if password == preshared_key:
60 | return username
61 |
62 |
63 | @app.route('/GOD')
64 | @auth_GOD.login_required
65 | def GOD_PAGE():
66 | global ip2role_index_name, nComments, comments_ordered
67 | msg = ""
68 | if request.args.get("Kill") is not None:
69 | ip = request.args.get("Kill")
70 | if ip in ip2role_index_name.keys():
71 | if ip2role_index_name[ip][3] == "alive":
72 | ip2role_index_name[ip][3] = "dead"
73 | else:
74 | ip2role_index_name[ip][3] = "alive"
75 | else:
76 | return render_template("404.html", is_farsi=True)
77 | if request.args.get("Ban") is not None:
78 | ip = request.args.get("Ban")
79 | if ip in ip2role_index_name.keys():
80 | if ip2role_index_name[ip][3] == "alive":
81 | ip2role_index_name[ip][3] = "banned"
82 | elif ip2role_index_name[ip][3] == "banned":
83 | ip2role_index_name[ip][3] = "alive"
84 | else:
85 | return render_template("404.html", is_farsi=True)
86 | if request.args.get("Comment") is not None:
87 | ip = request.args.get("Comment")
88 | if ip in ip2role_index_name.keys():
89 | if ip2role_index_name[ip][4] == False:
90 | if nComments <= nPlayers // 3:
91 | ip2role_index_name[ip][4] = True
92 | nComments += 1
93 | comments_ordered.append(ip)
94 | else:
95 | msg = "Error: Out of Comments."
96 | else:
97 | ip2role_index_name[ip][4] = False
98 | nComments -= 1
99 | comments_ordered.remove(ip)
100 | else:
101 | return render_template("404.html", is_farsi=True)
102 | return render_template("GOD.html", ip2role_index_name=ip2role_index_name,
103 | prompt_message=msg, roles={role:roles.count(role) for role in set(roles)},
104 | comments=comments_ordered, role2team=role2team)
105 |
106 |
107 | @app.errorhandler(404)
108 | def invalid_route(e):
109 | return render_template("404.html", is_farsi=True)
110 |
111 |
112 | def help_me():
113 | usage = "-" * 70 + "\n"
114 | usage += "mafia - Web Server Application For Mafia Game Playing On Local Network \n\n"
115 | usage += "-" * 70 + "\n"
116 | usage += "Usage: python3 mafia number_of_players[int]\n"
117 | usage += "ex: python3 mafia 5\n"
118 | usage += "this will tell mafia.py that you want a game for 5 people.\n\n"
119 | usage += "If you've seen a bug here (or any idea that can help us) feel free to open an issue\n"
120 | usage += "here at : https://github.com/sadrasabouri/mafia/issues"
121 | print(usage)
122 | exit()
123 |
124 |
125 | def give_me_roles(ordered_roles):
126 | n = len(ordered_roles)
127 | if n >= 14:
128 | ordered_roles[12] = 'Groom'
129 | ordered_roles[13] = 'Bride'
130 | if n % 3 == 0:
131 | ordered_roles[14] = 'Serial Killer'
132 | if n % 3 != 0:
133 | try:
134 | i = ordered_roles.index('Mafia')
135 | ordered_roles[i] = 'Made Man'
136 | ordered_roles[2] = 'Reporter'
137 | except ValueError:
138 | pass
139 | if n % 3 == 2:
140 | try:
141 | i = ordered_roles.index('Mafia')
142 | ordered_roles[i] = 'Kind Wife'
143 | except ValueError:
144 | pass
145 | return ordered_roles
146 |
147 |
148 | if __name__ == "__main__":
149 | if len(argv) < 2 or argv[1] in ['--help', 'help', '-h']:
150 | help_me()
151 | nPlayers = int(argv[1])
152 | if nPlayers > len(ordered_roles):
153 | print("Too many players, mafia doesn't support a game with", nPlayers, "player.")
154 | help_me()
155 | roles = give_me_roles(ordered_roles[:nPlayers])
156 | shuffle(roles)
157 | chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%^&*()"
158 | for i in range(4):
159 | preshared_key += chars[randrange(0, len(chars))]
160 | print("_" * 20 + "GOD's password" + "_" * 20)
161 | print(preshared_key)
162 | print("_" * 54)
163 | app.run(host="0.0.0.0",
164 | port=5000,
165 | debug=True,
166 | use_reloader=False)
167 |
--------------------------------------------------------------------------------
/mafia_params.py:
--------------------------------------------------------------------------------
1 | ordered_roles = ["Resident",
2 | "Don",
3 | "Resident",
4 | "Detective",
5 | "Doctor",
6 | "Hit Man",
7 | "Rebel",
8 | "Bulletproof",
9 | "Mafia",
10 | "Resident",
11 | "Resident",
12 | "Mafia",
13 | "Resident",
14 | "Resident",
15 | "Mafia",
16 | "Doctor",
17 | "Chef",
18 | "Mafia",
19 | "Detective",
20 | "Miller",
21 | "Mafia",
22 | "Undercover Cop",
23 | "Grandma",
24 | "Mafia",
25 | "Student",
26 | "Postman",
27 | "Mafia",
28 | "Clown",
29 | "Resident",
30 | "Mafia"
31 | "Resident",
32 | "Resident"]
33 |
34 | nRoles = {"Boxer" : 2,
35 | "Bride" : 5,
36 | "Bulletproof" : 9,
37 | "Bus Driver" : 3,
38 | "Chef" : 3,
39 | "Clown" : 2,
40 | "Curious Kid" : 2,
41 | "Detective" : 3,
42 | "Doctor" : 10,
43 | "Don" : 4,
44 | "Genie" : 2,
45 | "Grandma" : 2,
46 | "Groom" : 4,
47 | "Hit Man" : 2,
48 | "Insane" : 3,
49 | "Jailer" : 2,
50 | "Judge" : 6,
51 | "Kind Wife" : 4,
52 | "Lawyer" : 3,
53 | "Made Man" : 2,
54 | "Mafia" : 9,
55 | "Magician" : 4,
56 | "Miller" : 3,
57 | "Postman" : 3,
58 | "Priest" : 3,
59 | "Rebel" : 3,
60 | "Reporter" : 6,
61 | "Resident" : 21,
62 | "Serial Killer" : 6,
63 | "Student" : 2,
64 | "Undercover Cop" : 2
65 | }
66 |
67 | role2team = {"Boxer" : "mafia",
68 | "Bride" : "city",
69 | "Bulletproof" : "city",
70 | "Bus Driver" : "city",
71 | "Chef" : "city",
72 | "Clown" : "city",
73 | "Curious Kid" : "city",
74 | "Detective" : "city",
75 | "Doctor" : "city",
76 | "Don" : "mafia",
77 | "Genie" : "city",
78 | "Grandma" : "city",
79 | "Groom" : "city",
80 | "Hit Man" : "mafia",
81 | "Insane" : "city",
82 | "Jailer" : "city",
83 | "Judge" : "city",
84 | "Kind Wife" : "mafia",
85 | "Lawyer" : "mafia",
86 | "Made Man" : "mafia",
87 | "Mafia" : "mafia",
88 | "Magician" : "city",
89 | "Miller" : "city",
90 | "Postman" : "city",
91 | "Priest" : "city",
92 | "Rebel" : "city",
93 | "Reporter" : "city",
94 | "Resident" : "city",
95 | "Serial Killer" : "serial_killer",
96 | "Student" : "city",
97 | "Undercover Cop" : "city"
98 | }
99 |
100 | descriptions = {"Boxor" : "Boxor is a member of mafia team. Boxor hits one of the players at night and the one"
101 | " who hited Can't deffend oneself during day phase due to it's hit effect.",
102 | "Bride" : "Bride is a member of city team. Bride has been engaged to Groom recently at nigh both of"
103 | " them will get up and see each other after death of each one of them, other one can kill"
104 | " anyone as a revenge of his/her sweetheart at night phase.",
105 | "Bulletproof" : "Bulletproof is the most powerful resident which doesn't hurt from night shots. he/she won't die"
106 | " through night phase.",
107 | "Bus Driver" : "Bus Driver is city team member. He/She can switch two player which means each shot/question"
108 | " from first one will hurt/asked from second one.",
109 | "Chef" : "Chef is critical member of city team. After his/her death city team should win at last after 3 days.",
110 | "Clown" : "Clown is a member of city team. Clown forces someone to reveal his/her role for another players."
111 | " Clown can do this just for one time and this should take place at night, GOD should be informed"
112 | " whos role to be reavealed.",
113 | "Curious Kid" : "He/She is a member of city team which can open his/her eyes and spy on mafias in the way"
114 | " that no one can see him/her.",
115 | "Detective" : "Detective is from city team gets up at night phase and tries to ask GOD if someone is good"
116 | " (Resident, Doctor, Rebel, Bulletproof) or bad(Mafia), but his/her first attempt to ask from"
117 | " Don may be answered incorrect by GOD.",
118 | "Doctor": "Doctor is a helpful participant of city team which gets up after mafia team and tries to rescue a person"
119 | " (or two in the first night) from mafia's shot.",
120 | "Don" : "Don is the boss of the mafia group. At night phsae Don decides whom to be killed from the mafia team."
121 | "Don can't be detected by detective.",
122 | "Genie" : "Genie is a kind member of city team despite his/her name. Genie selects a player at night and GOD "
123 | "will ask the player to wish something and his/her wish will come true. Genie can use his/her power"
124 | " just three time in a game.",
125 | "Grandma" : "Grandma with gun is a frightening member of city team. She will kill anyone who tries to kill her"
126 | " at night. Mafia and other roles with kiling power should be aware of her.",
127 | "Groom" : "Groom is a member of city team. Groom has been engaged to Bride recently at nigh both of"
128 | " them will get up and see each other after death of each one of them, other one can kill"
129 | " anyone as a revenge of his/her sweetheart at night phase.",
130 | "Hit Man" : "Hit Man is a rather powerful member of mafia team. His/Her shots won't fail even if the doctor save"
131 | " or the victim is Bulletproof. Hit Man can use his shot only one time during the game his shot will"
132 | " be replaced by one of mafia's night shot.",
133 | "Insane" : "Insane is a member of city team. GOD will infrom Insane who is aiming at his/her neighbors (left hand"
134 | " player or right hand player).",
135 | "Jailer" : "Jailer is a member of city team. Jailer can bust any player at night phase, one who has been busted won't"
136 | " play at earlier day phase just for a night.",
137 | "Judge" : "Judge is a member of city team. Judge can reveal his role and decide to kill a player at day phase, Judge"
138 | " can use his/her power only once during the game.",
139 | "Kind Wife" : "Kind Wife is mafia team's sweetheart. After the day she died the mafia team get up and kill two suspects"
140 | " instead of one to take her revenge.",
141 | "Lawyer" : "Lawyer is from mafia team. Lawyer wakes up at night and inform the GOD whom should be sued to be to the court"
142 | " for next day phase.",
143 | "Made Man" : "Made Man is the one of the most powerful participant of the mafia team. Made Man gets up at night and turn"
144 | " one of the members of city team to Mafia.",
145 | "Mafia" : "Mafia is the simple participant of the mafia team. Mafia gets up at night and try to decide which one of"
146 | "the players they want to kill, detective can detect this kind of mafia in night phase.",
147 | "Magician" : "Magician is member of city team. He/She decides to kill or save a player during night and can use his/her"
148 | "power just once during the game.",
149 | "Miller" : "Miller is a member of city team. When Detective ask GOD about Millers role the result will be bad(Mafia) so"
150 | " Detective will be confused about Millers role and asume he/she as a mafia team member.",
151 | "Postman" : "Postman is a member of city team. After Postman's death he/she can select a player to die with him/her."
152 | " With this power Postman can help city team by killing a mafia member.",
153 | "Priest" : "",
154 | "Rebel" : "Rebel is from city team which gets up at night phase and kills a person.if the victim was chosen from"
155 | " residents, Rebel (him/her)self may die.",
156 | "Reporter" : "Reporter is a city team member. GOD will inform Reporter who was chosen by Made Man to become Mafia.",
157 | "Resident" : "Resident is the typical player of the game. he/she has no power but to blame mafia in order to remove "
158 | "them from the game in day phase.",
159 | "Serial Killer" : "Serial Killer is a seperate team. He/She wakes up once each two night and shot a player."
160 | " Serial Killer will win if He/She is in last three players.",
161 | "Student" : "Student is a innocent city team member. After His/Her death, players will kill two players at day court.",
162 | "Undercover Cop" : "Undercover Cop is a member of city team but he/she will act just like mafia (wakes up at night)"
163 | " and decide whome to be killed)."}
164 |
165 | descriptions_fa = {"Boxor" : "بوکسور عضو تیم مافیا است. او یک فرد را در شب انتخاب میکند و به او مشت میزند پس از این حرکت آن فرد نمیتواند در روز بعد صحبت کند.",
166 | "Bride" : "عروس عضو تیم شهروندان است. او که به تازگی با داماد وصلت کرده است دوران عاشقی را میگذراند. در صورتی که داماد کشته شود عروس میتواند یک فردرا به دلخواه بکشد.",
167 | "Bulletproof" : "ضد ضربه قوی ترين شهروند بازی ميباشد ،و از هر تير مافیا در فاز شب در امان ميباشد.بنابرين ضد ضربه توسط مافيا در فاز شب قابل کشته شدن نميباشد",
168 | "BusDriver" : "راننده اتوبوس عضو تیم شهروندان است و میتواند جای دو نفر را عوض کند یعنی استعلامات و ضربه های روی نفر اول روی نفر دوم اثر میکند.",
169 | "Chef" : "آشپز عضو تیم شهروندان است و با مرگ او شهروندان تنها ۳ روز دیگر برای برد وقت دارند و در غیر این صورت از گشنگی می میرند و مافیا برنده می شود",
170 | "Clown" : "دلقک عضو تیم شهروندان است. در هر بازی میتواند یکبار یک فرد را انتخاب کند تا نقش خود را فاش کند.",
171 | "Curious Kid" : "کودک کنجکاو عضو تیم شهروندان است. وی باید در شب به شکلی که کسی متوجه نشود تیم مافیا را تشخیص دهد.",
172 | "Detective" : "کارآگاه يکی از اعضای تیم شهروند ميباشد که در فاز شب چشم هايش را باز کرده و ميتواند از خدای بازی هويت يکی از افراد بازی را بپرسد ، و خدا با اشاره بله يا خیر به کاراگاه ميگويد که فرد استعلام شده جزو اعضای مافيا هست يا نه",
173 | "Doctor": "دکتر يکی از اعضای تیم شهروند ميباشد که در فاز شب به فرمان خدای بازی چشم هايش را باز کرده و ميتواند خود و يا يکی از بازيکنان را از حذف شدن و کشته شدن در فاز شب بازی نجات دهد.",
174 | "Don" : "اين نقش سردسته تيم مافيا مي باشد و مسئوليت تيم مافيا بر عهده دُن است.امتياز حائز اهميتی که دُن در بازی دارد اين است که استعلامش توسط کاراگاه همانند شهروندان منفی میباشد.",
175 | "Genie" : "غول چراغ جادو عضو تیم شهروندان است. در مجموع می تواند ۳ آرزو را برآورده کند. در شب مشخص می شود که آرزو چه کسی را برآورده کند در روز با آرزو کردن آن شخص آرزو او برآروده می شود",
176 | "Grandma" : "مادربزرگ با اسلحه عضو تیم شهروندان است. در شب هر کسی که به وی سر بزند (بخواهد او را بکشد) خودش خواهد مرد.",
177 | "Groom" : "داماد عضو تیم شهروندان است. او که به تازگی با عروس وصلت کرده است و دوران عاشقی خود را می گذراند . در صورتی که عروس در بازی بمیرد میتواند یک فرد را به دلخواه بکشد.",
178 | "Hit Man" : "آدمکش یکی از حرفه ای ترین مافیا ها است. او تنها یک تیر دارد که جایگزین یکی از قتل های مافیا میشود. اگر تصمیم بگیرد کسی را بکشد چیزی جلوی او را نمیگیرد (نه دکتر و نه ضد ضربه بودن آن شخص)",
179 | "Insane" : "دیوانه عضو تیم شهروندان است. در شب میتواند ببیند که چه کسی فرد کناری او را انتخاب کرده است.",
180 | "Jailer" : "زندان بان عضو تیم شهروندان است. او هر شب به دلخواه یک فرد را انتخاب میکند تا به زندان برود و یک شب از بازی محروم شود.",
181 | "Judge" : "قاضی عضو تیم شهروندان است. او نقش خود را فاش میکند و یک فرد را به دلخواه اعدام میکند.",
182 | "Kind Wife" : "همسر مهربان عضو تیم مافیا است. با مرگ او مافیا ۲ نفر را در فاز شب میکشد.",
183 | "Lawyer" : "وکیل عضو تیم مافیا است. او در شب بیدار میشود و تصمیم میگیرد که چه کسی باید امشب به دادگاه برود.",
184 | "Made Man" : "آدم اجیر کن عضو تیم مافیا است. او شب از خواب بلند میشود و یک فرد از شهروندان را تبدیل به مافیا میکند.",
185 | "Mafia" : "از اعضای تیم مافیا میباشد و اگر کارآگاه از او استعلام بگیرد، استعلامش مثبت می شود",
186 | "Magician" : "جادوگر عضو تیم شهروندان است. او می تواند تنها یکبار یک فرد را بکشد یا نجات دهد.",
187 | "Miller" : "آسیابان عضو تیم شهروندان است. استعلام آسیابان توسط کارآگاه منفی (شبیه مافیا) است .",
188 | "Postman" : "پستچی یکی از اعضای شروندان است. او پس از مرگ یک فرد دیگر را برای مرگ انتخاب میکند و همراه خودش میکشد.",
189 | "Priest" : "",
190 | "Rebel" : "از اعضای تیم شهروند میباشد و در فاز شب میتواند کسی را که فکر میکند مافیا است را هدف قرار دهد اگر شخص مافیا بود خواهد مرد.اما اگر شورشی به اشتباه یک شهروند را هدف قرار دهد خودش خواهد مرد.",
191 | "Reporter" : "گزارشگر عضو تیم شهروندان است. هنگامی که آدم اجیر کن بازیکنی را برای تیم مافیا انتخاب میکند به گزارشگر اطلاع داده می شود.",
192 | "Resident" : "شهروند عضو ساده شهر است. تنها قدرتی که شهروند دارد حذف افراد به واسطه رای گیری در روز است",
193 | "Serial Killer" : "قاتل سریالی یک تیم جدا است که اگر در ۳ نفر آخر باشد برنده است. او یک شب در میان بلند می شود و یک فرد را به دلخواه میشکد",
194 | "Student" : "دانش آموز شهروند بیگناهی است که در صورت کشته شدن تیم شهروندان در فاز روز ۲ تفر را در دادگاه می شکند.",
195 | "Undercover Cop" : "پلیس مخفی عضو تیم شهروندان است او به همراه مافیا بازی میکند و به همراه آن ها در شب بیدار میشود و افراد را برای مرگ انتخاب میکند ولی در نهایت باید به نفع شهروندان عمل کند."}
196 |
197 | role2fa = {"Boxer" : "بوکسور",
198 | "Bride" : "عروس",
199 | "Bulletproof" : "ضدضربه",
200 | "Bus Driver" : "راننده اتوبوس",
201 | "Chef" : "آشپز",
202 | "Clown" : "دلقک",
203 | "Curious Kid" : "کودک کنجکاو",
204 | "Detective" : "کارآگاه",
205 | "Doctor" : "دکتر",
206 | "Don" : "دن",
207 | "Genie" : "غول چراغ جادو",
208 | "Grandma" : "مادربزرگ با اسلحه",
209 | "Groom" : "داماد",
210 | "Hit Man" : "آدم کش",
211 | "Insane" : "دیوانه",
212 | "Jailer" : "زندان بان",
213 | "Judge" : "قاضی",
214 | "Kind Wife" : "همسر مهربان",
215 | "Lawyer" : "وکیل",
216 | "Made Man" : "آدم اجیر کن",
217 | "Mafia" : "مافیا",
218 | "Magician" : "جادوگر",
219 | "Miller" : "آسیابان",
220 | "Postman" : "پست چی",
221 | "Priest" : "کشیش",
222 | "Rebel" : "شورشی",
223 | "Reporter" : "خبرنگار",
224 | "Resident" : "شهروند",
225 | "Serial Killer" : "قاتل سریالی",
226 | "Student" : "دانش آموز",
227 | "Undercover Cop" : "پلیس مخفی"}
228 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | # Automatically generated by https://github.com/damnever/pigar.
2 |
3 | # mafia/mafia.py: 3
4 | Flask == 1.1.2
5 |
6 | # mafia/mafia.py: 4
7 | Flask_HTTPAuth == 4.1.0
8 |
--------------------------------------------------------------------------------
/static/css/style.css:
--------------------------------------------------------------------------------
1 | .description {
2 | text-align: justify;
3 | text-justify: auto;
4 | padding-left: 10%;
5 | padding-right: 10%;
6 | }
7 |
8 | #fa {
9 | direction: rtl;
10 | color: rgb(189, 185, 181);
11 | }
12 |
13 | h1 {
14 | font-size: 30px;
15 | padding: 0 0 0 0;
16 | margin: 0 0 0 0;
17 | }
18 |
19 | h2 {
20 | font-size: 25px;
21 | color: rgb(172, 161, 147);
22 | padding: 0 0 0 0;
23 | margin: 0 0 0 0;
24 | }
25 |
26 | .table_header {
27 | margin: 0 0 0 0;
28 | margin-bottom: 10px;
29 | padding: 0 0 0 0;
30 | text-align: center;
31 | }
32 |
33 | p {
34 | font-size: 10px;
35 | color: rgb(163, 157, 150);
36 | padding: 0 0 0 0;
37 | margin: 0 0 0 0;
38 | }
39 |
40 | table, td, th {
41 | width: 100%;
42 | text-align: center;
43 | }
44 |
45 | th, td {
46 | padding-top: 5px;
47 | }
48 |
49 | .avatar {
50 | width: 200px;
51 | height: 200px;
52 | border-radius: 100px;
53 | }
54 |
55 | .id_section {
56 | font-size: 10px;
57 | }
58 |
59 | .action_table {
60 | width: auto;
61 | border: 1px solid black;
62 | text-align: center;
63 | }
64 |
65 | .alive {
66 | background-color: white;
67 | }
68 | .banned {
69 | background-color: darkgray;
70 | }
71 | .dead {
72 | background-color: red;
73 | }
74 |
75 | .mafia {
76 | font-size: 20px;
77 | color: #cf3232;
78 | }
79 |
80 | .city {
81 | font-size: 20px;
82 | color: #3283cf;
83 | }
84 |
85 | .serial_killer {
86 | font-size: 20px;
87 | color: #784e88;
88 | }
89 |
90 | #myProgress {
91 | width: 100%;
92 | background-color: #ddd;
93 | border-radius: 5px;
94 | }
95 |
96 | #myBar {
97 | width: 0%;
98 | height: 30px;
99 | background-color: #4f8ace;
100 | color:#ffffff;
101 | text-align: center;
102 | line-height: 30px;
103 | border-radius: 5px;
104 | }
105 |
106 | #player_name {
107 | width: 20%;
108 | }
109 |
110 | #player_role {
111 | width: 20%;
112 | }
113 |
114 | #is_comment {
115 | width: 5%;
116 | }
117 |
--------------------------------------------------------------------------------
/static/images/Warns/cross.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/Warns/cross.png
--------------------------------------------------------------------------------
/static/images/Warns/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/Warns/play.png
--------------------------------------------------------------------------------
/static/images/roles/Boxer_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Boxer_1.png
--------------------------------------------------------------------------------
/static/images/roles/Boxer_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Boxer_2.png
--------------------------------------------------------------------------------
/static/images/roles/Bride_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bride_1.png
--------------------------------------------------------------------------------
/static/images/roles/Bride_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bride_2.png
--------------------------------------------------------------------------------
/static/images/roles/Bride_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bride_3.png
--------------------------------------------------------------------------------
/static/images/roles/Bride_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bride_4.png
--------------------------------------------------------------------------------
/static/images/roles/Bride_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bride_5.png
--------------------------------------------------------------------------------
/static/images/roles/Bulletproof_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bulletproof_1.png
--------------------------------------------------------------------------------
/static/images/roles/Bulletproof_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bulletproof_2.png
--------------------------------------------------------------------------------
/static/images/roles/Bulletproof_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bulletproof_3.png
--------------------------------------------------------------------------------
/static/images/roles/Bulletproof_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bulletproof_4.png
--------------------------------------------------------------------------------
/static/images/roles/Bulletproof_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bulletproof_5.png
--------------------------------------------------------------------------------
/static/images/roles/Bulletproof_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bulletproof_6.png
--------------------------------------------------------------------------------
/static/images/roles/Bulletproof_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bulletproof_7.png
--------------------------------------------------------------------------------
/static/images/roles/Bulletproof_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bulletproof_8.png
--------------------------------------------------------------------------------
/static/images/roles/Bulletproof_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bulletproof_9.png
--------------------------------------------------------------------------------
/static/images/roles/Bus Driver_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bus Driver_1.png
--------------------------------------------------------------------------------
/static/images/roles/Bus Driver_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bus Driver_2.png
--------------------------------------------------------------------------------
/static/images/roles/Bus Driver_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Bus Driver_3.png
--------------------------------------------------------------------------------
/static/images/roles/Chef_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Chef_1.png
--------------------------------------------------------------------------------
/static/images/roles/Chef_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Chef_2.png
--------------------------------------------------------------------------------
/static/images/roles/Chef_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Chef_3.png
--------------------------------------------------------------------------------
/static/images/roles/Clown_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Clown_1.png
--------------------------------------------------------------------------------
/static/images/roles/Clown_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Clown_2.png
--------------------------------------------------------------------------------
/static/images/roles/Curious Kid_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Curious Kid_1.png
--------------------------------------------------------------------------------
/static/images/roles/Curious Kid_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Curious Kid_2.png
--------------------------------------------------------------------------------
/static/images/roles/Detective_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Detective_1.png
--------------------------------------------------------------------------------
/static/images/roles/Detective_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Detective_2.png
--------------------------------------------------------------------------------
/static/images/roles/Detective_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Detective_3.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_1.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_10.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_2.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_3.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_4.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_5.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_6.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_7.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_8.png
--------------------------------------------------------------------------------
/static/images/roles/Doctor_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Doctor_9.png
--------------------------------------------------------------------------------
/static/images/roles/Don_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Don_1.png
--------------------------------------------------------------------------------
/static/images/roles/Don_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Don_2.png
--------------------------------------------------------------------------------
/static/images/roles/Don_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Don_3.png
--------------------------------------------------------------------------------
/static/images/roles/Don_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Don_4.png
--------------------------------------------------------------------------------
/static/images/roles/Genie_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Genie_1.png
--------------------------------------------------------------------------------
/static/images/roles/Genie_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Genie_2.png
--------------------------------------------------------------------------------
/static/images/roles/Grandma_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Grandma_1.png
--------------------------------------------------------------------------------
/static/images/roles/Grandma_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Grandma_2.png
--------------------------------------------------------------------------------
/static/images/roles/Groom_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Groom_1.png
--------------------------------------------------------------------------------
/static/images/roles/Groom_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Groom_2.png
--------------------------------------------------------------------------------
/static/images/roles/Groom_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Groom_3.png
--------------------------------------------------------------------------------
/static/images/roles/Groom_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Groom_4.png
--------------------------------------------------------------------------------
/static/images/roles/Hit Man_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Hit Man_1.png
--------------------------------------------------------------------------------
/static/images/roles/Hit Man_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Hit Man_2.png
--------------------------------------------------------------------------------
/static/images/roles/Insane_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Insane_1.png
--------------------------------------------------------------------------------
/static/images/roles/Insane_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Insane_2.png
--------------------------------------------------------------------------------
/static/images/roles/Insane_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Insane_3.png
--------------------------------------------------------------------------------
/static/images/roles/Jailer_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Jailer_1.png
--------------------------------------------------------------------------------
/static/images/roles/Jailer_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Jailer_2.png
--------------------------------------------------------------------------------
/static/images/roles/Judge_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Judge_1.png
--------------------------------------------------------------------------------
/static/images/roles/Judge_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Judge_2.png
--------------------------------------------------------------------------------
/static/images/roles/Judge_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Judge_3.png
--------------------------------------------------------------------------------
/static/images/roles/Judge_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Judge_4.png
--------------------------------------------------------------------------------
/static/images/roles/Judge_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Judge_5.png
--------------------------------------------------------------------------------
/static/images/roles/Judge_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Judge_6.png
--------------------------------------------------------------------------------
/static/images/roles/Kind Wife_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Kind Wife_1.png
--------------------------------------------------------------------------------
/static/images/roles/Kind Wife_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Kind Wife_2.png
--------------------------------------------------------------------------------
/static/images/roles/Kind Wife_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Kind Wife_3.png
--------------------------------------------------------------------------------
/static/images/roles/Kind Wife_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Kind Wife_4.png
--------------------------------------------------------------------------------
/static/images/roles/Lawyer_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Lawyer_1.png
--------------------------------------------------------------------------------
/static/images/roles/Lawyer_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Lawyer_2.png
--------------------------------------------------------------------------------
/static/images/roles/Lawyer_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Lawyer_3.png
--------------------------------------------------------------------------------
/static/images/roles/Made Man_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Made Man_1.png
--------------------------------------------------------------------------------
/static/images/roles/Made Man_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Made Man_2.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_1.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_10.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_11.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_12.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_2.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_3.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_4.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_5.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_6.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_7.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_8.png
--------------------------------------------------------------------------------
/static/images/roles/Mafia_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Mafia_9.png
--------------------------------------------------------------------------------
/static/images/roles/Magician_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Magician_1.png
--------------------------------------------------------------------------------
/static/images/roles/Magician_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Magician_2.png
--------------------------------------------------------------------------------
/static/images/roles/Magician_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Magician_3.png
--------------------------------------------------------------------------------
/static/images/roles/Magician_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Magician_4.png
--------------------------------------------------------------------------------
/static/images/roles/Miller_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Miller_1.png
--------------------------------------------------------------------------------
/static/images/roles/Miller_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Miller_2.png
--------------------------------------------------------------------------------
/static/images/roles/Miller_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Miller_3.png
--------------------------------------------------------------------------------
/static/images/roles/Miller_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Miller_4.png
--------------------------------------------------------------------------------
/static/images/roles/Postman_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Postman_1.png
--------------------------------------------------------------------------------
/static/images/roles/Postman_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Postman_2.png
--------------------------------------------------------------------------------
/static/images/roles/Postman_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Postman_3.png
--------------------------------------------------------------------------------
/static/images/roles/Priest_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Priest_1.png
--------------------------------------------------------------------------------
/static/images/roles/Priest_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Priest_2.png
--------------------------------------------------------------------------------
/static/images/roles/Priest_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Priest_3.png
--------------------------------------------------------------------------------
/static/images/roles/Rebel_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Rebel_1.png
--------------------------------------------------------------------------------
/static/images/roles/Rebel_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Rebel_2.png
--------------------------------------------------------------------------------
/static/images/roles/Rebel_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Rebel_3.png
--------------------------------------------------------------------------------
/static/images/roles/Reporter_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Reporter_1.png
--------------------------------------------------------------------------------
/static/images/roles/Reporter_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Reporter_2.png
--------------------------------------------------------------------------------
/static/images/roles/Reporter_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Reporter_3.png
--------------------------------------------------------------------------------
/static/images/roles/Reporter_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Reporter_4.png
--------------------------------------------------------------------------------
/static/images/roles/Reporter_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Reporter_5.png
--------------------------------------------------------------------------------
/static/images/roles/Reporter_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Reporter_6.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_1.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_10.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_11.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_12.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_13.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_14.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_15.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_16.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_17.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_18.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_19.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_2.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_20.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_21.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_3.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_4.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_5.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_6.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_7.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_8.png
--------------------------------------------------------------------------------
/static/images/roles/Resident_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Resident_9.png
--------------------------------------------------------------------------------
/static/images/roles/Serial Killer_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Serial Killer_1.png
--------------------------------------------------------------------------------
/static/images/roles/Serial Killer_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Serial Killer_2.png
--------------------------------------------------------------------------------
/static/images/roles/Serial Killer_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Serial Killer_3.png
--------------------------------------------------------------------------------
/static/images/roles/Serial Killer_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Serial Killer_4.png
--------------------------------------------------------------------------------
/static/images/roles/Serial Killer_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Serial Killer_5.png
--------------------------------------------------------------------------------
/static/images/roles/Serial Killer_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Serial Killer_6.png
--------------------------------------------------------------------------------
/static/images/roles/Student_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Student_1.png
--------------------------------------------------------------------------------
/static/images/roles/Student_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Student_2.png
--------------------------------------------------------------------------------
/static/images/roles/Undercover Cop_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Undercover Cop_1.png
--------------------------------------------------------------------------------
/static/images/roles/Undercover Cop_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/images/roles/Undercover Cop_2.png
--------------------------------------------------------------------------------
/static/js/main.js:
--------------------------------------------------------------------------------
1 | var i = 0;
2 | function start() {
3 | if (i == 0) {
4 | i = 1;
5 | var elem = document.getElementById("myBar");
6 | var beep_sound = document.getElementById("beep")
7 | var width = 0;
8 | var time_from_start = 0;
9 | var id = setInterval(frame, 10);
10 | function frame() {
11 | if (width >= 100) {
12 | clearInterval(id);
13 | beep_sound.play();
14 | i = 0;
15 | } else {
16 | width += 1 / 45;
17 | time_from_start = 45 * width / 100;
18 | elem.style.width = width + "%";
19 | elem.innerHTML = time_from_start.toFixed(2);
20 | elem.style.backgroundColor = "rgb(" + time_from_start * 6 +", 50, 50)";
21 | }
22 | }
23 | }
24 | }
25 |
26 | function delay (URL, delay_time) {
27 | setTimeout( function() { window.location = URL }, delay_time );
28 | }
29 |
30 | function kill_sound_play(){
31 | var kill_sound = document.getElementById("kill");
32 | kill_sound.play();
33 | }
34 |
35 | function ban_sound_play(){
36 | var ban_sound = document.getElementById("ban");
37 | ban_sound.play();
38 | }
39 |
--------------------------------------------------------------------------------
/static/voices/ban.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/voices/ban.mp3
--------------------------------------------------------------------------------
/static/voices/beep.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/voices/beep.mp3
--------------------------------------------------------------------------------
/static/voices/kill.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadrasabouri/mafia/0bd680e1df2f78e9641cafa952dbc9746d620c1d/static/voices/kill.mp3
--------------------------------------------------------------------------------
/templates/404.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}
4 | FekroBot::mafia::404
5 | {% endblock %}
6 |
7 | {% block avatar %}
8 |
9 | {% endblock %}
10 |
11 | {% block role_title %}
12 |
{{ ip2role_index_name[ip][0] }}
{{ ip2role_index_name[ip][0] }}
{{ ip2role_index_name[ip][0] }}
{{ ip2role_index_name[ip][0] }}
84 | {{ role }} : {{ roles[role] }} 85 |
86 | {% endfor %} 87 |{% block avatar %}{% endblock %} | 12 |
{% block role_title %}{% endblock %} | 15 |
{% block desc %}{% endblock %} | 18 |
{% block id_sec %}{% endblock %} | 21 |
{{ description }}
31 | {% if is_farsi == True %} 32 |{{ description_fa }}
33 | {% endif %} 34 | {% endblock %} 35 | 36 | {% block id_sec %} 37 | {% endblock %} 38 | --------------------------------------------------------------------------------