cowiz20/views/control.py

18 lines
596 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):
print(req.params)
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))
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())