18 lines
596 B
Python
18 lines
596 B
Python
|
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())
|