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