summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-10-08 07:14:33 +0100
committeriainp5 <iain.pearce.ip@gmail.com>2024-10-08 07:14:33 +0100
commit5103d59ddc92d0fb994cea7365c3fef8a5d743af (patch)
treed2a55ad4a1bddb07848c3de76db547dadf180497 /play.js
parent929a9f44d6599426c7cd05fd5aa621bf83085c58 (diff)
download1989-dawn-of-freedom-5103d59ddc92d0fb994cea7365c3fef8a5d743af.tar.gz
Fix for mobiles
Diffstat (limited to 'play.js')
-rw-r--r--play.js49
1 files changed, 23 insertions, 26 deletions
diff --git a/play.js b/play.js
index c1e4111..4fea383 100644
--- a/play.js
+++ b/play.js
@@ -260,33 +260,30 @@ function on_click_space(evt) {
}
function on_click_card(evt) {
- //console.log('on_click_card')
- if (evt.button === 0) {
- const card = evt.target.my_card;
- console.log('on_click_card_called with card:', card);
- if (is_action('card', card)) {
- console.log('in action card')
- if (send_action('card', card)) {
- evt.stopPropagation();
- }
- }
- //First check for TST special power
- else if (is_card_action('card_tst_8', card)) {
- show_popup_menu(evt, "popup_tst_8", card, cards[card].name)
- }
-
- //Check for Common European Home
- else if (is_card_action('card_ceh', card)) {
- show_popup_menu(evt, "popup_ceh_check", card, cards[card].name)
- } else if (is_card_action('card_opp_event', card)) {
- console.log('in action card_opp_event')
- show_popup_menu(evt, "popup_opp_event", card, cards[card].name)
+ const card = evt.target.my_card;
+ console.log('on_click_card_called with card:', card);
+ if (is_action('card', card)) {
+ console.log('in action card')
+ if (send_action('card', card)) {
+ evt.stopPropagation();
}
- else {
- console.log('in action card_my_event')
- show_popup_menu(evt, "popup", card, cards[card].name)
- }
- }
+ }
+ //First check for TST special power
+ else if (is_card_action('card_tst_8', card)) {
+ show_popup_menu(evt, "popup_tst_8", card, cards[card].name)
+ }
+
+ //Check for Common European Home
+ else if (is_card_action('card_ceh', card)) {
+ show_popup_menu(evt, "popup_ceh_check", card, cards[card].name)
+ } else if (is_card_action('card_opp_event', card)) {
+ console.log('in action card_opp_event')
+ show_popup_menu(evt, "popup_opp_event", card, cards[card].name)
+ }
+ else {
+ console.log('in action card_my_event')
+ show_popup_menu(evt, "popup", card, cards[card].name)
+ }
}
function is_action(action) {