From dbd210967deeccc035b5b1ac713917ab37a9a08a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 23 Oct 2024 09:03:57 +0200 Subject: renumber political cards to start at 0 --- play.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 7b69656..e58e027 100644 --- a/play.js +++ b/play.js @@ -67,7 +67,7 @@ const HEARTS = 2 const DIAMONDS = 3 const RESERVE = 4 -const IMPERIAL_ELECTION = 25 +const IMPERIAL_ELECTION = 24 const ELIMINATED = data.cities.name.length @@ -626,7 +626,7 @@ function on_init() { ui.italy.className = "marker political_marker_italy" ui.political = [] - for (let pc = 1; pc <= 25; ++pc) + for (let pc = 0; pc < 25; ++pc) ui.political[pc] = make_political_card(pc) ui.political_back = [ @@ -1092,9 +1092,9 @@ function on_update() { for (let e of ui.political_back[view.pol_deck]) ui.pc_deck.appendChild(e) if (view.flags & F_IMPERIAL_ELECTION) - ui.pc_deck.appendChild(ui.political[25]) + ui.pc_deck.appendChild(ui.political[24]) - for (let pc = 1; pc <= 25; ++pc) + for (let pc = 0; pc < 25; ++pc) ui.political[pc].classList.toggle("selected", pc === view.pc) for (let pow of all_major_powers) { -- cgit v1.2.3