summaryrefslogtreecommitdiff
path: root/play.ts
diff options
context:
space:
mode:
authorFrans Bongers <fransbongers@franss-mbp.home>2024-12-30 22:44:07 +0100
committerFrans Bongers <fransbongers@franss-mbp.home>2024-12-30 22:44:07 +0100
commit50d95d906d7d782d155e75635be4d637c1ccfb25 (patch)
tree779f45f3de545b9550539501910db3c35a71589e /play.ts
parent4148cddd0370fa1ea9b9580a79ac1c73109c88a1 (diff)
downloadland-and-freedom-50d95d906d7d782d155e75635be4d637c1ccfb25.tar.gz
fix click fronts and remove console logs
Diffstat (limited to 'play.ts')
-rw-r--r--play.ts15
1 files changed, 2 insertions, 13 deletions
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');