From 5d81b4294bd8f9b20ac8a396a185f6cf9550c00f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 25 Oct 2024 11:58:58 +0200 Subject: Update client. Fixed some spelling errors in space data table. Create tools directory and add Makefile. Add layout.svg with boxes drawn on top of locations. Add genlayout.js to create list of box locations. Add gencolors.js to create beveled marker border colors. Major rewrite of play.js and play.css with official assets. --- play.html | 236 +++++++++++++++++++++++--------------------------------------- 1 file changed, 86 insertions(+), 150 deletions(-) (limited to 'play.html') diff --git a/play.html b/play.html index e09e214..eb2f495 100644 --- a/play.html +++ b/play.html @@ -7,204 +7,140 @@ 1989 - - - +
- + + +
  • Rules of Play +
  • Background Book +
  • Reference Sheets +
  • +
  • Card Gallery +
  • +
    +
    + -
  • Rules of Play -
  • Background Book -
  • Reference Sheets - +
  • Show removed events +
  • Show discard
  • - - -
    -
    - - -
    - -
    -
    -
    -

    - -
    - - - - -
    -

    1

    -
    -

    1

    -
    -

    1

    -
    -

    1

    -
    -

    1

    -
    -

    1

    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + - - - - - - - -
    -
    +
    -
    - - - -
    -
    -
    Event Markers
    -
    - - - - - - - - - - - - - - - -
    -
    -
    + -
    -
    -
    Cards on the Table
    -
    -
    -
    +
    +
    Cards on the Table
    +
    +
    -
    -
    -
    Played Card
    -
    +
    +
    Played Card
    +
    -
    - - -
    -
    -
    Discard
    -
    -
    -
    - - -
    -
    -
    Permanently Removed Events
    -
    -
    -
    + +
    +
    Hand
    +
    +
    -
    -
    -
    Ceausescu Cards
    -
    -
    -
    -
    Power Struggle Hand
    -
    -
    -
    - - +
    +
    Ceausescu Cards
    +
    +
    +
    +
    Power Struggle Hand
    +
    +
    -
    +
    +
    Opponent Hand
    +
    +
    -
    -
    Opponent Hand
    -
    -
    - -
    +
    +
    Opponent Power Struggle Hand
    +
    +
    -
    -
    -
    Set aside card
    -
    -
    -
    - +
    +
    Samizdat Card
    +
    +
    - -
    + +
    +
    Permanently Removed Events
    +
    +
    -
    -
    Hand
    -
    + +
    +
    Discard
    +
    -
    - - -- cgit v1.2.3 From 3e30593e9986187aff35a4440bdbcb309025c58c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 26 Oct 2024 00:12:25 +0200 Subject: Move event reminder location on top of Yugoslavia. Initialize marker locations to their starting positions. --- play.css | 7 ++++--- play.html | 27 ++++++--------------------- play.js | 6 +++++- 3 files changed, 15 insertions(+), 25 deletions(-) (limited to 'play.html') diff --git a/play.css b/play.css index d98c8ce..c339351 100644 --- a/play.css +++ b/play.css @@ -109,10 +109,11 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } #event_reminder_list { position: absolute; display: flex; - flex-rap: wrap; + flex-wrap: wrap; gap: 5px; - bottom: 165px; - right: 195px; + top: 1650px; + left: 600px; + width: 200px; } .marker { diff --git a/play.html b/play.html index eb2f495..473be26 100644 --- a/play.html +++ b/play.html @@ -53,27 +53,12 @@
    -
    -
    -
    -
    -
    -
    - - +
    +
    +
    +
    +
    +
    diff --git a/play.js b/play.js index 9ac9e60..4658044 100644 --- a/play.js +++ b/play.js @@ -284,7 +284,8 @@ function on_update() { if (!ui.spaces) create_ui() - // UPDATE ASIDE + // UPDATE PLAYER INFO + if (view.is_pwr_struggle) { roles.Democrat.stat.textContent = `${view.democrat_power_hand} Power cards` roles.Communist.stat.textContent = `${view.communist_power_hand} Power cards` @@ -292,9 +293,11 @@ function on_update() { roles.Democrat.stat.textContent = `${view.democrat_hand} cards` roles.Communist.stat.innerText = `${view.communist_hand} cards` } + ui.turn_info.innerText = `Strategy deck: ${view.strategy_deck} cards` // UPDATE TRACK MARKERS + layout_turn_marker() layout_round_marker() layout_stability_marker() @@ -338,6 +341,7 @@ function on_update() { ui.event_reminder_list.appendChild(ui.events[id]) // UPDATE INFLUENCE VALUES + for (let s = 1; s <= last_space; ++s) { const demInfl = view.demInfl[s] const comInfl = view.comInfl[s] -- cgit v1.2.3 From ea8755f9fe54ea911cdd864c5cfc01d708bdafb4 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 26 Oct 2024 00:33:08 +0200 Subject: add played power card panel --- play.html | 24 ++++++++++++++---------- play.js | 7 ++++++- rules.js | 3 ++- 3 files changed, 22 insertions(+), 12 deletions(-) (limited to 'play.html') diff --git a/play.html b/play.html index 473be26..f510ba0 100644 --- a/play.html +++ b/play.html @@ -66,6 +66,20 @@
    + +
    +
    Played Power Card
    +
    +
    +
    +
    Ceausescu Cards
    +
    +
    +
    +
    Power Struggle Hand
    +
    +
    +
    Cards on the Table
    @@ -84,16 +98,6 @@
    - -
    -
    Ceausescu Cards
    -
    -
    -
    -
    Power Struggle Hand
    -
    -
    -
    Opponent Hand
    diff --git a/play.js b/play.js index 4658044..770e6d5 100644 --- a/play.js +++ b/play.js @@ -40,6 +40,7 @@ const ui = { event_reminder_list: document.getElementById("event_reminder_list"), played_card: document.getElementById("played_card"), + played_power_card: document.getElementById("played_power_card"), hand: document.getElementById("hand"), power_hand: document.getElementById("power_hand"), opp_hand: document.getElementById("opp_hand"), @@ -372,6 +373,10 @@ function on_update() { if (view.played_card > 0) ui.played_card.appendChild(ui.cards[view.played_card]) + ui.played_power_card.replaceChildren() + if (view.played_power_card > 0) + ui.played_power_card.appendChild(ui.power_cards[view.played_power_card]) + ui.samizdat_card.replaceChildren() if (view.samizdat > 0) ui.samizdat_card.appendChild(ui.cards[view.samizdat]) @@ -383,7 +388,7 @@ function on_update() { ui.power_hand.replaceChildren() if (view.power_hand) for (let c of view.power_hand) - ui.hand.appendChild(ui.power_cards[c]) + ui.power_hand.appendChild(ui.power_cards[c]) ui.opp_hand.replaceChildren() if (view.opp_hand) diff --git a/rules.js b/rules.js index 6ce54dd..64d4396 100644 --- a/rules.js +++ b/rules.js @@ -192,7 +192,8 @@ exports.view = function(state, player) { } if (game.is_pwr_struggle) { - view.strategy_discard = game.power_struggle_discard + view.power_struggle_discard = game.power_struggle_discard + view.played_power_card = game.played_power_card, } else { view.strategy_discard = game.strategy_discard } -- cgit v1.2.3