summaryrefslogtreecommitdiff
path: root/cao-common.js
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-06-05 01:19:01 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-06-05 01:19:01 +0100
commit7f9ff043890f9835a412889aded1d7e73bcd1e7d (patch)
tree384bf2510085fbeb7a4c1d23e6bb964e6c5137cb /cao-common.js
parentb6e255d905b3180e6d064c3dad253bf44b1e9368 (diff)
remove desktop things from the common file
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'cao-common.js')
-rw-r--r--cao-common.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/cao-common.js b/cao-common.js
index 3064cd7..5807aac 100644
--- a/cao-common.js
+++ b/cao-common.js
@@ -196,7 +196,7 @@ var CAO = function() {
};
};
- $('#btn_join').click(function() {
+ this.join_game = function(game_name) {
var game_name = prompt('Name of the game');
var request = {
@@ -205,23 +205,23 @@ var CAO = function() {
};
request_queue.push('join_game');
ws.send(JSON.stringify(request));
- });
+ };
- $('#btn_pick_black').click(function() {
+ this.pick_black_card = function() {
var request = {
'op': 'pick_black_card',
};
request_queue.push('pick_black_card');
ws.send(JSON.stringify(request));
- });
+ };
- $('#btn_collect').click(function() {
+ this.collect_cards = function() {
var request = {
'op': 'collect_cards',
};
request_queue.push('collect_cards');
ws.send(JSON.stringify(request));
- });
+ };
this.request_show_cards = function() {
var request = {