cowiz20/views/player.py
2020-04-05 23:27:33 +02:00

12 lines
358 B
Python

from app_instance import api
from wiz_game import the_game
@api.route("/player/{player}")
def index(req, resp, player: str):
p = int(player)
tcard = the_game.trump_card
tcolor = the_game.get_trump_color()
resp.content = api.template('home/player.html', player=player, cards=the_game.players[p].cards, trump_card=tcard, trump_color=tcolor)