cleanup
This commit is contained in:
parent
1b9ccc65ab
commit
abccd2e51a
@ -7,26 +7,24 @@
|
||||
let player = "{{player}}";
|
||||
let c = card.toString();
|
||||
var msg = {
|
||||
type: "message",
|
||||
fct: "playcard",
|
||||
player: player,
|
||||
card: c
|
||||
type: "message",
|
||||
fct: "playcard",
|
||||
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);
|
||||
}
|
||||
|
||||
function setTrumpColor(color) {
|
||||
let player = "{{player}}"
|
||||
var msg = {
|
||||
type: "message",
|
||||
fct: "setTrumpColor",
|
||||
player: player,
|
||||
color: color
|
||||
type: "message",
|
||||
fct: "setTrumpColor",
|
||||
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>
|
||||
|
@ -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") {
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user