cowiz20/views/control.py

17 lines
446 B
Python
Raw Normal View History

2020-04-05 23:27:33 +02:00
from app_instance import api
from wiz_game import the_game
@api.route("/control/")
def index(req, resp):
2020-04-12 15:27:05 +02:00
2020-04-05 23:27:33 +02:00
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.route("/control/deal/{cards}")
def deal(req, resp, cards):
the_game.deal_cards(int(cards))
2020-04-07 21:13:23 +02:00
api.redirect(resp, '/control/', status_code=303)