From 50d95d906d7d782d155e75635be4d637c1ccfb25 Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Mon, 30 Dec 2024 22:44:07 +0100 Subject: fix click fronts and remove console logs --- play.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'play.ts') diff --git a/play.ts b/play.ts index 87ba7dc..2dd8407 100644 --- a/play.ts +++ b/play.ts @@ -21,8 +21,6 @@ const TRACK_LENGTH = 11; const FACTIONS = ['a', 'c', 'm']; // const ROLES = ['Anarchist', 'Communist', 'Moderate']; -console.log('roles', document.getElementById('roles')); - const ui = { map: document.getElementById('map'), medallions_container: document.getElementById('medallions'), @@ -218,8 +216,6 @@ const LAYOUT_TRACKS = [ // }); // })(); -console.log('ui', ui); - function register_action( e: HTMLElement & { my_action?: string; my_id?: string | number }, action: string, @@ -232,7 +228,6 @@ function register_action( } function on_click_action(evt) { - console.log('on_click_action', evt); if (evt.button === 0) if (send_action(evt.target.my_action, evt.target.my_id)) evt.stopPropagation(); @@ -250,7 +245,6 @@ function is_action(action, arg) { let on_init_once = false; function on_init() { - console.log('on_init'); if (on_init_once) return; on_init_once = true; @@ -428,11 +422,6 @@ function on_update() { ui.roles[view.initiative].medallions.appendChild(ui.initiative_token); ui.initiative_token.setAttribute('data-year', view.year); - - - // ui.turn_info.replaceChildren(); - // console.log('played_card', view.played_card); - // console.log('turn_info', ui.turn_info); if (view.played_card === null) { ui.turn_info.style.display = 'none'; } else { @@ -453,7 +442,7 @@ function on_update() { action_button('d_liberty', 'Decrease Liberty'); action_button('soviet_support', 'Soviet Support'); action_button('collectivization', 'Collectivization'); - + action_button('d_collectivization', 'Decrease Collectivization'); action_button('d_foreign_aid', 'Decrease Foreign Aid'); action_button('d_government', 'Decrease Government'); @@ -476,7 +465,7 @@ function on_update() { // action_button('draw_card', 'Draw card'); action_button('play_for_ap', 'Play card for Action Points'); action_button('play_for_event', 'Play card for Event'); - + action_button('add_glory', 'Add Glory'); action_button('up', 'Up'); action_button('down', 'Down'); -- cgit v1.2.3