summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cao-common.js8
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);
};