From 403782244646483b587e3d6ea0b9b516c0db1017 Mon Sep 17 00:00:00 2001 From: Stefan Rupp Date: Fri, 22 May 2020 15:09:45 +0200 Subject: [PATCH] set Trump Color also uses websockets now --- templates/home/player.html | 11 +++++++++++ templates/shared/_layout.html | 2 +- views/player.py | 14 +++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/templates/home/player.html b/templates/home/player.html index e2cf693..cb038d7 100644 --- a/templates/home/player.html +++ b/templates/home/player.html @@ -7,6 +7,11 @@ let player = {{player}} window.game_socket.send("playcard "+player+":"+card) } + + function setTrumpColor(color) { + let player = {{player}} + window.game_socket.send("setTrumpColor "+player+":"+color) + }
@@ -59,10 +64,16 @@ {% endfor %} {% if choose_trump_color and (player == choose_trump_player) %} Choose Trump Color: + + + + + {% endif %}