We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c59a696 commit 02c8766Copy full SHA for 02c8766
mafia.py
@@ -1,3 +1,4 @@
1
+from sys import argv
2
from flask import Flask, render_template, url_for
3
4
app = Flask(__name__)
@@ -9,7 +10,20 @@ def index():
9
10
role_name="Don",
11
is_farsi=True)
12
13
+
14
+def help_me():
15
+ usage = "mafia - Web Server Application For Mafia Game Playing On Local Network \n\n"
16
+ usage += "Usage: python3 mafia number_of_players[int]\n"
17
+ usage += "ex: python3 mafia 5\n"
18
+ usage += "this will tell mafia.py that you want a game for 5 people."
19
+ print(usage)
20
+ exit()
21
22
23
if __name__ == "__main__":
24
+ if len(argv) < 2 or argv[1] in ['--help', 'help', '-h']:
25
+ help_me()
26
+ nPlayers = int(argv[1])
27
app.run(host="0.0.0.0", \
28
port=5000, \
29
debug=True)
0 commit comments