implement redirections for now
This commit is contained in:
parent
989b9bdbf9
commit
663457d4bc
@ -13,5 +13,4 @@ def index(req, resp):
|
||||
@api.route("/control/deal/{cards}")
|
||||
def deal(req, resp, cards):
|
||||
the_game.deal_cards(int(cards))
|
||||
resp.content = api.template('home/control.html', deck=the_game.card_deck,
|
||||
trump_card=the_game.trump_card, trump_color=the_game.get_trump_color())
|
||||
api.redirect(resp, '/control/', status_code=303)
|
||||
|
@ -19,9 +19,6 @@ def play(req, resp, player: str, card: str):
|
||||
pl = the_game.players[p]
|
||||
c = pl.play_card(int(card))
|
||||
the_game.table.play_card(p, c)
|
||||
tcard = the_game.trump_card
|
||||
tcolor = the_game.get_trump_color()
|
||||
table = the_game.table
|
||||
resp.content = api.template('home/player.html', player=player, cards=the_game.players[p].cards,
|
||||
trump_card=tcard, trump_color=tcolor, played_cards=table.played_cards)
|
||||
url = '/player/'+player
|
||||
api.redirect(resp, url, status_code=303)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user