set player names in graphic mode
This commit is contained in:
@ -73,9 +73,10 @@ async def set_trump_color(player, color):
|
||||
await the_game.send_page_reload()
|
||||
|
||||
|
||||
async def initGame(ws):
|
||||
p = the_game.players
|
||||
n = [x.name for x in p]
|
||||
async def initGame(player, ws):
|
||||
p = int(player)
|
||||
players = the_game.players[p:] + the_game.players[:p]
|
||||
n = [x.name for x in players]
|
||||
msg = {"type": "message", "fct": "startGame", "names": n}
|
||||
await ws.send_json(msg)
|
||||
|
||||
@ -104,7 +105,8 @@ async def ws_handler(ws):
|
||||
color = x['color']
|
||||
await set_trump_color(player, color)
|
||||
elif fct == "requestInit":
|
||||
await initGame(ws);
|
||||
player = x['player']
|
||||
await initGame(player, ws);
|
||||
elif fct == "getHand":
|
||||
player = x['player']
|
||||
await getHand(player, ws)
|
||||
|
Reference in New Issue
Block a user