}
this.state.stuck = new Set();
+ this.broadcast_event_object("stuck", { stuck: [] });
this.broadcast_event_object("dealt", {
remaining: this.state.bag.length
});
/* Don't re-deal if player already has tiles. */
if (this.state.player_tiles[session_id]) {
- response.json({ tiles: this.state.player_tiles[session_id] });
+ response.json({
+ tiles: this.state.player_tiles[session_id],
+ remaining: this.state.bag.length
+ });
return;
}
remaining: this.state.bag.length
});
- response.json({ tiles: tiles });
+ response.json({ tiles: tiles, remaining: this.state.bag.length });
}
handle_stuck(request, response) {