implemented 'table'
This commit is contained in:
		@@ -8,4 +8,20 @@ def index(req, resp, player: str):
 | 
			
		||||
    p = int(player)
 | 
			
		||||
    tcard = the_game.trump_card
 | 
			
		||||
    tcolor = the_game.get_trump_color()
 | 
			
		||||
    resp.content = api.template('home/player.html', player=player, cards=the_game.players[p].cards, trump_card=tcard, trump_color=tcolor)
 | 
			
		||||
    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)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@api.route("/player/{player}/play/{card}")
 | 
			
		||||
def play(req, resp, player: str, card: str):
 | 
			
		||||
    p = int(player)
 | 
			
		||||
    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)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user