Skip to content

Commit ea46ec9

Browse files
committed
edit : minor edit in mafia.py
1 parent b0427b8 commit ea46ec9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mafia.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@app.route('/')
1414
def index():
15-
global id, roles, ip2role, ip2image, nPlayers
15+
global id, ip2role, ip2image
1616
role = ""
1717
image_name = ""
1818
ip = str(request.remote_addr)
@@ -25,11 +25,11 @@ def index():
2525
return "Numbers of players out of range!" #TODO:well defined Error Page
2626
role = roles[id]
2727
image_name = role + "_" + str(randrange(1, nRoles[role] + 1))
28-
id += 1
2928
ip2role[ip] = role
3029
ip2image[ip] = image_name
3130
print("*" * 20, "New Player","*" * 20)
3231
print(ip + " : " + str(id) + " --> " + role)
32+
id += 1
3333
return render_template("index.html",
3434
image_name=image_name,
3535
role_name=role,

0 commit comments

Comments
 (0)