Commit graph

355 commits

Author SHA1 Message Date
github-actions
415a24c7a9 🔖 powergrid-viewer 2.3.34
Some checks are pending
All / prettier (push) Waiting to run
Viewer - Test / test_and_build (push) Waiting to run
2026-11-21 23:09:01 +00:00
goldjohn6
a8a7718b50
Map zoom (#176)
* Zoom the map: buttons, pinch, wheel, and drag to pan

Players asked for a way to zoom in after the board is fitted to the
screen. This adds a zoom on the map alone, on top of the fitted layout,
in both the desktop and portrait layouts.

- + / − / reset buttons in the map's top-right corner, sized in screen
  pixels so they stay thumb-sized on a phone.
- Two-finger pinch on touch screens zooms the map, not the page. One
  finger pans once zoomed; at the fitted size it still scrolls the page.
- Trackpad pinch (ctrl+wheel) everywhere; a plain wheel also zooms on
  desktop, where the board fits the window.
- Mouse drag pans when zoomed. A press that moves more than 6 px is a
  pan, and the click that follows it is swallowed, so a drag never
  builds a city.
- Clamped between the fit and 4x, and the zoomed map always covers its
  own box. It is clipped to that box, so it never covers the market or
  player boards.

The zoom layer sits outside the measured map slot, so the layout's
getBBox() measurement never sees it. The maths is in util/map-zoom.ts
with unit tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Map zoom: a faint outline and a minimap while zoomed

Asked for with older players in mind, so a zoomed map never leaves
anyone lost. Nothing changes at the fitted size. While zoomed:

- a faint white outline round the map's box, so it reads as a zoomed view;
- a small overview of the whole map in the bottom-left corner (the
  buttons are top-right), rounded, with an orange box over the part on
  screen. Tapping the overview centres the view there.

The overview is a <use> of the map slot, so it always matches the board.
It is sized in screen pixels, from 72 to 128 px on its long side, and
keeps the map's own proportions in both the desktop and portrait
layouts. Gestures never start on the overview or the buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Map zoom: a plain wheel scrolls the page, Ctrl+wheel zooms

Someone scrolling down to the resources or the chat must never zoom by
accident, so a plain wheel over the map always scrolls the page. It also
shows a brief hint, "Hold Ctrl and scroll to zoom" (⌘ on a Mac), the way
embedded maps do. Ctrl/⌘ + wheel and trackpad pinch zoom the map, and
the + / − tooltips mention both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 15:02:26 -08:00
github-actions
03f9986bb1 🔖 powergrid-viewer 2.3.33 2026-11-20 19:25:15 +00:00
goldjohn6
49c2a80f7e
SwitzerlandCustom: the cheese cellar (#174)
* SwitzerlandCustom: the cheese cellar (garbage is cheese, and it ripens)

Cheese kept in a garbage plant that rests through Bureaucracy (does not fire)
ages; an aged cube burns as two, stays aged until burned, never ages again,
and still takes one storage space.

- Player.agedCheese (read through agedCheese(): never above garbageLeft, so
  cubes lost to storage go aged-first).
- cheeseMix: the engine offers the thriftiest mix (least waste, then fewest
  cubes); UsePowerPlant.agedSpent records the aged cubes burned.
- ripenCheese at the Bureaucracy pass: a resting plant ripens only the room it
  has left (aged cubes are counted in the plants that fired first). Logged.
- calculateMaxCitiesPowered counts aged cheese as double.
- Bots burn aged cheese first and fire fresh-cheese plants last, so spare
  cheese plants rest and ripen.
- Viewer: "N aged" above the player's garbage count.

Bot sims (150 games each, 3/4/5p): 3-5 cubes age per game, 18-25% of cheese
runs use aged cheese; Step 3 is reached more often (4p 79%->89%, 5p 34%->45%).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Cheese cellar: an aged cube stays aged after its neighbour burns

Found in John's local playtest (plant 6, two aged, used one): the aged count
was read after the cubes left, so the cap by cubes held wiped the remaining
aged cube. Count it before. The "N aged" label moves below the cheese count,
clear of the plant cards, and the pass warning counts aged cheese as double.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 11:19:34 -08:00
goldjohn6
d0f8c48547
SwitzerlandCustom: a new community custom map (#173)
* SwitzerlandCustom: a new custom map (Alpine hydro, neutral Geneva, helicopters)

The seven Swiss Grossregionen, 49 cities, 95 links priced from real distances
(+6 into an Alpine city, +2 over a named pass; Gotthard 16).

- Alpine hydro: each ecological or fusion plant fired powers one more city,
  but only as many of those plants as the player owns Alpine cities
  (City.alpine; alpineBonusLeft / alpineEligible; calculateMaxCitiesPowered).
- Geneva is neutral: all three spaces open from Step 1 (stepSlots [3,3,3]).
- Lake Geneva steamer (sea), Glacier Express, three outskirt helicopters
  (Connection.air, drawn dotted and curved clear of cities). The Glacier
  Express, Oberalp and helicopters never decide which regions are dealt
  together; Ticino gets the Gotthard Base Tunnel and the Lukmanier.
- Viewer: Swiss outline (landlocked: neighbours all round), and the faded
  unplayed regions now cover community custom maps too, without curved links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* SwitzerlandCustom: green plants only for the Alpine +1; an expensive country

- The Alpine +1 is for green (ecological) plants only, never fusion (John:
  6 + 1 = 7 from one card is too strong). Rules text says so explicitly.
- Starting market: coal opens at $3 and oil at $4, while cheese is plentiful
  and opens at $5; uranium as usual ([18, 15, 12, 2], both editions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the Central Europe comment on garbagePrice

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* SwitzerlandCustom: power plants send the engine's offer; Alpine peaks

Found in John's local playtest: the viewer built its own UsePowerPlant move
from the printed card, so the engine refused a green plant with the Alpine
+1. A single-fuel plant now sends the engine's own offer (hybrids keep the
mix the player picked). freePlantMoves takes each offer after the previous
plant fires (on a copy), since the Alpine +1 is shared out; the powered-cities
count includes it. A snow-capped peak sits behind each Alpine city.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* SwitzerlandCustom: cheese opens at $6 (John, after his playtest)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* SwitzerlandCustom: the building-phase power capacity counts the Alpine +1

Found in John's playtest: 18 + 30 + 20 with Alpine cities showed 13, not 14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* SwitzerlandCustom: the Glacier Express drawn as a red railway

Connection.rail (visual only): red rails over a pale bed, crossed by red ties.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 11:06:59 -08:00
c8bf10538f Release phase auto-pass engine 2.0.37 and viewer 2.3.32 2026-11-17 22:21:20 +00:00
github-actions
0c2f9b977d 🔖 powergrid-viewer 2.3.31 2026-11-17 20:59:13 +00:00
goldjohn6
0edd7fd8a7
HawaiiCustom: a new custom map (island prices, ferry, shipped-in fuel) (#172)
* HawaiiCustom draft: custom map, ferry curve, sea crossings, house-price legend

Local draft for the community custom-map thread (not for release yet).
- engine: HawaiiCustom map (44 cities, 6 regions, house prices by island,
  payout +1, Kauai-Big Island ferry); customMaps list (by name only, never
  Random); GameMap.paymentTable / houseLegend; Connection.via / sea /
  ignoreForRegions
- viewer: curved via-links, dashed blue sea crossings, house-price legend,
  Hawaii land outlines, ?fullmap=1 for layout checks
- tests: hawaii-custom.spec.ts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* HawaiiCustom: Kauai at standard prices, shipped-in fuel (coal 2, oil 4)

Kauai already had the cheapest links on the board, so cheap houses on top made
it too strong (BootlegTampico on Discord); it moves to the standard 10/15/20.
Fuel is shipped in: the market starts with the three cheapest coal and oil left
in the supply, so coal starts at 2 and oil at 4. Garbage and uranium start as
each variant has them (Recharged still fills garbage to 9). Rules text updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Achievements: community custom maps get no Champion badge

Master's achievements give every map a Champion badge typed as
Record<MapName, string>, so adding HawaiiCustom broke the build. A badge needs
its own artwork and a manifest publication, so custom maps are left out for
now (the lookup already handles a map with no badge). A test covers a
HawaiiCustom win: grid-champion and full-table, no map badge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Geography test: cover custom maps (Hawaii has no neighbouring coast)

The catalog now holds Hawaii, so the count is standard maps plus custom maps,
and Hawaii is checked like the others. Its context is empty on purpose: it
sits in open ocean, with no other coast inside its frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:47:14 -08:00
MikeIsom
8052e1d592
It's Chile time! (#171)
* Count only wind plants as ecological, behind one switch

Benelux's extra market slot and Québec's protected plants now share one
isEcological() helper. Fusion is not ecological unless FUSION_IS_ECOLOGICAL
is flipped. New Benelux and Québec games store the ruling as
options.fusionEcological, so flipping it later only affects new games.

Québec's deck setup used to protect fusion plant 50 while its bureaucracy
and Benelux did not. Games without the stored flag rebuild their Québec
deck the old way via reconstructionOptions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add a power plant deck option with Deck 1, Deck 2 and Random

New games choose a deck with options.powerPlantDeck: standard, deck1 (The
New Power Plants / Set 1, without 52-60), deck2 (Set 2) or random, which
resolves from the seed and stores the result. Only a non-standard deck is
stored.

Deck 1 deals from 01-08 with 11 on top in the Original edition and from
the 01-16 plug cards in Recharged. Deck 1 and Deck 2 are offered on maps
whose setup doesn't name standard-deck plant numbers; the rest fall back
to the standard deck until their per-deck changes land. Germany's uranium
phase-out triggers on 38 (Deck 1) or 37 (Deck 2).

The legacy alternatePowerPlants flag keeps its Europe/North America-only
behaviour and storage, so existing games set up identically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Offer Deck 1 and Deck 2 on every map

Map rules that name plant numbers now look them up per deck in
deckChanges.ts: removed plants, market openers, top-of-deck plants and
Spain & Portugal's Step 2 plants, from the decks' 2024 map-changes sheets.
Map setup and the deck analysis share that table. Original-edition games
use the same numbers, except France with Deck 1, which follows The New
Power Plants rulebook (remove 11).

Australia, India, South Africa, Spain & Portugal and UK & Ireland now use
the shared default setup instead of their own copies. India has a version
of each deck. Italy's uranium phase-out uses Germany's plant per deck.
Northern Europe's regional cards replace the deck's plants by number, and
a regional plant the deck lacks is shuffled into the draw pile. Middle
East closes garbage purchases in Step 1, for Deck 2's garbage/oil hybrids.

Standard-deck setups are unchanged for old and new games. Also stops the
ecological replay test from comparing the transient pendingMessages queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add shuffled power plant decks: all decks, or one per number

powerPlantDeck now also takes 'shuffled' (every plant of the standard deck,
Deck 1 and Deck 2 together) and 'shuffledUnique' (one random copy of each
number, without Deck 1's 52-60). Extra copies are numbered n.1 (Deck 1) and
n.2 (Deck 2), so the market ranks duplicates Deck 2 > Deck 1 > Original and
moves keep identifying plants by number. Cards show the printed number, and
logs read "Power Plant 46 (Deck 2)"; the journal and the deck analysis
parse that label back to the copy.

Bids start at the printed number, the Original discard rule and plug
cards compare it, and each deck's own nuclear plant ends Germany's and
Italy's uranium resupply. The shuffled decks are only offered on maps
whose rules don't name plant numbers; Random still picks a single deck.

Standard-deck setups are unchanged for old and new games.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Offer the shuffled decks on maps with deck-specific rules

The shuffled decks follow all three decks' map rules at once, for the
copies dealt: Deck 1's and Deck 2's plant numbers become n.1 and n.2.
This opens them on Australia, Brazil, Bremen, China, France, India,
Manhattan, Middle East, Recharged Russia, South Africa and Spain &
Portugal.

Exceptions, where the decks' rules clash:
- Northern Europe and Quebec keep the single decks only.
- Original Russia keeps the single decks only (availableDecks now takes
  the variant).
- Original "top of the deck" plants use the standard deck's list.

Spain & Portugal stores the dealt held-back copies in heldPowerPlants
and puts them on top at Step 2. India's shuffled decks keep India's
garbage plants. Map setups deal the sampled deck and split plug cards
with isPlugPlant.

The analysis sampler now copes with shuffled decks: undealt top plants,
protected-plant overflow and plug-count estimates are capped. The
Middle East public replay resets the plant discount before refiltering
its opening market.

Single-deck setups are byte-identical to before for every map,
variant, deck, player count and seed checked.

* Offer the shuffled decks on Northern Europe, Quebec and Original Russia

Where the three decks' rules clash, the shuffled decks now follow each
rule's purpose:

- Northern Europe: each regional plant in play is always dealt. It takes
  the place of one dealt copy of its number, and every other copy leaves
  the game; a regional number that wasn't dealt is shuffled in. This
  also applies once the regions are drafted, which now also updates
  cardsLeft.
- Quebec: one plug card on top of the deck, then the two smallest dealt
  ecological plants not in the market. The Recharged market is drawn
  from the plug cards; the Original market is the eight smallest plants,
  with the standard deck's 13 (if dealt) or else the smallest plug card
  left on top. Ecological plants are never removed.
- Original Russia: the six smallest dealt plants open the market, the
  standard deck's 13 goes on top if dealt, and the 7th and 8th smallest
  plants are shuffled into the top five.

The analysis sampler mirrors all three. Maps can give a `shuffled` deck
note, which the viewer shows for the shuffled decks.

Single-deck setups are unchanged for every map, variant, deck, player
count and seed checked.

* Generate the rules tab's deck build from the deck tables

The rules dialog's "Deck build" section is now built from the same tables
the decks are dealt from (deckChanges.ts and each deck's card list), so
it names the right plants for Deck 1, Deck 2 and the shuffled decks
instead of always the Original deck's. Shuffled games list each rule's
plants as Original deck / Deck 1 / Deck 2, with a sentence explaining
that only the dealt plants count. Player-count lists show the game's
own player count.

Each sentence is a template with plant numbers as {pN} values, rendered
in its own span, so the catalogues translate it whole. The 54 new
templates are translated into all 16 languages; the 20 old deck-build
sentences are removed. The maps' hand-written deckBuild notes are gone.

Tests read the plant numbers back out of the generated text and compare
them with real setups for every map, edition, single deck and player
count, and check that every sentence translates in every language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Describe Central Europe's nuclear and Wien rules

Central Europe had no map rules text, though the engine limits nuclear
plants to players with a city in Czechia, Slovakia or Hungary and gives
a Wien network $1 off garbage (never below $1). The rules dialog now
says so, in all 17 languages, using each catalogue's own name for Wien.

The dialog reads a map's rules from the current map definition rather
than the copy saved in the game, so games already under way see rules
text added later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Outline buildable Bremen districts around the diamond

The blue build hint and the gold region-draft ring were fixed 18-unit
circles, which on Bremen's diamond tiles crossed the entry cost and slot
numbers. Bremen's tiles now get a diamond outline just outside their own
region border instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Begin Step 2 first when the Step 3 card comes early

The rulebooks: if the Step 3 card is drawn before Step 2 has begun,
carry out everything that begins Step 2, then prepare Step 3, back to
back. The engine only did this on UK & Ireland, and without Step 2's
own setup, so on Spain & Portugal the held-back plants never came back.

Step 2's setup (the smallest plant leaves, Spain & Portugal puts its
held-back plants on top, a new plant is drawn) is now one function.
Normal Step 2 uses it unchanged, and an early Step 3 card runs it first:
straight away outside the auction, or at the end of the auction phase
with Step 3's own setup, which then shuffles the draw pile again.
Middle East, China and Manhattan keep their own rules.

New games store step2BeforeStep3; games created earlier replay with
their old sequence.

The rules summary now lists what happens when Step 2 and Step 3 start,
and the early-Step-3 order, in all 17 languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove a stale Manhattan line brought back by the master merge

Merging the fork's older master into combined-deck-rules restored
`const lastPlug = lastPlugPlant(powerPlantDeck)` in Manhattan's setup.
lastPlugPlant isn't imported there and the value is unused, so the
engine build failed and CI went red on the branch and on master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile map: board generated from the design data

scripts/generate-chile-map.mjs writes engine/src/maps/chile-board.ts from the
design's chile-map-data.json: 43 cities (Salta in no region, single
occupancy), 59 connections, and the two Step 3 gates kept apart. Regions are
their colours, as on the other maps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Map rules: Chile (two markets on one supply, Step 3 gates, set-aside eco plants)

- maps/chile.ts: no uranium plants (11, 17, 23, 28, 34, 39), plants 33, 37
  and 44 set aside, none removed for the player count, under Original and
  Recharged. Standard deck only (other decks throw).
- Two markets on Korea's machinery: North (12 coal, 8 oil, no garbage) and
  Central (12 coal, 10 oil, 4 garbage), one shared 24/24/24 supply, no
  uranium. North restocks first from its own table.
- Buying: until Step 3 a player with cities buys only from their grid's
  market (marketSideOf); a player with no cities picks one for the turn.
- Gates live in GameMap.step3Connections, out of every build and path until
  Step 3, but they count when choosing play areas. A city in no region
  (Salta) is in play when it connects to one that is.
- applyChileStep3, beside each Step 3 start: merge the markets onto the
  standard tracks from the expensive end, open the gates, put 33/37/44 on
  top of the deck, and give every ecological plant +1 city (copies, never
  the catalogue's objects; fusion 50 unchanged). Runs once.
- Random map pick leaves Chile out, so every seed picks as before.
- chile.spec.ts: 36 tests for each mechanic, both variants, 2-6 players.

Every other map plays as before: 2,400 seeded games over all 24 maps
(Original and Recharged, 2-6 players, random and param bots) end in the
same states as on 28b88b5 (powergrid-manager engine-fingerprint).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile: hidden-deck replay, analysis scenarios, no randomized map

From an independent review of the Chile change:
- reconstructState (secret seed) took the live map, so a game past Step 3
  rewound to earlier states with its gates already open and replayed two
  log events short. closeChileGates puts the gates back for the replay, and
  the set-aside event is logged even when the known Step 3 deck is used.
- createAnalysisScenario dealt uranium plants and the set-aside plants into
  Chile's unknown deck. It now leaves them out, and in Step 3 keeps the
  set-aside plants on top in order and boosts ecological plants.
- randomizeMap on Chile throws: its gates and grids belong to its board.

Each new test fails without its fix. Other maps: 2,400 fingerprint games
still identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile update 1: northern regions cross the divide; grid per city

- Board regenerated from the redrawn design: Alto Hospicio merged into
  Iquique, Antofagasta N/S into Antofagasta, Putre and Pica removed;
  Taltal and Chañaral (brown), El Salvador (yellow) and Illapel (purple)
  added; Copiapó moved to yellow. 58 connections. Gates are now inside the
  northern regions: Antofagasta-Taltal and Sierra Gorda-El Salvador.
- Each city carries its grid (City.grid); marketSideOf reads the grids of
  a player's cities instead of whole regions. GameMap.northRegions is gone.
- GameMap.fixedRegions: brown and yellow are always in play; the random
  pick and the region draft add the remaining regions as usual (2-3P
  purple, 4P purple + red, 5-6P purple, red and green or pink).
- The gate-adjacency rule is removed: the region graph uses open
  connections only, as before Chile.
- chile.spec.ts: grids per city, gates the only North-Central links and
  one per northern region, fixed areas at 2-4P, the draft, Taltal and
  Copiapó buy from Central. The secret-seed replay test now compares the
  Step 3 events: a hidden-deck replay can drop one "drawn from the deck"
  entry around the Step 3 card on any map (USA seed r2 too).

Other maps: the 2,400 fingerprint games still end in identical states.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile: Salta pays a $10 house on top of its connection

A singleOccupancy city with a slot cost adds it to the build price (and to
the cities spent when totals are tracked). South Africa's spaces have no
slot costs and price as before; the board generator carries Salta's
slotCosts [10] from the design data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile: more Step 3 restock at 2-4P (2-3P coal 4 garbage 4; 4P coal 5 garbage 5)

Checkpoint 3 found the merged market short of fuel at 2-4P. Adds a test of
the Step 3 restock at every player count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile: Tacna and Jujuy border spaces, in play with 4-6 players

Cities may carry minPlayers; filterMapToRegions leaves them out below
that count (no other map uses the field). Tacna (Peru, off Arica, $12)
and Jujuy (Argentina, off San Pedro, $20) are one-house spaces like Salta.
Tests check they appear only at 4-6P, also after an area draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile: 5P Step 3 restock 4/5/4 (was 5/6/5)

Fuel scarcity in Step 3 caps the Central players' extra cities at 5P, as it
does at 4P: North vs Central placement goes from 0.629/0.468 to 0.543/0.489
with one North player and from 0.435/0.543 to 0.474/0.517 with two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile: separate 2P and 3P restock; 3P Step 1 coal is 1 North / 3 Central

A lone North player won far too often at 3P (North openers 40.7% wins,
Central 27.4%, fair 33.3%). Moving one Step 1 coal from the North market
to Central gives 33.4% / 33.3%. 2P keeps the old 2-3P row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile: the ladder board (two-lane Central corridor) with Mejillones-Maria Elena 12 and Taltal-El Salvador 14

Huasco, Melipilla, San Fernando, Santa Cruz and Cauquenes join; Coquimbo, Talcahuano and Coronel go; Los Angeles
moves to pink. No chokepoint city at any player count. The hidden-deck replay test skips seed r1, which now hits a
ChoosePowerPlant replay mismatch that is not Chile's (Germany r4 shows it too).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile on the current engine: standard deck only, border-space house price in buildOptions

- STANDARD_DECK_ONLY_MAPS (Chile): setup refuses deck1, deck2 and the shuffled decks, and a random deck is the
  standard one; the every-map deck tests expect that.
- The border spaces' $10 house (slotCosts) is added in buildOptions, where building prices now live.
- The Chile spec uses powerPlantDeck.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile in the viewer: gates, Central market, backdrop and a landscape layout

- Map: the gated connections (step3Connections) are drawn with their cost, a dashed orange line and an S3 marker
  until Step 3; border spaces with a slot cost get their own tooltip (one house, $10 plus the connection).
- Markets: Chile's second market is titled Central, with no uranium row and no North garbage row.
- Geography: Chile's backdrop (Natural Earth 1:50m, from the Chile design's generator).
- Layout: the board turned to run left to right at 70%. GameMap.mapRotationCenter (optional) keeps a rotated board
  still whichever regions are in play; maps without it rotate around their cities as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile rulebook (docs/maps/chile.md) and board image

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile on Power Plant decks 1 and 2 (test branch)

Chile's deck setup, set-aside plants, Step 3 boost and analysis now follow the
deck in play. Per deck: uranium plants removed (deck 1: 8, 19, 24, 31, 38, 50;
deck 2: 13, 21, 32, 37, 50), the three largest ecological plants set aside
(deck 1: 26, 32, 39; deck 2: 31, 36, 44), and the smallest ecological plant on
top in the original edition (11 on both). The shuffled decks are still refused.
Standard-deck games are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile on the shuffled decks

The three largest ecological plants dealt are set aside (all of them when a
sampled deck deals three or fewer); in the original edition the smallest
ecological plant dealt that isn't in the market goes on top, or none if there
is none. Chile's setupDeck now returns its set-aside plants; analysis reads
them from the state, or from the Step 3 log once they have gone on top.
Standard-deck games are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile board stretched 2x east-west; backdrop cut along the board's axes

The design's cross-board scale doubles (city positions only: connections and
costs are unchanged; Rancagua nudged clear of the Santiago E-San Fernando
line). The viewer's backdrop is cut along the board's own axes, far past the
cities, so the turned board no longer shows slanted land edges. Layout refitted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile turns to suit the screen: diagonal on wide screens, upright on tall ones

A map may set mapRotationPortrait, the turn the viewer uses in its stacked
(tall-screen) layout; only Chile sets it. Chile's board data is now written
upright (north up, east right), so the tall view needs no turn and the layout
measures it tightly; wide screens turn it 70 degrees, running from the top left
(north) to the bottom right. City positions only; play is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Format the Chile board generator with Prettier

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Translate Chile's deck-setup sentences in every viewer language

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Merge boardgamers/powergrid master (engine 2.0.35, viewer 2.3.30) into the fork

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Achievements: Chile, in testing, has no map badge yet

The published manifest keeps its 36 achievements; a Chile winner still earns
the general wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Prettier: leave the generated badge manifest and release receipts as recorded; format the rest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Chile Champion: a map badge for Chile (achievements revision 4, 37 badges)

Chile's real outline (Natural Earth 1:50m), from Arica to Puerto Montt,
widened 2x east-west and turned like the game board so it reads at badge
size. The 36 published badges, their images and the evaluator are unchanged;
the checks now allow exactly this one addition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix the line break in the Chile line of the art checker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:41:45 -08:00
abe1c841bd Release analysis money editing: engine 2.0.31 and viewer 2.3.30 2026-11-13 12:53:02 +00:00
github-actions
e433b2ad0d 🔖 powergrid-viewer 2.3.29 2026-11-11 21:50:21 +00:00
MikeIsom
96f3dedd5e
Shuffled Decks on every map, deck rules on the rules window, skipping Step 2 fix (#169)
* Count only wind plants as ecological, behind one switch

Benelux's extra market slot and Québec's protected plants now share one
isEcological() helper. Fusion is not ecological unless FUSION_IS_ECOLOGICAL
is flipped. New Benelux and Québec games store the ruling as
options.fusionEcological, so flipping it later only affects new games.

Québec's deck setup used to protect fusion plant 50 while its bureaucracy
and Benelux did not. Games without the stored flag rebuild their Québec
deck the old way via reconstructionOptions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add a power plant deck option with Deck 1, Deck 2 and Random

New games choose a deck with options.powerPlantDeck: standard, deck1 (The
New Power Plants / Set 1, without 52-60), deck2 (Set 2) or random, which
resolves from the seed and stores the result. Only a non-standard deck is
stored.

Deck 1 deals from 01-08 with 11 on top in the Original edition and from
the 01-16 plug cards in Recharged. Deck 1 and Deck 2 are offered on maps
whose setup doesn't name standard-deck plant numbers; the rest fall back
to the standard deck until their per-deck changes land. Germany's uranium
phase-out triggers on 38 (Deck 1) or 37 (Deck 2).

The legacy alternatePowerPlants flag keeps its Europe/North America-only
behaviour and storage, so existing games set up identically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Offer Deck 1 and Deck 2 on every map

Map rules that name plant numbers now look them up per deck in
deckChanges.ts: removed plants, market openers, top-of-deck plants and
Spain & Portugal's Step 2 plants, from the decks' 2024 map-changes sheets.
Map setup and the deck analysis share that table. Original-edition games
use the same numbers, except France with Deck 1, which follows The New
Power Plants rulebook (remove 11).

Australia, India, South Africa, Spain & Portugal and UK & Ireland now use
the shared default setup instead of their own copies. India has a version
of each deck. Italy's uranium phase-out uses Germany's plant per deck.
Northern Europe's regional cards replace the deck's plants by number, and
a regional plant the deck lacks is shuffled into the draw pile. Middle
East closes garbage purchases in Step 1, for Deck 2's garbage/oil hybrids.

Standard-deck setups are unchanged for old and new games. Also stops the
ecological replay test from comparing the transient pendingMessages queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add shuffled power plant decks: all decks, or one per number

powerPlantDeck now also takes 'shuffled' (every plant of the standard deck,
Deck 1 and Deck 2 together) and 'shuffledUnique' (one random copy of each
number, without Deck 1's 52-60). Extra copies are numbered n.1 (Deck 1) and
n.2 (Deck 2), so the market ranks duplicates Deck 2 > Deck 1 > Original and
moves keep identifying plants by number. Cards show the printed number, and
logs read "Power Plant 46 (Deck 2)"; the journal and the deck analysis
parse that label back to the copy.

Bids start at the printed number, the Original discard rule and plug
cards compare it, and each deck's own nuclear plant ends Germany's and
Italy's uranium resupply. The shuffled decks are only offered on maps
whose rules don't name plant numbers; Random still picks a single deck.

Standard-deck setups are unchanged for old and new games.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Offer the shuffled decks on maps with deck-specific rules

The shuffled decks follow all three decks' map rules at once, for the
copies dealt: Deck 1's and Deck 2's plant numbers become n.1 and n.2.
This opens them on Australia, Brazil, Bremen, China, France, India,
Manhattan, Middle East, Recharged Russia, South Africa and Spain &
Portugal.

Exceptions, where the decks' rules clash:
- Northern Europe and Quebec keep the single decks only.
- Original Russia keeps the single decks only (availableDecks now takes
  the variant).
- Original "top of the deck" plants use the standard deck's list.

Spain & Portugal stores the dealt held-back copies in heldPowerPlants
and puts them on top at Step 2. India's shuffled decks keep India's
garbage plants. Map setups deal the sampled deck and split plug cards
with isPlugPlant.

The analysis sampler now copes with shuffled decks: undealt top plants,
protected-plant overflow and plug-count estimates are capped. The
Middle East public replay resets the plant discount before refiltering
its opening market.

Single-deck setups are byte-identical to before for every map,
variant, deck, player count and seed checked.

* Offer the shuffled decks on Northern Europe, Quebec and Original Russia

Where the three decks' rules clash, the shuffled decks now follow each
rule's purpose:

- Northern Europe: each regional plant in play is always dealt. It takes
  the place of one dealt copy of its number, and every other copy leaves
  the game; a regional number that wasn't dealt is shuffled in. This
  also applies once the regions are drafted, which now also updates
  cardsLeft.
- Quebec: one plug card on top of the deck, then the two smallest dealt
  ecological plants not in the market. The Recharged market is drawn
  from the plug cards; the Original market is the eight smallest plants,
  with the standard deck's 13 (if dealt) or else the smallest plug card
  left on top. Ecological plants are never removed.
- Original Russia: the six smallest dealt plants open the market, the
  standard deck's 13 goes on top if dealt, and the 7th and 8th smallest
  plants are shuffled into the top five.

The analysis sampler mirrors all three. Maps can give a `shuffled` deck
note, which the viewer shows for the shuffled decks.

Single-deck setups are unchanged for every map, variant, deck, player
count and seed checked.

* Generate the rules tab's deck build from the deck tables

The rules dialog's "Deck build" section is now built from the same tables
the decks are dealt from (deckChanges.ts and each deck's card list), so
it names the right plants for Deck 1, Deck 2 and the shuffled decks
instead of always the Original deck's. Shuffled games list each rule's
plants as Original deck / Deck 1 / Deck 2, with a sentence explaining
that only the dealt plants count. Player-count lists show the game's
own player count.

Each sentence is a template with plant numbers as {pN} values, rendered
in its own span, so the catalogues translate it whole. The 54 new
templates are translated into all 16 languages; the 20 old deck-build
sentences are removed. The maps' hand-written deckBuild notes are gone.

Tests read the plant numbers back out of the generated text and compare
them with real setups for every map, edition, single deck and player
count, and check that every sentence translates in every language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Describe Central Europe's nuclear and Wien rules

Central Europe had no map rules text, though the engine limits nuclear
plants to players with a city in Czechia, Slovakia or Hungary and gives
a Wien network $1 off garbage (never below $1). The rules dialog now
says so, in all 17 languages, using each catalogue's own name for Wien.

The dialog reads a map's rules from the current map definition rather
than the copy saved in the game, so games already under way see rules
text added later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Outline buildable Bremen districts around the diamond

The blue build hint and the gold region-draft ring were fixed 18-unit
circles, which on Bremen's diamond tiles crossed the entry cost and slot
numbers. Bremen's tiles now get a diamond outline just outside their own
region border instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Begin Step 2 first when the Step 3 card comes early

The rulebooks: if the Step 3 card is drawn before Step 2 has begun,
carry out everything that begins Step 2, then prepare Step 3, back to
back. The engine only did this on UK & Ireland, and without Step 2's
own setup, so on Spain & Portugal the held-back plants never came back.

Step 2's setup (the smallest plant leaves, Spain & Portugal puts its
held-back plants on top, a new plant is drawn) is now one function.
Normal Step 2 uses it unchanged, and an early Step 3 card runs it first:
straight away outside the auction, or at the end of the auction phase
with Step 3's own setup, which then shuffles the draw pile again.
Middle East, China and Manhattan keep their own rules.

New games store step2BeforeStep3; games created earlier replay with
their old sequence.

The rules summary now lists what happens when Step 2 and Step 3 start,
and the early-Step-3 order, in all 17 languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove a stale Manhattan line brought back by the master merge

Merging the fork's older master into combined-deck-rules restored
`const lastPlug = lastPlugPlant(powerPlantDeck)` in Manhattan's setup.
lastPlugPlant isn't imported there and the value is unused, so the
engine build failed and CI went red on the branch and on master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:45:47 -08:00
d381197fdc Release engine 2.0.27 and viewer 2.3.28: correct replay deck counts 2026-11-10 23:20:59 +00:00
2667beccee Release analysis fixes: engine 2.0.25 and viewer 2.3.27 2026-11-10 09:36:25 +00:00
5fc0e22236 Fix interactive analysis cash and manual-seat policy 2026-11-10 08:25:37 +00:00
github-actions
0f0f3eb24d 🔖 powergrid-viewer 2.3.26 2026-11-08 17:16:42 +00:00
goldjohn6
ed4738e2ea
Show the printed price when you are the only buyer left (#167)
In the shuffled decks a plant's extra copies are numbered 13.1 / 13.2, and
the sole-buyer confirmation used that number as the price, so it asked
"Buy Power Plant 13 (Deck 1) for $13.1?". The engine already charges the
printed number (Math.floor), so only the dialog was wrong. Round it down
the same way; the Recharged $1 discount plant is unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 09:13:29 -08:00
github-actions
b06e7f3e66 🔖 powergrid-viewer 2.3.25 2026-11-08 16:53:19 +00:00
github-actions
4e22d0f19c 🔖 powergrid-viewer 2.3.24 2026-11-04 22:17:14 +00:00
MikeIsom
57b7e75f95
Update middleeast.ts Rules (#164)
* Update middleeast.ts Rules

* Translate the Middle East garbage rule in every language

The map's rules text is also its translation key, so the new sentence
("During step 1, garbage cannot be bought.") needs the key and each
translation updated, or every non-English player falls back to English.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: John Gold <goldjohn6@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 14:09:59 -08:00
MikeIsom
75b9d5f69f
Plant Deck Set 1 (#163)
* Count only wind plants as ecological, behind one switch

Benelux's extra market slot and Québec's protected plants now share one
isEcological() helper. Fusion is not ecological unless FUSION_IS_ECOLOGICAL
is flipped. New Benelux and Québec games store the ruling as
options.fusionEcological, so flipping it later only affects new games.

Québec's deck setup used to protect fusion plant 50 while its bureaucracy
and Benelux did not. Games without the stored flag rebuild their Québec
deck the old way via reconstructionOptions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add a power plant deck option with Deck 1, Deck 2 and Random

New games choose a deck with options.powerPlantDeck: standard, deck1 (The
New Power Plants / Set 1, without 52-60), deck2 (Set 2) or random, which
resolves from the seed and stores the result. Only a non-standard deck is
stored.

Deck 1 deals from 01-08 with 11 on top in the Original edition and from
the 01-16 plug cards in Recharged. Deck 1 and Deck 2 are offered on maps
whose setup doesn't name standard-deck plant numbers; the rest fall back
to the standard deck until their per-deck changes land. Germany's uranium
phase-out triggers on 38 (Deck 1) or 37 (Deck 2).

The legacy alternatePowerPlants flag keeps its Europe/North America-only
behaviour and storage, so existing games set up identically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Offer Deck 1 and Deck 2 on every map

Map rules that name plant numbers now look them up per deck in
deckChanges.ts: removed plants, market openers, top-of-deck plants and
Spain & Portugal's Step 2 plants, from the decks' 2024 map-changes sheets.
Map setup and the deck analysis share that table. Original-edition games
use the same numbers, except France with Deck 1, which follows The New
Power Plants rulebook (remove 11).

Australia, India, South Africa, Spain & Portugal and UK & Ireland now use
the shared default setup instead of their own copies. India has a version
of each deck. Italy's uranium phase-out uses Germany's plant per deck.
Northern Europe's regional cards replace the deck's plants by number, and
a regional plant the deck lacks is shuffled into the draw pile. Middle
East closes garbage purchases in Step 1, for Deck 2's garbage/oil hybrids.

Standard-deck setups are unchanged for old and new games. Also stops the
ecological replay test from comparing the transient pendingMessages queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add shuffled power plant decks: all decks, or one per number

powerPlantDeck now also takes 'shuffled' (every plant of the standard deck,
Deck 1 and Deck 2 together) and 'shuffledUnique' (one random copy of each
number, without Deck 1's 52-60). Extra copies are numbered n.1 (Deck 1) and
n.2 (Deck 2), so the market ranks duplicates Deck 2 > Deck 1 > Original and
moves keep identifying plants by number. Cards show the printed number, and
logs read "Power Plant 46 (Deck 2)"; the journal and the deck analysis
parse that label back to the copy.

Bids start at the printed number, the Original discard rule and plug
cards compare it, and each deck's own nuclear plant ends Germany's and
Italy's uranium resupply. The shuffled decks are only offered on maps
whose rules don't name plant numbers; Random still picks a single deck.

Standard-deck setups are unchanged for old and new games.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 13:41:57 -08:00
ddfae0915f Release viewer 2.3.23 with text actions and consistent board controls 2026-11-02 21:04:17 +00:00
8e3e41587b Release viewer 2.3.22 with remaining-card count on the draw pile 2026-11-02 20:32:15 +00:00
776aad8d22 Release viewer 2.3.21: phase-aware skip controls and consistent icon hover 2026-11-01 21:49:04 +01:00
06bb0aebf6 Release viewer 2.3.20: consistent action controls and stable resource previews 2026-11-01 21:28:18 +01:00
fcf31f459e Release viewer 2.3.19 with phase/action pictograms and simpler preferences 2026-11-01 18:52:11 +01:00
github-actions
087d514be4 🔖 powergrid-viewer 2.3.18 2026-11-01 16:26:51 +00:00
goldjohn6
3c6719acaa
Wien garbage never free in Central Europe; UK & Ireland "completely vacant city" wording (#162)
* Never let the Wien discount make garbage free in Central Europe

Both Central Europe rulebooks (Original 2006/2011 and Recharged) give a
player connected to Wien garbage at $1 off "with the stipulation that his
cost per piece may not be 0": from the first space he pays $1. The engine
and the market box subtracted $1 with no floor, so a full market sold
garbage for $0. Engine, available moves and the box now share one price.

Six ended games on the server did buy garbage for $0. A game whose log
already shows such a buy is rebuilt with the old discount
(reconstructionOptions), so history and analysis replay them as played;
no live game has one, so they all get the floor from their next buy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Say UK & Ireland island jumps need a completely vacant city

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reword the UK & Ireland jump rule in every language

"An EMPTY spot" read like a free slot in an occupied city; the engine only
allows a jump to a city with no houses at all. Re-keys the 17 catalogues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 08:20:20 -08:00
github-actions
bf4433dd84 🔖 powergrid-viewer 2.3.17 2026-10-31 16:46:35 +00:00
goldjohn6
aa29b7cf7c
Recharged starting garbage for Brazil and France. (#161)
* Start France and Brazil Recharged with garbage on spaces 6-8

Both Recharged rulebooks fill garbage (biogas in Brazil) on spaces 6-8, i.e.
9 tokens, but the maps' single startingResources array held the Original
count of 6 for both variants. startingResources can now name each variant.

Games created before this keep their original market when rebuilt: setup
records rechargedStartingResources for new games, and replay/reconstructState
treat a missing flag as the old behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Format PlayerBoard.vue with Prettier

Whitespace only; master's prettier check has failed on this file since 3adad0c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:39:44 -07:00
3adad0cc0d Release auction auto-pass with a personal player-card setting 2026-10-26 20:42:38 +01:00
22d4a0b80c Release viewer 2.3.14 with stable board layout and readable player column 2026-10-25 14:09:57 +01:00
295d50da8b Add optional Recharged plant discount cutoff at Step 3 2026-10-24 21:51:58 +02:00
ee31b0be68 Show regional power plants correctly in the journal 2026-10-24 21:46:17 +02:00
537e41e318 Add hand-authored Simplified Chinese game localization 2026-10-20 14:12:18 +02:00
github-actions
4873f48657 🔖 powergrid-viewer 2.3.11 2026-10-19 19:40:20 +00:00
goldjohn6
3f9295292a
Make Bremen easier to read: larger district tiles and a tighter board (#160)
Amy (70s eyes) found Bremen's district text hard to read.

- Viewer: every part of a node-weighted district tile scales by one factor
  (TILE_SCALE = 1.3): the diamond, house slots, slot numbers, entry-cost coin
  and the houses placed in them, so the pieces keep their relative places.
- Engine: Blumenthal, Vegesack and Burglesum move down and right (placed with
  the coord picker), which narrows the board so the adaptive layout zooms it
  in. Hofen moves down 20 so the Burglesum-Seehausen link no longer clips it.
  Adjacency and rules are unchanged; only x/y move.
- Geography: Bremen's outline is regenerated from the updated anchors, so the
  land follows the new positions. Other maps' assets are untouched.

New district positions reach new games only (map data is stored at setup);
the larger tiles reach every game on reload.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:32:33 -07:00
a28bf041c0 Refresh custom player colours when live preferences change 2026-10-17 22:52:37 +02:00
464b8e5d88 Use custom BGS colours without replacing other players' colour choices 2026-10-17 22:49:03 +02:00
287343f11c Release viewer 2.3.8 preserving custom BGS colours after colour selection 2026-10-17 22:35:40 +02:00
github-actions
ef972c74fc 🔖 powergrid-viewer 2.3.7 2026-10-12 03:02:02 +00:00
mmunson99
c50b5951a1
Add an alternate power plant deck option for Europe and North America (#159)
* Add an alternate power plant deck option for Europe and North America

New game option `alternatePowerPlants`. On the Europe and North America maps it
replaces the standard deck with the alternate deck: same card numbers, new
fuels and outputs. The option is ignored on every other map.

The deck adds a garbage/oil hybrid plant type (plants 8, 22 and 35). It burns
any mix of garbage and oil and has one shared storage tank, like the coal/oil
hybrid. Buying, storage, discarding, powering and end-game scoring all handle
the shared tank. Players without that plant keep the existing coal/oil logic
unchanged, and games without the option keep their exact state shape.

* Draw alternate-deck plants in the journal from the alternate deck

The journal drew every plant through getPowerPlant(number, mapName), which
only knew the India and standard catalogues. In an alternate-deck game the
journal showed the standard card for each number: 22 appeared as a wind 2,
27 as a wind 3 and 33 as a wind 4.

getPowerPlant now looks plants up through plantCatalogue, so it takes an
alternatePowerPlants flag. The journal passes the game's option through.
Every other caller passes no flag and gets the same card as before.

Found in a hand playtest of this PR on Europe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: John Gold <goldjohn6@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:55:02 -07:00
aac09f231d Release viewer 2.3.6 with mobile resource buying and refill previews 2026-10-10 10:26:33 +02:00
e90041904b Offer "Undo my move" in games against bots
BGS lets the only human of a game against bots take back their last saved
move (protocol 0.10.0 `undo:available` / `undo`). The board's Undo button
offers it once the turn in progress has nothing left to undo locally, and
never during replays, analyses or round planning, for spectators, or while a
move is on its way. A double click on Undo cannot reach it.

BGS then sends the earlier state. A committed state that takes back the
player's own moves drops the turn buffer, a bid being edited, open dialogs,
a hybrid plant's fuel choice and the bid dialled into the calculator.

The label is translated in all 16 languages. Unit tests and the protocol
browser smoke cover the control, and the development sandbox mimics BGS's
undo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:41:51 +02:00
6555a17222 Repair the viewer build and formatting checks
The viewer lockfile still pinned @babel/preset-env 7.14, which rejects the
plugin names babel.config.js has listed since 126de02: a clean install could
not build the viewer, and Viewer - Test has failed since then. Lock the
versions the viewer on BGS was built with instead. With them, ca9882a rebuilds
the published viewer (game version 13) byte for byte. The lockfile keeps its
lockfileVersion 5.4 Prettier layout.

Also sorts the imports of two unit tests, as the Prettier check requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:15:45 +02:00
ca9882a5c9 Show building capacity only on the viewing player turn 2026-10-06 16:20:47 +02:00
3e7abbbebc Show plant power capacity on the city track during building 2026-10-06 16:14:48 +02:00
55581e0f6d Use consistent outlined ownership symbols for all house markers 2026-10-05 18:36:07 +02:00
48ae6ee863 Enlarge and center map ownership symbols with white outlines 2026-10-05 18:31:44 +02:00
b597ae7b33 Keep desktop cities readable by allowing taller boards 2026-10-05 16:40:33 +02:00