This commit is contained in:
Stefan Rupp 2020-12-06 21:56:16 +01:00
parent 1b9ccc65ab
commit abccd2e51a
3 changed files with 11 additions and 25 deletions

View File

@ -12,8 +12,7 @@
player: player,
card: c
};
//window.game_socket.send("playcard "+player+":"+card);
t = JSON.stringify(msg);
let t = JSON.stringify(msg);
window.game_socket.send(t);
}
@ -25,8 +24,7 @@
player: player,
color: color
};
//window.game_socket.send("setTrumpColor "+player+":"+color)
t = JSON.stringify(msg);
let t = JSON.stringify(msg);
window.game_socket.send(t);
}
</script>

View File

@ -7,7 +7,7 @@
<meta name="description" content="pyramid web application">
<meta name="author" content="Pylons Project">
<title>Free Online Gamblingc</title>
<title>Free Online Gambling</title>
<!-- Bootstrap core CSS -->
<link href="//oss.maxcdn.com/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
@ -33,8 +33,6 @@
};
socket.onmessage = function(event) {
//alert(`[message] Data received from server: ${event.data}`);
//if (event.data == "reload") {
let x = JSON.parse(event.data);
let fct = x.fct;
if (fct == "reload") {

View File

@ -88,16 +88,6 @@ async def websocket(ws):
else:
print("confused :(")
# cmd = await ws.receive_text()
# fct, args = cmd.split()
# if fct == "playcard":
# p, c = map(int, args.split(':'))
# await play_card(p, c)
# elif fct == "setTrumpColor":
# player, color = args.split(':')
# await set_trump_color(player, color)
except WebSocketDisconnect:
the_game.websockets.remove(ws)