summaryrefslogtreecommitdiff
path: root/cao-mobile.js
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-06-09 01:30:14 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-06-09 01:30:14 +0100
commit98559886b1c293e55b75122c76792ee8f7cb530e (patch)
tree29816361e86f49f2ce6f945585cec960706a9a6d /cao-mobile.js
parent00a675237958704ceea56b7e47a509e873d92705 (diff)
ui: handle the number of played cards properly
the number is stored in the cao object and can be retrieved by the mobile / desktop part. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'cao-mobile.js')
-rw-r--r--cao-mobile.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/cao-mobile.js b/cao-mobile.js
index 58c5354..8d39169 100644
--- a/cao-mobile.js
+++ b/cao-mobile.js
@@ -50,10 +50,6 @@ $(document).ready(function() {
}
};
- cao.on_card_played = function(card_number) {
- $played_card_number.text(($played_card_number.text() + 1).toString());
- };
-
cao.on_show_white_card = function(idx, desc) {
var identifier = 'white-card-' + idx;
var content = '<button class="read-only card" id="' + identifier + '">' + desc + '</button>';
@@ -111,6 +107,8 @@ $(document).ready(function() {
$score_value.text(score);
};
+ cao.on_change_nbr_played_cards = function(nbr) {
+ $played_card_number.text(nbr);
};
cao.run();