Skip to content
Snippets Groups Projects
Commit def71bd4 authored by Nils G.'s avatar Nils G.
Browse files

Add a few comments

parent 2b995c2d
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ def content(): ...@@ -17,6 +17,7 @@ def content():
response.view = "default/login.html" response.view = "default/login.html"
return dict(info=T("The room has been closed")) return dict(info=T("The room has been closed"))
#Change this line to enable a different renderer
response.view = "game/renderer_debug.html" response.view = "game/renderer_debug.html"
return dict(player_record=player_record, room_record=room_record) return dict(player_record=player_record, room_record=room_record)
...@@ -31,9 +31,11 @@ def create(): ...@@ -31,9 +31,11 @@ def create():
players = PLAYERS_GET(room_record) players = PLAYERS_GET(room_record)
#Check if room limit is reached
if len(players) >= room_record["player_max"]: if len(players) >= room_record["player_max"]:
return(FAIL(CODE_NOTFOUND)) return(FAIL(CODE_NOTFOUND))
#Check if player with the same name already exists
for player in players: for player in players:
if player["name"] == user_name: if player["name"] == user_name:
return(FAIL(CODE_CONFLICT)) return(FAIL(CODE_CONFLICT))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment