From 541cefc5509fde6870b8adb03f8bc4abdf823510 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 8 Jun 2015 22:36:07 +0100 Subject: mobile: handle the score updates in the score are reflected in the top bar of the mobile iface. Signed-off-by: Olivier Gayot --- cao-mobile.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cao-mobile.js') diff --git a/cao-mobile.js b/cao-mobile.js index d476e1c..6776bb6 100644 --- a/cao-mobile.js +++ b/cao-mobile.js @@ -14,6 +14,7 @@ $(document).ready(function() { var $played_card_number = $("#played-card-number"); var $header = $("header"); var $white_cards = $('#white-cards'); + var $score_value = $('#score-value'); $leave_room.click(function () { window.location.reload(); @@ -108,5 +109,9 @@ $(document).ready(function() { $become_judge.show(); }; + cao.on_updated_score = function(score) { + $score_value.html(score); + }; + cao.run(); }); -- cgit v1.2.3