diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-06-09 01:22:07 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-06-09 01:22:07 +0100 |
commit | b8c045e0bbca22e2283aaeb7fc75cb7f19ab1303 (patch) | |
tree | 30c7cf4d649404545bcc4ed07b3decddec426591 /cao-common.js | |
parent | 541cefc5509fde6870b8adb03f8bc4abdf823510 (diff) |
ui: allow to check if we are judge
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'cao-common.js')
-rw-r--r-- | cao-common.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cao-common.js b/cao-common.js index f844762..c71036d 100644 --- a/cao-common.js +++ b/cao-common.js @@ -21,6 +21,8 @@ var CAO = function() { var request_queue = []; + var judge = false; + var self = this; var ws; @@ -33,6 +35,10 @@ var CAO = function() { var map_handle_response_ok = {}; var map_handle_notif = {}; + this.is_judge = function() { + return judge; + }; + /* map_handle_response_ok {{{ */ map_handle_response_ok['join_game'] = function(result) { @@ -55,6 +61,8 @@ var CAO = function() { }; map_handle_response_ok['pick_black_card'] = function(result) { + judge = true; + self.on_pick_black_card_ok(); map_handle_response_ok['view_black_card'](result); }; |