diff --git a/.prettierignore b/.prettierignore
index 2043feb..12466d7 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -12,3 +12,7 @@ viewer/scripts/geography/*.json
viewer/src/geography/assets/*.json
viewer/src/geography/names.json
viewer/src/geography/loaders.ts
+
+# Achievement artwork manifest (written by scripts/generate-achievement-art.py) and release receipts, kept as recorded.
+art/achievements/manifest.json
+docs/releases/*.json
diff --git a/art/achievements/PROVENANCE.md b/art/achievements/PROVENANCE.md
index 83e5a12..693657c 100644
--- a/art/achievements/PROVENANCE.md
+++ b/art/achievements/PROVENANCE.md
@@ -30,32 +30,46 @@ The exact window, component count, principal span and simplification policy are
recorded per badge in `manifest.json`; it hashes the source and framing code.
The component count is after the documented window and small-islet filtering.
-| Map | Main-region selection / deliberate omissions | Components |
-| --- | --- | --- |
-| germany | Germany mainland; omit subpixel coastal islets. | 2 |
-| america | Contiguous USA; omit Alaska, Hawaii and overseas islands. | 1 |
-| france | Metropolitan France including Corsica; omit overseas departments. | 2 |
-| japan | Four main islands in true geographic positions; omit remote Ryukyu/Bonin chain. | 5 |
-| brazil | Continental Brazil; omit subpixel offshore islands. | 2 |
-| spainportugal | Iberian mainland and Balearics; omit Azores, Madeira and Canaries. | 2 |
-| indian | Indian mainland; omit Andaman/Nicobar and Lakshadweep islets. | 1 |
-| italy | Peninsula, Sicily and Sardinia; omit subpixel islets. | 3 |
-| quebec | Whole Quebec mainland, not just the southern city corridor. | 3 |
-| middleeast | Authored Middle East country union; omit distant/subpixel islands. | 1 |
-| china | Mainland and Hainan from curated active geometry. | 2 |
-| benelux | Belgium, Netherlands and Luxembourg union; omit subpixel islets. | 2 |
-| russia | Russian mainland to Bering Strait; omit dateline fragments and Arctic archipelagos below size cutoff. | 4 |
-| centraleurope | Complete authored Central Europe country union. | 1 |
-| badenwurttemberg | Complete Baden-Wuerttemberg provincial outline. | 1 |
-| northerneurope | Scandinavian/Baltic mainland and major Danish islands; omit Svalbard and remote Arctic islands. | 5 |
-| korea | Korean peninsula and Jeju; omit subpixel islets. | 2 |
-| europe | European mainland to 45E plus Britain/Ireland and major Mediterranean islands; omit overseas territories and remote Arctic islands. | 4 |
-| northamerica | Continental North America including Alaska, Canada and Mexico; omit Hawaii and far Arctic islands. | 7 |
-| southafrica | South African mainland; omit remote Prince Edward islands. | 1 |
-| ukireland | Great Britain and Ireland, with larger coastal islands. | 6 |
-| australia | Australian mainland and Tasmania; omit external Indian/Pacific Ocean territories. | 2 |
-| bremen | Bremen city component; omit detached Bremerhaven to preserve city silhouette. | 1 |
-| manhattan | Manhattan main island; omit tiny detached borough islets. | 5 |
+| Map | Main-region selection / deliberate omissions | Components |
+| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------- |
+| germany | Germany mainland; omit subpixel coastal islets. | 2 |
+| america | Contiguous USA; omit Alaska, Hawaii and overseas islands. | 1 |
+| france | Metropolitan France including Corsica; omit overseas departments. | 2 |
+| japan | Four main islands in true geographic positions; omit remote Ryukyu/Bonin chain. | 5 |
+| brazil | Continental Brazil; omit subpixel offshore islands. | 2 |
+| spainportugal | Iberian mainland and Balearics; omit Azores, Madeira and Canaries. | 2 |
+| indian | Indian mainland; omit Andaman/Nicobar and Lakshadweep islets. | 1 |
+| italy | Peninsula, Sicily and Sardinia; omit subpixel islets. | 3 |
+| quebec | Whole Quebec mainland, not just the southern city corridor. | 3 |
+| middleeast | Authored Middle East country union; omit distant/subpixel islands. | 1 |
+| china | Mainland and Hainan from curated active geometry. | 2 |
+| benelux | Belgium, Netherlands and Luxembourg union; omit subpixel islets. | 2 |
+| russia | Russian mainland to Bering Strait; omit dateline fragments and Arctic archipelagos below size cutoff. | 4 |
+| centraleurope | Complete authored Central Europe country union. | 1 |
+| badenwurttemberg | Complete Baden-Wuerttemberg provincial outline. | 1 |
+| northerneurope | Scandinavian/Baltic mainland and major Danish islands; omit Svalbard and remote Arctic islands. | 5 |
+| korea | Korean peninsula and Jeju; omit subpixel islets. | 2 |
+| europe | European mainland to 45E plus Britain/Ireland and major Mediterranean islands; omit overseas territories and remote Arctic islands. | 4 |
+| northamerica | Continental North America including Alaska, Canada and Mexico; omit Hawaii and far Arctic islands. | 7 |
+| southafrica | South African mainland; omit remote Prince Edward islands. | 1 |
+| ukireland | Great Britain and Ireland, with larger coastal islands. | 6 |
+| australia | Australian mainland and Tasmania; omit external Indian/Pacific Ocean territories. | 2 |
+| bremen | Bremen city component; omit detached Bremerhaven to preserve city silhouette. | 1 |
+| manhattan | Manhattan main island; omit tiny detached borough islets. | 5 |
+
+## Chile Champion (revision 4)
+
+Chile's outline is Natural Earth 1:50m admin-0 Chile (the same public-domain
+release as above), stored on its own in `viewer/scripts/geography/chile-badge.json`
+because Chile has no entry in `source.json`. Its window is the stretch on the
+board, Arica to Puerto Montt (lon -76..-66, lat -43..-17). The true outline is
+too thin to read at badge size (under 1% silhouette ink at 32px against the
+2.5% floor), so, as on the game board, it is widened 2x east-west and turned
+40 degrees (`SHAPES` in `scripts/achievement-map-framing.py`); then it is fitted,
+filtered and simplified exactly like the other 24. Its PNG was rasterised with
+headless Chromium at 256px on a transparent page because CairoSVG's system Cairo
+was not available; re-running the generator with CairoSVG re-renders it. The
+other 36 PNGs are unchanged.
These existing game-map geographic datasets are derived from:
diff --git a/art/achievements/achievement-chile-champion.png b/art/achievements/achievement-chile-champion.png
new file mode 100644
index 0000000..8b06ece
Binary files /dev/null and b/art/achievements/achievement-chile-champion.png differ
diff --git a/art/achievements/achievement-chile-champion.svg b/art/achievements/achievement-chile-champion.svg
new file mode 100644
index 0000000..0dea0e7
--- /dev/null
+++ b/art/achievements/achievement-chile-champion.svg
@@ -0,0 +1 @@
+
diff --git a/art/achievements/contact-32.png b/art/achievements/contact-32.png
index 61ddf11..4f47c61 100644
Binary files a/art/achievements/contact-32.png and b/art/achievements/contact-32.png differ
diff --git a/art/achievements/contact-48.png b/art/achievements/contact-48.png
index 5a113c0..7cceb3f 100644
Binary files a/art/achievements/contact-48.png and b/art/achievements/contact-48.png differ
diff --git a/art/achievements/contact-64.png b/art/achievements/contact-64.png
index 25702d3..f327b44 100644
Binary files a/art/achievements/contact-64.png and b/art/achievements/contact-64.png differ
diff --git a/art/achievements/manifest.json b/art/achievements/manifest.json
index 9701be7..4ecbc66 100644
--- a/art/achievements/manifest.json
+++ b/art/achievements/manifest.json
@@ -1,10 +1,10 @@
{
"game": "powergrid",
- "engine": "2.0.34",
- "revision": 3,
+ "engine": "2.0.35",
+ "revision": 4,
"provenance": "PROVENANCE.md",
- "framingSha256": "516883e4548988a28caf6c7cf1902090881700d77276c51e11c40140bb9178cf",
- "generatorSha256": "147ac3464fe309461fd9efff3d1f9b31a2b11f424ed0dd820a0689b3bc52b78d",
+ "framingSha256": "071ea76615673dd34cd2af9ff7b87ed02271372e6c36efd2f7262d76c6c985ad",
+ "generatorSha256": "414ec598073e0eee413f5c9d4e9fba81f412b3684cfb16c9132d6810feeac47c",
"assets": [
{
"id": "grid-champion",
@@ -729,6 +729,37 @@
"minRelativeArea": 0.003
}
},
+ {
+ "id": "chile-champion",
+ "key": "achievement-chile-champion",
+ "svg": "achievement-chile-champion.svg",
+ "png": "achievement-chile-champion.png",
+ "sha256": "d33ad797fbe4e50b76a07e8f22c733a9e56ffb49e98b3c421c8f10ab5aa9df8d",
+ "source": "viewer/scripts/geography/chile-badge.json",
+ "sourceSha256": "b476e8800aca03e3de2144cb686a9d45527a38dcfe9bd767e3419f23e445fb7b",
+ "map": "chile",
+ "framing": {
+ "window": [
+ -76,
+ -43,
+ -66,
+ -17
+ ],
+ "reason": "Chile from Arica to Puerto Montt, the stretch on the board; widened 2x east-west and turned 40 degrees, as on the board, so the thin country reads at badge size.",
+ "components": 2,
+ "bounds": [
+ 42.72489130315381,
+ 30.999999999999993,
+ 85.27510869684625,
+ 108.99999999999999
+ ],
+ "principalSpan": 73.15246079580555,
+ "simplifyTolerance": 0.45,
+ "minRelativeArea": 0.003,
+ "widen": 2,
+ "turn": -40
+ }
+ },
{
"id": "power-fifteen",
"key": "achievement-power-fifteen",
diff --git a/docs/achievements.md b/docs/achievements.md
index 3734d28..e102bb6 100644
--- a/docs/achievements.md
+++ b/docs/achievements.md
@@ -1,5 +1,7 @@
# Power Grid achievements
+**Revision 4 (this fork, not yet published): 37 achievements.** Adds `chile-champion` (Chile Champion, "Win on the Chile map.") after the other map badges, for the Chile map now in testing. The 36 published definitions, their order around it, and the evaluator are otherwise unchanged; `engine/scripts/check-achievements.mjs` checks exactly that against the revision-2 receipt. Its badge art is described in `art/achievements/PROVENANCE.md`. Everything below describes the published revision 2.
+
**Published: engine 2.0.33, manifest revision 2, 36 achievements.** Adds 20 map victories (24 total) and raises Fully Supplied from a 10-city to a 15-city minimum, preserving its complete-network condition. The separate powered-city tiers remain 15 and 18. No viewer, artwork, map-cap, scoring, or backfill changes. Existing awards are not recalculated or revoked by this change.
Independent review approved `2f89876`; publication and installer verification are recorded in `docs/releases/achievements-2.0.33.json`. The previous revision-1 release receipt remains in `docs/releases/achievements-2.0.32.json`.
@@ -66,6 +68,7 @@ Each entry is **Win on the named map**, including shared first place, never mere
| Australia | `australia-champion` |
| Bremen | `bremen-champion` |
| Manhattan | `manhattan-champion` |
+| Chile (revision 4) | `chile-champion` |
| Japan | `japan-champion` |
Names are matched exactly against resolved `data.map.name`; `options.map` is not consulted. Random selection therefore earns the resolved map badge. Original and Recharged share an ID, as do deck/region variants on the same named map. USA is not an alias for North America. Internal module names such as `america`/`indian`, translations, accent-stripped names, and unsupported names are not accepted map aliases. Explicit ASCII IDs omit ampersands and transliterate ü to u, without runtime slug generation.
diff --git a/docs/maps/chile-map.png b/docs/maps/chile-map.png
new file mode 100644
index 0000000..08b913c
Binary files /dev/null and b/docs/maps/chile-map.png differ
diff --git a/docs/maps/chile.md b/docs/maps/chile.md
new file mode 100644
index 0000000..2494c82
--- /dev/null
+++ b/docs/maps/chile.md
@@ -0,0 +1,129 @@
+# Power Grid — Chile
+
+_The map of Chile can only be played with a copy of Power Grid or Power Grid (Recharged Version)._
+
+The rules of Power Grid remain the same, except for the following modifications and special features of the Chile map.
+
+---
+
+## Introduction
+
+For most of its history, Chile ran on two separate grids. The Norte Grande grid ran from Arica to Antofagasta and powered the copper mines of the Atacama Desert. The Central grid powered the rest of the country, reaching north into the Atacama Region as far as Taltal. In the mid-2000s, Argentina cut off the gas that both grids depended on. The two grids were finally joined in 2017, as solar power took off in the desert.
+
+In this version of the game, the players start out on two separate grids, each with its own resource market. Chile has no nuclear power. In Step 3 the grids are joined: the markets merge, the connections between the grids open, and the great solar plants of the Atacama come online.
+
+---
+
+## The Map
+
+Every city on the map belongs to one of the two grids: the **North grid** or the **Central grid**. The grid of a city is shown on the map. The two northern regions reach south across the divide, so each of them has cities in both grids.
+
+| Region | North grid | Central grid |
+| --------------------------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
+| Northern coast (brown) | Arica, Iquique, Tocopilla, Mejillones, Antofagasta | Taltal, Chañaral |
+| Atacama Desert (yellow) | Pozo Almonte, María Elena, Calama, San Pedro, Sierra Gorda | El Salvador, Copiapó |
+| Norte Chico (purple) | — | Caldera, Huasco, Vallenar, La Serena, Ovalle, Los Vilos, Illapel |
+| Santiago & Valparaíso (red) | — | Los Andes, Viña del Mar, Quillota, Santiago N, Valparaíso, Santiago W, San Antonio, Melipilla |
+| Central Valley (green) | — | Santiago E, Santiago S, Rancagua, Curicó, San Fernando, Talca, Chillán |
+| Biobío & the South (pink) | — | Santa Cruz, Constitución, Cauquenes, Concepción, Los Ángeles, Temuco, Valdivia, Puerto Montt |
+
+**Gates:** the grids are joined only by two gated connections, one in each northern region:
+→ **Antofagasta – Taltal** (Northern coast), cost 13.
+→ **Sierra Gorda – El Salvador** (Atacama Desert), cost 20.
+
+**Greater Santiago:** Santiago N, Santiago E, Santiago S and Santiago W are joined in a ring of connections that cost 0. The ring is split between the red and green regions.
+
+**Border spaces:** three spaces lie across the borders of the North, outside every region. They belong to the North grid.
+→ **Salta** (Argentina), connected to San Pedro: always in play.
+→ **Jujuy** (Argentina), connected to San Pedro: with 4–6 players only.
+→ **Tacna** (Peru), connected to Arica: with 4–6 players only.
+
+---
+
+## Preparation
+
+**Play areas:** the Northern coast (brown) and the Atacama Desert (yellow) are always in play. Choose the remaining regions as usual, each connected to the regions already in play:
+→ **with 2 and 3 players:** brown, yellow, purple.
+→ **with 4 players:** brown, yellow, purple, red.
+→ **with 5 and 6 players:** brown, yellow, purple, red, and green or pink.
+
+With 2 and 3 players, Tacna and Jujuy are not in play.
+
+**Power plants:** Chile has no nuclear power. Remove all uranium power plants from the game and place them in the box. Then set aside the three largest ecological power plants; they enter the game in Step 3.
+
+| Power plant deck | Remove (uranium) | Set aside (ecological) |
+| ------------------------ | ---------------------- | ---------------------- |
+| Standard | 11, 17, 23, 28, 34, 39 | 33, 37, 44 |
+| New Power Plants, deck 1 | 8, 19, 24, 31, 38, 50 | 32, 39, 44 |
+| New Power Plants, deck 2 | 13, 21, 32, 37, 50 | 31, 36, 44 |
+
+> **Important:** do not remove any further power plants for the number of players.
+
+**Resource markets:** Chile has two separate resource markets, one for the North grid and one for the Central grid. Fill the following spaces:
+→ **North:** coal - all spaces, oil - all spaces. The North market has no garbage.
+→ **Central:** coal - all spaces, oil - spaces 4–8, garbage - spaces 7–8.
+
+The remaining resources form one supply, shared by both markets. No uranium is used.
+
+**Gates:** place a Step 3 marker on each of the two gated connections.
+
+---
+
+## Phase 3: Buying Resources
+
+Until Step 3, each player may only buy resources from the market of the grid their cities are in. Because only the gates join the two grids, all of a player's cities are in the same grid until Step 3.
+
+> **Important:** a player with no cities (as in the first round) chooses one of the two markets and makes all of their purchases for the round from that market.
+
+If the market a player buys from has no more of a resource they want, they cannot buy that resource this round. North players cannot buy garbage until Step 3.
+
+---
+
+## Phase 4: Building
+
+**Gates:** no player may build across a gated connection until Step 3.
+
+**Border spaces:** each border space holds only one city. Building there costs the connection plus 10 Elektro, the same as a first house in any city.
+
+> **Important:** no player may build their first city in a border space.
+
+---
+
+## Phase 5: Bureaucracy
+
+Restock the **North market first**, then the **Central market**, from the shared supply, using the resource refill table below. If the supply runs short, the North market is filled first as far as possible.
+
+> **Important:** garbage is only restocked in the Central market. In Step 2, oil is restocked 1 per market regardless of the number of players.
+
+---
+
+## Step 3
+
+When Step 3 begins, carry it out as usual. Then:
+
+1. **Merge the markets.** Take all resources from both markets and place them on the standard resource market, filling it from the most expensive spaces. From now on there is only one market, restocked using the Step 3 column of the refill table.
+2. **Open the gates.** Remove the Step 3 markers. Players may now build across the gated connections, and may buy from the merged market wherever their cities are.
+3. **Add Atacama solar.** Place the three set-aside ecological power plants on top of the power plant supply.
+4. **Boost ecological plants.** For the rest of the game, every ecological power plant powers one more city than printed.
+
+> **Important:** the fusion power plant does not get the extra city.
+
+---
+
+## Resource Refill
+
+In Steps 1 and 2, the first number restocks the North market and the second number the Central market. Garbage always goes to the Central market. In Step 3, there is only one market.
+
+| Players | Coal (Step 1 / 2 / 3) | Oil (Step 1 / 2 / 3) | Garbage (Step 1 / 2 / 3) |
+| ------- | --------------------- | -------------------- | ------------------------ |
+| 2 | 2+2 / 3+3 / 4 | 1+1 / 1+1 / 4 | 1 / 2 / 4 |
+| 3 | 1+3 / 3+3 / 4 | 1+1 / 1+1 / 4 | 1 / 2 / 4 |
+| 4 | 2+3 / 3+4 / 5 | 1+2 / 1+1 / 5 | 2 / 3 / 5 |
+| 5 | 2+3 / 3+5 / 4 | 2+2 / 1+1 / 5 | 3 / 3 / 4 |
+| 6 | 3+4 / 4+6 / 6 | 2+3 / 1+1 / 7 | 3 / 5 / 6 |
+
+_Example: with 3 players in Step 1, restock 1 coal and 1 oil in the North market, then 3 coal, 1 oil and 1 garbage in the Central market._
+
+---
+
+_Chile — map design by Mike Isom. Draft for playtesting._
diff --git a/engine/scripts/check-achievements.mjs b/engine/scripts/check-achievements.mjs
index c06c1e9..185566b 100644
--- a/engine/scripts/check-achievements.mjs
+++ b/engine/scripts/check-achievements.mjs
@@ -7,15 +7,17 @@ import wrapper from '../dist/wrapper.js';
// entry point, not local copies of the contract or TypeScript-only assertions.
const manifest = wrapper.achievementDefinitions();
achievementManifestSchema.parse(manifest);
-assert.equal(manifest.revision, 3);
-assert.equal(manifest.achievements.length, 36);
+assert.equal(manifest.revision, 4);
+assert.equal(manifest.achievements.length, 37);
const previous = JSON.parse(
readFileSync(new URL('../../docs/releases/achievements-2.0.33.json', import.meta.url), 'utf8')
).achievementManifest;
const artwork = JSON.parse(readFileSync(new URL('../../art/achievements/manifest.json', import.meta.url), 'utf8'));
+// Revision 4 only adds Chile Champion, after the other map badges; the 36 published definitions are unchanged.
+const added = { id: 'chile-champion', name: 'Chile Champion', description: 'Win on the Chile map.' };
assert.deepEqual(
manifest.achievements.map(({ icon, ...definition }) => definition),
- previous.achievements
+ [...previous.achievements.slice(0, 27), added, ...previous.achievements.slice(27)]
);
assert.deepEqual(
manifest.achievements.map(({ id }) => id),
diff --git a/engine/src/achievements.spec.ts b/engine/src/achievements.spec.ts
index 789dd32..9bcc523 100644
--- a/engine/src/achievements.spec.ts
+++ b/engine/src/achievements.spec.ts
@@ -39,6 +39,7 @@ const ids = [
'australia-champion',
'bremen-champion',
'manhattan-champion',
+ 'chile-champion',
'power-fifteen',
'power-eighteen',
'fully-supplied',
@@ -76,6 +77,7 @@ const mapBadges: [MapName, string][] = [
['Australia', 'australia-champion'],
['Bremen', 'bremen-champion'],
['Manhattan', 'manhattan-champion'],
+ ['Chile', 'chile-champion'],
];
// Deliberately synthetic final positions: setup supplies the complete state shape,
@@ -112,11 +114,11 @@ function freezeDeep(value: unknown) {
describe('achievements', function () {
this.timeout(30000);
- it('publishes all 36 stable IDs in a fresh revisioned manifest', () => {
+ it('publishes all 37 stable IDs in a fresh revisioned manifest', () => {
const manifest = achievementDefinitions();
- expect(manifest.revision).to.equal(3);
+ expect(manifest.revision).to.equal(4);
expect(manifest.achievements.map((a) => a.id)).to.deep.equal(ids);
- expect(new Set(ids).size).to.equal(36);
+ expect(new Set(ids).size).to.equal(37);
manifest.achievements.forEach((a) => {
expect(a.name).to.be.a('string').and.not.equal('');
expect(a.description).to.be.a('string').and.not.equal('');
@@ -132,9 +134,9 @@ describe('achievements', function () {
['original', maps],
['recharged', mapsRecharged],
] as const) {
- it(`${variant} runtime maps exactly match the 24 supported badge names`, () => {
- expect(mapBadges).to.have.length(24);
- expect(new Set(mapBadges.map(([name]) => name)).size).to.equal(24);
+ it(`${variant} runtime maps exactly match the 25 supported badge names`, () => {
+ expect(mapBadges).to.have.length(25);
+ expect(new Set(mapBadges.map(([name]) => name)).size).to.equal(25);
expect(runtimeMaps.map((map) => map.name).sort()).to.deep.equal(mapBadges.map(([name]) => name).sort());
});
diff --git a/engine/src/achievements.ts b/engine/src/achievements.ts
index 0fd4d16..11eb0f8 100644
--- a/engine/src/achievements.ts
+++ b/engine/src/achievements.ts
@@ -29,6 +29,7 @@ const mapAchievements: Record = {
Australia: 'australia-champion',
Bremen: 'bremen-champion',
Manhattan: 'manhattan-champion',
+ Chile: 'chile-champion',
};
const definitions: AchievementDefinition[] = [
@@ -79,7 +80,7 @@ const definitions: AchievementDefinition[] = [
export function achievementDefinitions(): AchievementManifest {
// A host may cache or modify its copy without changing future evaluations.
return {
- revision: 3,
+ revision: 4,
achievements: definitions.map((definition) => ({
...definition,
icon: { type: 'asset', key: `achievement-${definition.id}` },
diff --git a/engine/src/analysis.ts b/engine/src/analysis.ts
index f9cb74e..f6a9b92 100644
--- a/engine/src/analysis.ts
+++ b/engine/src/analysis.ts
@@ -10,6 +10,7 @@ import {
} from './deckChanges';
import { defaultSetupDeck, reconstructState, setup, stripSecret } from './engine';
import { GameState, PowerPlant, PowerPlantType, SingleDeck } from './gamestate';
+import { chileSetAsideFromLog } from './maps/chile';
import { gameDeck, isEcological, isPlugPlant, labelledPlant, plantCatalogue, PLANT_LABEL_PATTERN } from './powerPlants';
import { shuffle } from './utils';
@@ -46,6 +47,15 @@ export function createAnalysisScenario(
if (name === 'Spain & Portugal' && s.step !== 1)
excluded = held ? spainStep2Plants(powerPlantDeck).filter((number) => !held.includes(number)) : [];
if (name === 'Manhattan') excluded = [99, ...excluded];
+ // Chile: three ecological plants are set aside (in s.setAsidePlants) until Step 3; removedPlants has its uranium
+ // plants.
+ const chileSetAside =
+ name !== 'Chile'
+ ? []
+ : s.setAsidePlants?.map((pp) => pp.number) ??
+ chileSetAsideFromLog(s.log as { type: string; event?: string }[]) ??
+ [];
+ if (s.step < 3) excluded = [...excluded, ...chileSetAside];
const catalogue = JSON.parse(JSON.stringify(plantCatalogue(name, powerPlantDeck))) as PowerPlant[];
for (const region of new Set(s.regionDraft ? [] : s.map.cities.map((c) => c.region))) {
for (const replacement of s.map.regionalPowerPlants?.[region] || []) {
@@ -59,6 +69,12 @@ export function createAnalysisScenario(
else catalogue.splice(catalogue.length - 1, 0, { ...replacement });
}
}
+ // Chile, Step 3: every ecological plant powers one more city.
+ if (name === 'Chile' && s.step === 3) {
+ catalogue.forEach((p) => {
+ if (p.type === PowerPlantType.Wind) p.citiesPowered++;
+ });
+ }
const byNumber = (number: number) => catalogue.find((p) => p.number === number)!;
const seen = new Set([...s.knownPowerPlantDeck, ...s.knownPowerPlantDeckStep3].map((p) => p.number));
const bottom: number[] = [];
@@ -123,7 +139,8 @@ export function createAnalysisScenario(
// One per number: a copy already known rules out the number's other copies, and
// each still-unknown number is in the game exactly once.
if (powerPlantDeck === 'shuffledUnique') {
- const known = new Set([...seen, ...unavailable, ...fixedBottom]);
+ // Chile's set-aside copies are known too: out of the deck until Step 3, then on top of it.
+ const known = new Set([...seen, ...unavailable, ...fixedBottom, ...chileSetAside]);
const knownPrinted = new Set([...known].map((number) => Math.floor(number)));
const unknown = (p: PowerPlant) => p.number !== 99 && !known.has(p.number);
pool = pool.filter((p) => !unknown(p) || !knownPrinted.has(Math.floor(p.number)));
@@ -180,6 +197,10 @@ export function createAnalysisScenario(
for (const number of held ?? SPAIN_STEP_2_PLANTS[powerPlantDeck as SingleDeck])
if (!seen.has(number)) fixedTop.push(number);
}
+ if (name === 'Chile' && s.step === 3) {
+ // The set-aside plants went on top of the deck in this order when Step 3 began.
+ for (const number of chileSetAside) if (!seen.has(number)) fixedTop.push(number);
+ }
const top = fixedTop
.map(byNumber)
.filter((p) => candidates.some((c) => c.number === p.number))
diff --git a/engine/src/available-moves.ts b/engine/src/available-moves.ts
index ab86fb3..c40c863 100644
--- a/engine/src/available-moves.ts
+++ b/engine/src/available-moves.ts
@@ -52,6 +52,18 @@ export interface AvailableMoves {
[MoveName.Pass]?: boolean[];
}
+/**
+ * Chile, while it has two markets (before Step 3): the market a player with cities must buy from, the one of the
+ * grid their cities are in. The grid belongs to each city, not to its region. Undefined on every other map, and for a
+ * player with no cities, who chooses a market for the turn as on Korea. Before Step 3 only the gates join the grids,
+ * so a player's cities are all in one grid.
+ */
+export function marketSideOf(G: GameState, player: Player): 'north' | 'south' | undefined {
+ if (G.map.name != 'Chile' || G.coalResupplyNorth === undefined || player.cities.length == 0) return undefined;
+ const inNorth = player.cities.some((pc) => G.map.cities.find((c) => c.name == pc.name)?.grid == 'North');
+ return inNorth ? 'north' : 'south';
+}
+
/**
* Which of coal and oil the player is holding more of than they can store.
*
@@ -360,8 +372,10 @@ export function availableMoves(G: GameState, player: Player): AvailableMoves {
// Korea: each side is offered separately, tagged with the side. The
// player's chosenSide locks them to one side once they make a buy.
const isKorea = G.coalResupplyNorth !== undefined;
- const allowSouth = !isKorea || G.chosenSide !== 'north';
- const allowNorth = isKorea && G.chosenSide !== 'south';
+ // Chile (until Step 3, while it has two markets): a player with cities buys only from their grid's market.
+ const side = (isKorea && marketSideOf(G, player)) || G.chosenSide;
+ const allowSouth = !isKorea || side !== 'north';
+ const allowNorth = isKorea && side !== 'south';
// Room for one more cube. A garbage/oil hybrid shares oil with a second
// tank, so its owner goes through the general check; everyone else keeps
@@ -706,8 +720,9 @@ export interface RegionGraph {
// setup picker and the chooseRegions draft). Single source of truth so the two
// paths can never diverge on what "connected" means.
export function computeRegionGraph(map: Pick): RegionGraph {
+ // A city in no region (Chile's Salta) is not a play area.
const regions = map.cities
- .filter((c, i) => map.cities.findIndex((cc) => cc.region == c.region) == i)
+ .filter((c, i) => c.region && map.cities.findIndex((cc) => cc.region == c.region) == i)
.map((c) => c.region);
const connections = map.connections.map((con) =>
con.nodes.map((n) => map.cities.find((city) => city.name == n)!.region)
@@ -948,7 +963,11 @@ export function buildOptions(G: GameState, player: Player): { name: string; pric
}
if (player.cities.find((c) => c.name == city.name)) {
city.price = 9999;
+ return;
}
+ // Chile's border spaces also pay a house ($10), given as their one slot cost. South Africa's spaces
+ // have no slot costs and stay connection-only.
+ city.price += cityData.slotCosts?.[0] ?? 0;
return;
}
diff --git a/engine/src/chile.spec.ts b/engine/src/chile.spec.ts
new file mode 100644
index 0000000..1d846ce
--- /dev/null
+++ b/engine/src/chile.spec.ts
@@ -0,0 +1,900 @@
+import { expect } from 'chai';
+import { cloneDeep } from 'lodash';
+import 'mocha';
+import seedrandom from 'seedrandom';
+import { createAnalysisScenario } from './analysis';
+import { availableMoves, computeRegionGraph, marketSideOf } from './available-moves';
+import { applyChileStep3, currentPlayers, ended, move, reconstructState, setup, stripSecret } from './engine';
+import { GameState, Phase, PowerPlant, PowerPlantType, ResourceType } from './gamestate';
+import { map as chile } from './maps/chile';
+import { Move, MoveName } from './move';
+import { alternatePowerPlants, deck1PowerPlants, isPlugPlant, plantCatalogue, powerPlants } from './powerPlants';
+import prices from './prices';
+
+const URANIUM = [11, 17, 23, 28, 34, 39];
+const SET_ASIDE = [33, 37, 44];
+const NORTH = ['brown', 'yellow'];
+
+/** Plays seeded legal-random moves (never ReopenPowering) until `stop` holds or the game ends. */
+function playUntil(G: GameState, seed: string, stop: (G: GameState) => boolean = () => false, maxMoves = 20000) {
+ const rng = seedrandom(seed);
+ for (let i = 0; i < maxMoves && !ended(G) && !stop(G); i++) {
+ const player = Math.min(...currentPlayers(G));
+ const available = G.players[player].availableMoves as Record;
+ const names = Object.keys(available).filter((n) => n != MoveName.ReopenPowering && available[n]?.length);
+ const name = names[Math.floor(rng() * names.length)];
+ const options = available[name]!;
+ move(G, { name, data: options[Math.floor(rng() * options.length)] } as Move, player);
+ }
+ return G;
+}
+
+const allPlants = (G: GameState) => [
+ ...G.powerPlantsDeck,
+ ...G.actualMarket,
+ ...G.futureMarket,
+ ...([] as PowerPlant[]).concat(...G.players.map((p) => p.powerPlants)),
+];
+
+/** A fresh 4P game at the start of the Resources phase, with `cities` given to player 0. */
+function resourcesState(cities: string[], variant: 'original' | 'recharged' = 'original') {
+ const G = setup(4, { map: 'Chile', variant }, 'chile-resources');
+ G.phase = Phase.Resources;
+ const player = G.players[0];
+ player.cities = cities.map((name) => ({ name, position: 0 }));
+ player.powerPlants = [
+ cloneDeep(powerPlants.find((pp) => pp.number == 4)!),
+ cloneDeep(powerPlants.find((pp) => pp.number == 7)!),
+ ];
+ player.coalCapacity = 4;
+ player.oilCapacity = 6;
+ player.money = 100;
+ G.currentPlayers = [0];
+ player.availableMoves = availableMoves(G, player);
+ return G;
+}
+
+const buyOptions = (G: GameState, p = 0) =>
+ (G.players[p].availableMoves?.[MoveName.BuyResource] ?? []) as { resource: ResourceType; side?: string }[];
+
+describe('Chile', () => {
+ describe('board', () => {
+ it('has six regions (seven cities, eight in red and pink), three border spaces in no region, a grid for every city, 76 connections and two gates', () => {
+ const byRegion: Record = {};
+ for (const c of chile.cities) byRegion[c.region] = (byRegion[c.region] ?? 0) + 1;
+ expect(byRegion).to.deep.equal({ brown: 7, yellow: 7, purple: 7, red: 8, green: 7, pink: 8, '': 3 });
+ const salta = chile.cities.find((c) => c.name == 'Salta')!;
+ expect(salta.region).to.equal('');
+ expect(salta.grid).to.equal('North');
+ expect(salta.singleOccupancy).to.be.true;
+ expect(salta.minPlayers).to.be.undefined;
+ for (const name of ['Tacna', 'Jujuy']) {
+ const space = chile.cities.find((c) => c.name == name)!;
+ expect(
+ [space.region, space.grid, space.singleOccupancy, space.slotCosts, space.minPlayers],
+ name
+ ).to.deep.equal(['', 'North', true, [10], 4]);
+ }
+ expect(chile.cities.every((c) => c.grid == 'North' || c.grid == 'Central')).to.be.true;
+ // Brown and yellow each hold five North and two Central cities; the other regions are all Central.
+ for (const region of NORTH) {
+ const inRegion = chile.cities.filter((c) => c.region == region);
+ expect(
+ inRegion.filter((c) => c.grid == 'North'),
+ region
+ ).to.have.length(5);
+ expect(
+ inRegion.filter((c) => c.grid == 'Central'),
+ region
+ ).to.have.length(2);
+ }
+ expect(chile.cities.filter((c) => c.region && !NORTH.includes(c.region)).every((c) => c.grid == 'Central'))
+ .to.be.true;
+ expect(chile.connections).to.have.length(76);
+ expect(chile.step3Connections).to.have.length(2);
+ });
+
+ it('joins the grids only by the gates, one inside each northern region', () => {
+ const city = (name: string) => chile.cities.find((c) => c.name == name)!;
+ for (const con of chile.connections) {
+ const [a, b] = con.nodes.map(city);
+ expect(a.grid, con.nodes.join('-')).to.equal(b.grid);
+ }
+ const gateRegions = chile.step3Connections!.map((gate) => {
+ const [a, b] = gate.nodes.map(city);
+ expect([a.grid, b.grid].sort(), gate.nodes.join('-')).to.deep.equal(['Central', 'North']);
+ expect(a.region, gate.nodes.join('-')).to.equal(b.region);
+ return a.region;
+ });
+ expect(gateRegions.sort()).to.deep.equal(['brown', 'yellow']);
+ // Every city keeps a connection.
+ const all = [...chile.connections, ...chile.step3Connections!];
+ for (const c of chile.cities)
+ expect(
+ all.some((con) => con.nodes.includes(c.name)),
+ c.name
+ ).to.be.true;
+ });
+
+ it('builds the region graph from open connections; Salta is not a play area', () => {
+ const graph = computeRegionGraph(chile);
+ expect([...graph.regions].sort()).to.deep.equal(['brown', 'green', 'pink', 'purple', 'red', 'yellow']);
+ const adjacent = (r: string) => graph.regionConnections[graph.regions.indexOf(r)];
+ expect(adjacent('purple')).to.include.members(['brown', 'yellow', 'red']);
+ expect(adjacent('red')).to.include.members(['purple', 'green', 'pink']);
+ });
+
+ it('always plays brown and yellow, with fixed areas at 2-4P and green or pink added at 5-6P', () => {
+ const fixed: Record = {
+ 2: ['brown', 'purple', 'yellow'],
+ 3: ['brown', 'purple', 'yellow'],
+ 4: ['brown', 'purple', 'red', 'yellow'],
+ };
+ const seen: Record> = {};
+ for (const n of [2, 3, 4, 5, 6]) {
+ seen[n] = new Set();
+ for (let i = 0; i < 60; i++) {
+ const G = setup(n, { map: 'Chile' }, `areas-${n}-${i}`);
+ const regions = [...new Set(G.map.cities.map((c) => c.region).filter((r) => r))].sort();
+ expect(regions, `${n}P`).to.include.members(NORTH);
+ if (fixed[n]) expect(regions, `${n}P`).to.deep.equal(fixed[n]);
+ else expect(regions, `${n}P`).to.have.length(5);
+ expect(G.map.cities.some((c) => c.name == 'Salta')).to.be.true;
+ // Tacna and Jujuy are only in play with 4-6 players.
+ for (const name of ['Tacna', 'Jujuy'])
+ expect(
+ G.map.cities.some((c) => c.name == name),
+ `${n}P ${name}`
+ ).to.equal(n >= 4);
+ expect(G.map.step3Connections).to.have.length(2);
+ expect(
+ G.map.connections.every((con) =>
+ con.nodes.every((nm) => G.map.cities.some((c) => c.name == nm))
+ )
+ ).to.be.true;
+ seen[n].add(regions.join(','));
+ }
+ }
+ for (const n of [5, 6]) {
+ expect([...seen[n]].sort(), `${n}P`).to.deep.equal([
+ 'brown,green,purple,red,yellow',
+ 'brown,pink,purple,red,yellow',
+ ]);
+ }
+ });
+
+ it('drafts only the remaining regions when players choose them', () => {
+ for (const n of [3, 5]) {
+ const G = setup(n, { map: 'Chile', chooseRegions: true }, `draft-${n}`);
+ expect(G.phase).to.equal(Phase.RegionSelection);
+ expect(G.regionDraft!.picked).to.deep.equal(NORTH);
+ const first = Math.min(...currentPlayers(G));
+ expect(G.players[first].availableMoves![MoveName.ChooseRegion]).to.deep.equal(['purple']);
+ playUntil(G, `draft-${n}`, (s) => s.phase != Phase.RegionSelection);
+ const regions = [...new Set(G.map.cities.map((c) => c.region).filter((r) => r))].sort();
+ expect(regions).to.include.members([...NORTH, 'purple']);
+ expect(regions).to.have.length(n == 3 ? 3 : 5);
+ expect(
+ G.map.cities.some((c) => c.name == 'Tacna'),
+ `${n}P`
+ ).to.equal(n >= 4);
+ }
+ });
+ });
+
+ describe('setup', () => {
+ for (const variant of ['original', 'recharged'] as const) {
+ for (const n of [2, 3, 4, 5, 6]) {
+ it(`${variant} ${n}P: no uranium, plants 33/37/44 set aside, none removed for the player count`, () => {
+ const G = setup(n, { map: 'Chile', variant }, `deck-${variant}-${n}`);
+ const inGame = [...G.powerPlantsDeck, ...G.actualMarket, ...G.futureMarket].map((pp) => pp.number);
+ const expected = powerPlants
+ .map((pp) => pp.number)
+ .filter((x) => !URANIUM.includes(x) && !SET_ASIDE.includes(x));
+ expect([...inGame].sort((a, b) => a - b)).to.deep.equal([...expected].sort((a, b) => a - b));
+ expect(G.setAsidePlants!.map((pp) => pp.number)).to.deep.equal(SET_ASIDE);
+ expect(G.powerPlantsDeck[G.powerPlantsDeck.length - 1].type).to.equal(PowerPlantType.Step3);
+ if (variant == 'original') {
+ expect(G.actualMarket.map((pp) => pp.number)).to.deep.equal([3, 4, 5, 6]);
+ expect(G.futureMarket.map((pp) => pp.number)).to.deep.equal([7, 8, 9, 10]);
+ expect(G.powerPlantsDeck[0].number).to.equal(13);
+ } else {
+ expect(
+ [...G.actualMarket, ...G.futureMarket, G.powerPlantsDeck[0]].every((pp) => pp.number <= 15)
+ ).to.be.true;
+ }
+ });
+ }
+ }
+
+ it('starts the markets as in the rules, from one shared supply, with no uranium', () => {
+ for (const variant of ['original', 'recharged'] as const) {
+ const G = setup(4, { map: 'Chile', variant }, 'markets');
+ expect([G.coalMarketNorth, G.oilMarketNorth, G.garbageMarketNorth]).to.deep.equal([12, 8, 0]);
+ expect([G.coalMarket, G.oilMarket, G.garbageMarket, G.uraniumMarket]).to.deep.equal([12, 10, 4, 0]);
+ expect([G.coalSupply, G.oilSupply, G.garbageSupply, G.uraniumSupply]).to.deep.equal([0, 6, 20, 0]);
+ // The markets fill from the expensive end: North coal from $1 with two per space, Central coal from $1
+ // with one per space, Central oil from $4, garbage from $7, North oil from $1.
+ expect(G.coalPricesNorth![G.coalPricesNorth!.length - 12]).to.equal(1);
+ expect(G.coalPrices![G.coalPrices!.length - 12]).to.equal(1);
+ expect(G.oilPrices![G.oilPrices!.length - 10]).to.equal(4);
+ expect(G.garbagePrices![G.garbagePrices!.length - 4]).to.equal(7);
+ expect(G.oilPricesNorth![G.oilPricesNorth!.length - 8]).to.equal(1);
+ expect(G.garbagePricesNorth).to.deep.equal([]);
+ }
+ });
+
+ it('stays out of the random map pick', () => {
+ expect(() => setup(4, { map: 'Chile', randomizeMap: true }, 'x')).to.throw(/randomized/);
+ for (let i = 0; i < 200; i++) {
+ expect(setup(4, { map: 'Random' }, `random-${i}`).map.name).to.not.equal('Chile');
+ }
+ });
+ });
+
+ describe('buying resources', () => {
+ it('lets a player with no cities choose one market for the turn', () => {
+ const G = resourcesState([]);
+ const options = buyOptions(G);
+ expect(options.some((o) => o.side == 'north')).to.be.true;
+ expect(options.some((o) => o.side == 'south')).to.be.true;
+ move(G, { name: MoveName.BuyResource, data: { resource: ResourceType.Coal, side: 'north' } } as Move, 0);
+ expect(G.chosenSide).to.equal('north');
+ expect(buyOptions(G).every((o) => o.side == 'north')).to.be.true;
+ move(G, { name: MoveName.Pass, data: true } as Move, 0);
+ expect(G.chosenSide).to.be.undefined;
+ });
+
+ it('lets a player with cities buy only from their grid’s market', () => {
+ const north = resourcesState(['Calama']);
+ expect(marketSideOf(north, north.players[0])).to.equal('north');
+ expect(buyOptions(north)).to.not.be.empty;
+ expect(buyOptions(north).every((o) => o.side == 'north')).to.be.true;
+ expect(() =>
+ move(
+ north,
+ { name: MoveName.BuyResource, data: { resource: ResourceType.Coal, side: 'south' } } as Move,
+ 0
+ )
+ ).to.throw();
+
+ const central = resourcesState(['Santiago N', 'Santiago E']);
+ expect(marketSideOf(central, central.players[0])).to.equal('south');
+ expect(buyOptions(central).every((o) => o.side == 'south')).to.be.true;
+ });
+
+ it('goes by the city’s grid, not its region: Taltal and Copiapó buy from Central, Antofagasta and Calama from North', () => {
+ for (const [city, side] of [
+ ['Taltal', 'south'],
+ ['Chañaral', 'south'],
+ ['El Salvador', 'south'],
+ ['Copiapó', 'south'],
+ ['Antofagasta', 'north'],
+ ['Calama', 'north'],
+ ]) {
+ const G = resourcesState([city]);
+ expect(marketSideOf(G, G.players[0]), city).to.equal(side);
+ expect(buyOptions(G), city).to.not.be.empty;
+ expect(
+ buyOptions(G).every((o) => o.side == side),
+ city
+ ).to.be.true;
+ }
+ });
+
+ it('never offers garbage or uranium in the North', () => {
+ const G = resourcesState(['Calama']);
+ G.players[0].powerPlants.push(cloneDeep(powerPlants.find((pp) => pp.number == 6)!));
+ G.players[0].garbageCapacity = 2;
+ G.players[0].availableMoves = availableMoves(G, G.players[0]);
+ expect(buyOptions(G).map((o) => o.resource)).to.not.include(ResourceType.Garbage);
+ expect(buyOptions(G).map((o) => o.resource)).to.not.include(ResourceType.Uranium);
+ });
+ });
+
+ describe('building', () => {
+ function buildState(cities: string[], step = 1) {
+ const G = setup(6, { map: 'Chile' }, 'chile-build');
+ // Put every region in play.
+ G.map = cloneDeep({ ...chile, step3Connections: chile.step3Connections });
+ G.phase = Phase.Building;
+ G.step = step;
+ const player = G.players[0];
+ player.cities = cities.map((name) => ({ name, position: 0 }));
+ player.money = 500;
+ G.currentPlayers = [0];
+ player.availableMoves = availableMoves(G, player);
+ return G;
+ }
+ const builds = (G: GameState) =>
+ (G.players[0].availableMoves?.[MoveName.Build] ?? []) as { name: string; price: number }[];
+
+ it('offers no build across a gate before Step 3, and the gates’ cost once they open', () => {
+ const gridOf = (name: string) => chile.cities.find((c) => c.name == name)!.grid;
+ for (const step of [1, 2]) {
+ for (const [start, grid] of [
+ ['Antofagasta', 'North'],
+ ['Taltal', 'Central'],
+ ]) {
+ const G = buildState([start], step);
+ expect(builds(G), start).to.not.be.empty;
+ expect(
+ builds(G).every((b) => gridOf(b.name) == grid),
+ `${start} step ${step}`
+ ).to.be.true;
+ }
+ }
+ const G = buildState(['Antofagasta'], 3);
+ applyChileStep3(G);
+ G.players[0].availableMoves = availableMoves(G, G.players[0]);
+ expect(builds(G).find((b) => b.name == 'Taltal')!.price).to.equal(13 + 10);
+ const sierra = buildState(['Sierra Gorda'], 3);
+ applyChileStep3(sierra);
+ sierra.players[0].availableMoves = availableMoves(sierra, sierra.players[0]);
+ expect(builds(sierra).find((b) => b.name == 'El Salvador')!.price).to.equal(20 + 10);
+ });
+
+ it('keeps Salta to one city, never a first city, for its $20 connection plus a $10 house', () => {
+ const first = buildState([]);
+ expect(builds(first).map((b) => b.name)).to.not.include('Salta');
+ expect(builds(first).map((b) => b.name)).to.include('San Pedro');
+ const G = buildState(['San Pedro']);
+ expect(builds(G).find((b) => b.name == 'Salta')!.price).to.equal(30);
+ G.players[1].cities = [{ name: 'Salta', position: 0 }];
+ G.step = 3;
+ G.players[0].availableMoves = availableMoves(G, G.players[0]);
+ expect(builds(G).map((b) => b.name)).to.not.include('Salta');
+ });
+
+ it('joins the Santiago ring at cost 0', () => {
+ const G = buildState(['Santiago N']);
+ for (const name of ['Santiago E', 'Santiago S', 'Santiago W'])
+ expect(builds(G).find((b) => b.name == name)!.price).to.equal(10);
+ });
+ });
+
+ describe('bureaucracy', () => {
+ /** Plays to the last Bureaucracy move of round 1, sets the markets and supply, then plays that move. */
+ function restock(n: number, set: (G: GameState) => void) {
+ const G = setup(n, { map: 'Chile' }, `restock-${n}`);
+ playUntil(
+ G,
+ 'restock',
+ (s) => s.phase == Phase.Bureaucracy && s.players.filter((p) => !p.passed).length == 1
+ );
+ expect(G.phase).to.equal(Phase.Bureaucracy);
+ const last = G.players.findIndex((p) => !p.passed);
+ const player = G.players[last];
+ player.coalLeft = player.oilLeft = player.garbageLeft = 0;
+ player.availableMoves = availableMoves(G, player);
+ set(G);
+ move(G, { name: MoveName.Pass, data: true } as Move, last);
+ expect(G.round).to.equal(2);
+ return G;
+ }
+ const empty = (G: GameState) => {
+ G.coalMarketNorth = G.oilMarketNorth = 0;
+ G.coalMarket = G.oilMarket = G.garbageMarket = 0;
+ };
+
+ it('restocks North then Central from the table, garbage only in Central', () => {
+ const table: Record = {
+ // north coal, north oil, central coal, central oil, central garbage (Step 1)
+ 2: [2, 1, 2, 1, 1],
+ 3: [1, 1, 3, 1, 1],
+ 4: [2, 1, 3, 2, 2],
+ 5: [2, 2, 3, 2, 3],
+ 6: [3, 2, 4, 3, 3],
+ };
+ for (const n of [2, 3, 4, 5, 6]) {
+ const G = restock(n, (s) => {
+ empty(s);
+ s.coalSupply = s.oilSupply = s.garbageSupply = 20;
+ });
+ expect(
+ [G.coalMarketNorth, G.oilMarketNorth, G.coalMarket, G.oilMarket, G.garbageMarket],
+ `${n}P`
+ ).to.deep.equal(table[n]);
+ expect(G.garbageMarketNorth).to.equal(0);
+ expect(G.uraniumMarket).to.equal(0);
+ }
+ });
+
+ it('gives the North first call on a short supply', () => {
+ const G = restock(4, (s) => {
+ empty(s);
+ s.coalSupply = 3;
+ s.oilSupply = 1;
+ });
+ expect([G.coalMarketNorth, G.coalMarket]).to.deep.equal([2, 1]);
+ expect([G.oilMarketNorth, G.oilMarket]).to.deep.equal([1, 0]);
+ });
+
+ it('restocks the merged market from the Step 3 column', () => {
+ // coal, oil, garbage
+ const table: Record = {
+ 2: [4, 4, 4],
+ 3: [4, 4, 4],
+ 4: [5, 5, 5],
+ 5: [4, 5, 4],
+ 6: [6, 7, 6],
+ };
+ for (const n of [2, 3, 4, 5, 6]) {
+ const G = restock(n, (s) => {
+ s.step = 3;
+ applyChileStep3(s);
+ s.coalMarket = s.oilMarket = s.garbageMarket = 0;
+ s.coalSupply = s.oilSupply = s.garbageSupply = 20;
+ });
+ expect(G.coalMarketNorth, `${n}P`).to.be.undefined;
+ expect([G.coalMarket, G.oilMarket, G.garbageMarket], `${n}P`).to.deep.equal(table[n]);
+ }
+ });
+
+ it('restocks only one oil per market in Step 2', () => {
+ const G = restock(6, (s) => {
+ empty(s);
+ s.step = 2;
+ s.coalSupply = s.oilSupply = s.garbageSupply = 20;
+ });
+ expect([G.coalMarketNorth, G.oilMarketNorth, G.coalMarket, G.oilMarket, G.garbageMarket]).to.deep.equal([
+ 4, 1, 6, 1, 5,
+ ]);
+ });
+ });
+
+ describe('Step 3', () => {
+ let boostedUses = 0;
+ it('merges the markets, opens the gates, puts 33/37/44 on top and boosts every ecological plant by one', () => {
+ const catalogue = cloneDeep(powerPlants);
+ const G = setup(6, { map: 'Chile' }, 'step3-unit');
+ G.map = cloneDeep(chile);
+ G.coalMarketNorth = 5;
+ G.oilMarketNorth = 3;
+ G.coalMarket = 9;
+ G.oilMarket = 7;
+ G.garbageMarket = 6;
+ const wind13 = G.powerPlantsDeck.find((pp) => pp.number == 13)!;
+ G.players[0].powerPlants = [wind13, cloneDeep(powerPlants.find((pp) => pp.number == 50)!)];
+ G.powerPlantsDeck = G.powerPlantsDeck.filter((pp) => pp.number != 13);
+ G.step = 3;
+ const deckBefore = G.powerPlantsDeck.map((pp) => pp.number);
+
+ applyChileStep3(G);
+
+ // 1. One market on the standard tracks, holding everything from both.
+ expect([G.coalMarket, G.oilMarket, G.garbageMarket]).to.deep.equal([14, 10, 6]);
+ expect(G.coalPrices).to.deep.equal(prices[ResourceType.Coal]);
+ expect(G.oilPrices).to.deep.equal(prices[ResourceType.Oil]);
+ expect(G.garbagePrices).to.deep.equal(prices[ResourceType.Garbage]);
+ expect(G.coalPrices![24 - 14]).to.equal(4); // filled from the most expensive space down
+ expect(G.coalMarketNorth).to.be.undefined;
+ expect(G.coalResupplyNorth).to.be.undefined;
+ // 2. Gates open.
+ expect(G.map.connections).to.have.length(78);
+ expect(G.map.step3Connections).to.be.undefined;
+ // 3. Set-aside plants on top, in order.
+ expect(G.powerPlantsDeck.map((pp) => pp.number)).to.deep.equal([...SET_ASIDE, ...deckBefore]);
+ expect(G.setAsidePlants).to.be.undefined;
+ // 4. Ecological plants +1 everywhere; fusion and fuelled plants unchanged; the catalogue untouched.
+ const printed = (num: number) => catalogue.find((pp) => pp.number == num)!.citiesPowered;
+ for (const pp of allPlants(G)) {
+ expect(pp.citiesPowered, `plant ${pp.number}`).to.equal(
+ printed(pp.number) + (pp.type == PowerPlantType.Wind ? 1 : 0)
+ );
+ }
+ expect(G.players[0].powerPlants.map((pp) => pp.citiesPowered)).to.deep.equal([2, 6]);
+ expect(powerPlants).to.deep.equal(catalogue);
+
+ // Once only.
+ const after = cloneDeep(G);
+ applyChileStep3(G);
+ expect(G).to.deep.equal(after);
+ });
+
+ for (const variant of ['original', 'recharged'] as const) {
+ for (const n of [3, 4, 5, 6]) {
+ it(`${variant} ${n}P: happens in play, and the boosted plants power one more city`, () => {
+ const G = setup(n, { map: 'Chile', variant }, `step3-${variant}-${n}`);
+ const catalogue = cloneDeep(powerPlants);
+ let before: GameState | undefined;
+ playUntil(G, `play-${variant}-${n}`, (s) => {
+ if (s.step < 3) before = cloneDeep(s);
+ return s.step == 3;
+ });
+ expect(G.step).to.equal(3);
+ const events = G.log.filter((l) => l.type == 'event').map((l) => (l as { event: string }).event);
+ expect(events).to.include('Step 3: the North and Central resource markets merge into one.');
+ expect(G.coalMarketNorth).to.be.undefined;
+ // Resources are conserved through the merge (the move that started Step 3 may also restock).
+ const total = (s: GameState, r: 'coal' | 'oil' | 'garbage') =>
+ (s as any)[`${r}Market`] +
+ ((s as any)[`${r}MarketNorth`] ?? 0) +
+ (s as any)[`${r}Supply`] +
+ s.players.reduce((a, p) => a + (p as any)[`${r}Left`], 0);
+ for (const r of ['coal', 'oil', 'garbage'] as const)
+ expect(total(G, r), r).to.equal(total(before!, r));
+ for (const pp of allPlants(G)) {
+ const printed = catalogue.find((c) => c.number == pp.number)!.citiesPowered;
+ expect(pp.citiesPowered).to.equal(printed + (pp.type == PowerPlantType.Wind ? 1 : 0));
+ }
+ // The set-aside plants are next out of the deck (unless already drawn into the market).
+ const next = G.powerPlantsDeck.slice(0, 3).map((pp) => pp.number);
+ const drawn = [
+ ...G.actualMarket,
+ ...G.futureMarket,
+ ...([] as PowerPlant[]).concat(...G.players.map((p) => p.powerPlants)),
+ ].map((pp) => pp.number);
+ expect(SET_ASIDE.every((x) => next.includes(x) || drawn.includes(x))).to.be.true;
+
+ // Play on: an ecological plant in a hand is offered for its boosted number of cities.
+ playUntil(G, `rest-${variant}-${n}`, (s) => {
+ if (s.phase != Phase.Bureaucracy) return false;
+ return s.players.some((p) =>
+ (p.availableMoves?.[MoveName.UsePowerPlant] ?? []).some(
+ (u) =>
+ p.powerPlants.find((pp) => pp.number == u.powerPlant)?.type == PowerPlantType.Wind
+ )
+ );
+ });
+ if (!ended(G)) {
+ boostedUses++;
+ const p = G.players.find((pl) =>
+ (pl.availableMoves?.[MoveName.UsePowerPlant] ?? []).some(
+ (u) =>
+ pl.powerPlants.find((pp) => pp.number == u.powerPlant)?.type == PowerPlantType.Wind
+ )
+ )!;
+ const use = p.availableMoves![MoveName.UsePowerPlant]!.find(
+ (u) => p.powerPlants.find((pp) => pp.number == u.powerPlant)?.type == PowerPlantType.Wind
+ )!;
+ expect(use.citiesPowered).to.equal(
+ catalogue.find((c) => c.number == use.powerPlant)!.citiesPowered + 1
+ );
+ }
+ });
+ }
+ }
+
+ it('saw a boosted ecological plant offered in Bureaucracy in most of those games', () => {
+ expect(boostedUses).to.be.at.least(4);
+ });
+ });
+
+ describe('hidden-deck replay and analysis', () => {
+ const isGate = (con: { nodes: string[] }) =>
+ chile.step3Connections!.some((gate) => gate.nodes.every((n) => con.nodes.includes(n)));
+ const toStep3 = (seed: string, variant: 'original' | 'recharged' = 'original') =>
+ playUntil(setup(4, { map: 'Chile', variant }, seed), seed, (s) => s.step == 3 && s.phase == Phase.Building);
+
+ it('rewinds a secret-seed game to closed gates, and replays its Step 3 events', () => {
+ // The full log isn't compared: on every map, a hidden-deck replay can leave out a "drawn from the deck"
+ // entry around the Step 3 card (USA seed r2 too), which predates Chile.
+ const step3Events = (s: GameState) =>
+ s.log.map((l) => (l as { event?: string }).event ?? '').filter((e) => e.startsWith('Step 3:'));
+ // Seed r1 is left out: on this board its hidden-deck replay hits a ChoosePowerPlant mismatch that is not
+ // Chile's (Germany seed r4 does the same with this random play); reported separately.
+ for (const seed of ['r2', 'r3', 'r4', 'r5', 'r6', 'r7']) {
+ const G = toStep3(seed);
+ expect(G.step, seed).to.equal(3);
+ const s = stripSecret(cloneDeep(G), 0);
+ const early = reconstructState(s, 30);
+ expect(early.step).to.be.below(3);
+ expect(early.map.connections.filter(isGate), seed).to.be.empty;
+ expect(early.map.step3Connections, seed).to.have.length(2);
+ const full = reconstructState(s, s.log.length);
+ expect(step3Events(full), seed).to.deep.equal(step3Events(G));
+ expect(step3Events(G), seed).to.have.length(4);
+ expect(full.map.connections.filter(isGate)).to.have.length(2);
+ expect(full.players.map((p) => [p.money, p.cities.length])).to.deep.equal(
+ G.players.map((p) => [p.money, p.cities.length])
+ );
+ }
+ });
+
+ for (const variant of ['original', 'recharged'] as const) {
+ it(`${variant}: analysis scenarios deal a Chile deck in every step`, () => {
+ for (const [label, stop] of [
+ ['step 1', (s: GameState) => s.round == 3],
+ ['step 2', (s: GameState) => s.step == 2],
+ ['step 3', (s: GameState) => s.step == 3],
+ ] as const) {
+ const G = playUntil(setup(4, { map: 'Chile', variant }, 'scenario'), 'scenario', stop);
+ const s = createAnalysisScenario(G, { player: 0, seed: 'x' });
+ const deck = s.powerPlantsDeck.map((pp) => pp.number);
+ expect(
+ deck.filter((x) => URANIUM.includes(x)),
+ label
+ ).to.be.empty;
+ expect(deck.length, label).to.equal(G.powerPlantsDeck.length);
+ if (G.step < 3) {
+ expect(
+ deck.filter((x) => SET_ASIDE.includes(x)),
+ label
+ ).to.be.empty;
+ expect(s.setAsidePlants!.map((pp) => pp.number)).to.deep.equal(SET_ASIDE);
+ } else {
+ // The set-aside plants still in the deck are on top, in order, as in the real game.
+ const real = G.powerPlantsDeck.map((pp) => pp.number).filter((x) => SET_ASIDE.includes(x));
+ expect(deck.slice(0, real.length), label).to.deep.equal(real);
+ for (const pp of s.powerPlantsDeck) {
+ const printed = powerPlants.find((c) => c.number == pp.number)!.citiesPowered;
+ expect(pp.citiesPowered).to.equal(printed + (pp.type == PowerPlantType.Wind ? 1 : 0));
+ }
+ }
+ }
+ });
+ }
+ });
+
+ describe('whole games', () => {
+ for (const variant of ['original', 'recharged'] as const) {
+ it(`${variant}: seeded games end at 2-6 players and replay exactly`, () => {
+ for (const n of [2, 3, 4, 5, 6]) {
+ for (let i = 0; i < 3; i++) {
+ const G = playUntil(
+ setup(n, { map: 'Chile', variant }, `game-${variant}-${n}-${i}`),
+ `moves-${i}`
+ );
+ expect(ended(G), `${n}P game ${i}`).to.be.true;
+ expect(G.uraniumMarket + G.uraniumSupply).to.equal(0);
+ const replayed = reconstructState(cloneDeep(G));
+ expect(replayed.players.map((p) => [p.money, p.cities.length])).to.deep.equal(
+ G.players.map((p) => [p.money, p.cities.length])
+ );
+ expect(replayed.log.length).to.equal(G.log.length);
+ }
+ }
+ });
+ }
+ });
+
+ describe('the other single decks', () => {
+ const decks = {
+ deck1: { catalogue: deck1PowerPlants, uranium: [8, 19, 24, 31, 38, 50], setAside: [26, 32, 39], top: 11 },
+ deck2: { catalogue: alternatePowerPlants, uranium: [13, 21, 32, 37, 50], setAside: [31, 36, 44], top: 11 },
+ };
+ for (const [powerPlantDeck, d] of Object.entries(decks) as ['deck1' | 'deck2', typeof decks['deck1']][]) {
+ const printed = (num: number) => d.catalogue.find((c) => c.number == num)!.citiesPowered;
+ for (const variant of ['original', 'recharged'] as const) {
+ it(`${powerPlantDeck} ${variant}: no uranium, the three largest ecological plants set aside`, () => {
+ for (const n of [2, 3, 4, 5, 6]) {
+ const G = setup(n, { map: 'Chile', variant, powerPlantDeck }, `deck-${variant}-${n}`);
+ const inGame = [...G.powerPlantsDeck, ...G.actualMarket, ...G.futureMarket].map(
+ (pp) => pp.number
+ );
+ const expected = d.catalogue
+ .map((pp) => pp.number)
+ .filter((x) => !d.uranium.includes(x) && !d.setAside.includes(x));
+ expect([...inGame].sort((a, b) => a - b)).to.deep.equal([...expected].sort((a, b) => a - b));
+ expect(G.setAsidePlants!.map((pp) => pp.number)).to.deep.equal(d.setAside);
+ const winds = d.catalogue.filter((pp) => pp.type == PowerPlantType.Wind).map((pp) => pp.number);
+ expect(winds.slice(-3)).to.deep.equal(d.setAside);
+ expect(G.setAsidePlants!.every((pp) => pp.type == PowerPlantType.Wind)).to.be.true;
+ const types = inGame.map((x) => d.catalogue.find((c) => c.number == x)!.type);
+ expect(types).to.not.include(PowerPlantType.Uranium);
+ expect(G.powerPlantsDeck[G.powerPlantsDeck.length - 1].type).to.equal(PowerPlantType.Step3);
+ if (variant == 'original') {
+ expect([...G.actualMarket, ...G.futureMarket].map((pp) => pp.number)).to.deep.equal(
+ expected.slice(0, 8)
+ );
+ expect(G.powerPlantsDeck[0].number).to.equal(d.top);
+ } else {
+ const lastPlug = powerPlantDeck == 'deck1' ? 16 : 15;
+ const opening = [...G.actualMarket, ...G.futureMarket, G.powerPlantsDeck[0]];
+ expect(opening.every((pp) => pp.number <= lastPlug)).to.be.true;
+ }
+ }
+ });
+
+ it(`${powerPlantDeck} ${variant}: Step 3 puts the set-aside plants on top, boosted from this deck`, () => {
+ for (const n of [3, 4, 5, 6]) {
+ const G = setup(n, { map: 'Chile', variant, powerPlantDeck }, `step3-${variant}-${n}`);
+ let deckBefore: number[] = [];
+ playUntil(G, `play-${powerPlantDeck}-${variant}-${n}`, (s) => {
+ if (s.step < 3) deckBefore = s.powerPlantsDeck.map((pp) => pp.number);
+ return s.step == 3;
+ });
+ expect(G.step, `${n}P`).to.equal(3);
+ const events = G.log
+ .filter((l) => l.type == 'event')
+ .map((l) => (l as { event: string }).event);
+ expect(events).to.include(
+ `Step 3: power plants ${d.setAside.join(', ')} go on top of the deck.`
+ );
+ const next = G.powerPlantsDeck.slice(0, 3).map((pp) => pp.number);
+ const drawn = [
+ ...G.actualMarket,
+ ...G.futureMarket,
+ ...([] as PowerPlant[]).concat(...G.players.map((p) => p.powerPlants)),
+ ].map((pp) => pp.number);
+ expect(
+ d.setAside.every((x) => next.includes(x) || drawn.includes(x)),
+ `${n}P`
+ ).to.be.true;
+ expect(deckBefore.filter((x) => d.setAside.includes(x))).to.be.empty;
+ for (const pp of allPlants(G))
+ expect(pp.citiesPowered, `plant ${pp.number}`).to.equal(
+ printed(pp.number) + (pp.type == PowerPlantType.Wind ? 1 : 0)
+ );
+ }
+ });
+
+ it(`${powerPlantDeck} ${variant}: seeded games end at 2-6 players and replay exactly`, () => {
+ for (const n of [2, 3, 4, 5, 6]) {
+ for (let i = 0; i < 3; i++) {
+ const G = playUntil(
+ setup(n, { map: 'Chile', variant, powerPlantDeck }, `game-${variant}-${n}-${i}`),
+ `moves-${powerPlantDeck}-${i}`
+ );
+ expect(ended(G), `${n}P game ${i}`).to.be.true;
+ expect(G.uraniumMarket + G.uraniumSupply).to.equal(0);
+ const replayed = reconstructState(cloneDeep(G));
+ expect(replayed.players.map((p) => [p.money, p.cities.length])).to.deep.equal(
+ G.players.map((p) => [p.money, p.cities.length])
+ );
+ expect(replayed.log.length).to.equal(G.log.length);
+ }
+ }
+ });
+
+ it(`${powerPlantDeck} ${variant}: analysis scenarios deal this deck's Chile plants in every step`, () => {
+ for (const [label, stop] of [
+ ['step 1', (s: GameState) => s.round == 3],
+ ['step 2', (s: GameState) => s.step == 2],
+ ['step 3', (s: GameState) => s.step == 3],
+ ] as const) {
+ const G = playUntil(
+ setup(4, { map: 'Chile', variant, powerPlantDeck }, 'scenario'),
+ 'scenario',
+ stop
+ );
+ const s = createAnalysisScenario(G, { player: 0, seed: 'x' });
+ const deck = s.powerPlantsDeck.map((pp) => pp.number);
+ expect(
+ deck.filter((x) => d.uranium.includes(x)),
+ label
+ ).to.be.empty;
+ expect(deck.length, label).to.equal(G.powerPlantsDeck.length);
+ if (G.step < 3) {
+ expect(
+ deck.filter((x) => d.setAside.includes(x)),
+ label
+ ).to.be.empty;
+ } else {
+ const real = G.powerPlantsDeck.map((pp) => pp.number).filter((x) => d.setAside.includes(x));
+ expect(deck.slice(0, real.length), label).to.deep.equal(real);
+ }
+ for (const pp of s.powerPlantsDeck)
+ expect(pp.citiesPowered, `${label} plant ${pp.number}`).to.equal(
+ printed(pp.number) + (G.step == 3 && pp.type == PowerPlantType.Wind ? 1 : 0)
+ );
+ }
+ });
+ }
+ }
+ });
+
+ describe('the shuffled decks', () => {
+ const kinds = [
+ { label: 'shuffled', options: { powerPlantDeck: 'shuffled' as const } },
+ { label: 'shuffled (sampled)', options: { powerPlantDeck: 'shuffled' as const, shuffledSample: true } },
+ { label: 'shuffledUnique', options: { powerPlantDeck: 'shuffledUnique' as const } },
+ ];
+ const printed = (num: number) =>
+ plantCatalogue('Chile', 'shuffled').find((c) => c.number == num)!.citiesPowered;
+ for (const kind of kinds) {
+ for (const variant of ['original', 'recharged'] as const) {
+ it(`${kind.label} ${variant}: no uranium, the three largest ecological plants dealt set aside`, () => {
+ for (const n of [2, 3, 4, 5, 6]) {
+ for (const seed of ['a', 'b', 'c']) {
+ const G = setup(
+ n,
+ { map: 'Chile', variant, ...kind.options },
+ `sh-${variant}-${n}-${seed}`
+ );
+ const label = `${n}P ${seed}`;
+ const inGame = [...G.actualMarket, ...G.futureMarket, ...G.powerPlantsDeck];
+ const aside = G.setAsidePlants!;
+ expect(
+ inGame.map((pp) => pp.type),
+ label
+ ).to.not.include(PowerPlantType.Uranium);
+ const windsDealt = [...inGame, ...aside].filter((pp) => pp.type == PowerPlantType.Wind);
+ expect(aside, label).to.have.length(Math.min(3, windsDealt.length));
+ expect(
+ aside.every((pp) => pp.type == PowerPlantType.Wind),
+ label
+ ).to.be.true;
+ const asideNumbers = aside.map((pp) => pp.number);
+ expect(asideNumbers, label).to.deep.equal([...asideNumbers].sort((a, b) => a - b));
+ const largestLeft = Math.max(
+ 0,
+ ...inGame.filter((pp) => pp.type == PowerPlantType.Wind).map((pp) => pp.number)
+ );
+ expect(largestLeft, label).to.be.below(asideNumbers[0] ?? Infinity);
+ expect(G.powerPlantsDeck[G.powerPlantsDeck.length - 1].type).to.equal(PowerPlantType.Step3);
+ if (variant == 'original') {
+ const market = [...G.actualMarket, ...G.futureMarket].map((pp) => pp.number);
+ const rest = G.powerPlantsDeck.map((pp) => pp.number);
+ expect(Math.max(...market), label).to.be.below(Math.min(...rest));
+ const top = G.powerPlantsDeck[0];
+ const winds = G.powerPlantsDeck.filter((pp) => pp.type == PowerPlantType.Wind);
+ if (winds.length) {
+ expect(top.type, label).to.equal(PowerPlantType.Wind);
+ expect(top.number, label).to.equal(Math.min(...winds.map((pp) => pp.number)));
+ }
+ } else {
+ const opening = [...G.actualMarket, ...G.futureMarket, G.powerPlantsDeck[0]];
+ expect(
+ opening.every((pp) => isPlugPlant(pp, 'shuffled')),
+ label
+ ).to.be.true;
+ }
+ }
+ }
+ });
+
+ it(`${kind.label} ${variant}: Step 3 puts the set-aside plants on top and boosts every copy`, () => {
+ for (const n of [3, 4, 5, 6]) {
+ const G = setup(n, { map: 'Chile', variant, ...kind.options }, `sh3-${variant}-${n}`);
+ const aside = G.setAsidePlants!.map((pp) => pp.number);
+ playUntil(G, `shplay-${kind.label}-${variant}-${n}`, (s) => s.step == 3);
+ expect(G.step, `${n}P`).to.equal(3);
+ const events = G.log
+ .filter((l) => l.type == 'event')
+ .map((l) => (l as { event: string }).event);
+ expect(events).to.include(`Step 3: power plants ${aside.join(', ')} go on top of the deck.`);
+ for (const pp of allPlants(G))
+ expect(pp.citiesPowered, `plant ${pp.number}`).to.equal(
+ printed(pp.number) + (pp.type == PowerPlantType.Wind ? 1 : 0)
+ );
+ }
+ });
+
+ it(`${kind.label} ${variant}: seeded games end at 2-6 players and replay exactly`, () => {
+ for (const n of [2, 3, 4, 5, 6]) {
+ for (let i = 0; i < 2; i++) {
+ const G = playUntil(
+ setup(n, { map: 'Chile', variant, ...kind.options }, `shgame-${variant}-${n}-${i}`),
+ `shmoves-${kind.label}-${i}`
+ );
+ expect(ended(G), `${n}P game ${i}`).to.be.true;
+ const replayed = reconstructState(cloneDeep(G));
+ expect(replayed.players.map((p) => [p.money, p.cities.length])).to.deep.equal(
+ G.players.map((p) => [p.money, p.cities.length])
+ );
+ expect(replayed.log.length).to.equal(G.log.length);
+ }
+ }
+ });
+
+ it(`${kind.label} ${variant}: analysis scenarios keep the set-aside plants out until Step 3`, () => {
+ for (const [label, stop] of [
+ ['step 1', (s: GameState) => s.round == 3],
+ ['step 2', (s: GameState) => s.step == 2],
+ ['step 3', (s: GameState) => s.step == 3],
+ ] as const) {
+ const G0 = setup(4, { map: 'Chile', variant, ...kind.options }, 'shscenario');
+ const aside = G0.setAsidePlants!.map((pp) => pp.number);
+ const G = playUntil(G0, 'shscenario', stop);
+ const s = createAnalysisScenario(G, { player: 0, seed: 'x' });
+ const types = s.powerPlantsDeck.map((pp) => pp.type);
+ expect(types, label).to.not.include(PowerPlantType.Uranium);
+ expect(s.powerPlantsDeck.length, label).to.equal(G.powerPlantsDeck.length);
+ const deck = s.powerPlantsDeck.map((pp) => pp.number);
+ if (G.step < 3) {
+ expect(
+ deck.filter((x) => aside.includes(x)),
+ label
+ ).to.be.empty;
+ } else {
+ const real = G.powerPlantsDeck.map((pp) => pp.number).filter((x) => aside.includes(x));
+ expect(deck.slice(0, real.length), label).to.deep.equal(real);
+ }
+ }
+ });
+ }
+ }
+ });
+});
diff --git a/engine/src/deckBuildText.ts b/engine/src/deckBuildText.ts
index b3a6c9b..0aaeaec 100644
--- a/engine/src/deckBuildText.ts
+++ b/engine/src/deckBuildText.ts
@@ -7,6 +7,7 @@ import {
SPAIN_STEP_2_PLANTS,
} from './deckChanges';
import { GameOptions, PowerPlant, PowerPlantDeck, PowerPlantType, SingleDeck } from './gamestate';
+import { chileSetAsidePlants } from './maps/chile';
import { gameDeck, isPlugPlant, plantCatalogue, plantCopy } from './powerPlants';
// The rules dialog's "Deck build" section, generated from the same tables the decks
@@ -91,6 +92,13 @@ export const DECK_BUILD_TEMPLATES = {
'Power plant {p0} goes on top of the deck if it was dealt, then five shuffled cards (the 7th and 8th smallest plants and the top three of the deck).',
spainHeld:
'Power plants {p0} are set aside at setup; when Step 2 begins they are placed on top of the deck, smallest on top.',
+ chileSetAside:
+ 'Ecological power plants {p0} are set aside at setup; when Step 3 begins they are placed on top of the deck, smallest on top.',
+ chileSetAsideShuffled:
+ 'The three largest ecological power plants dealt (all of them, if three or fewer are dealt) are set aside at setup; when Step 3 begins they are placed on top of the deck, smallest on top.',
+ chileShuffledTop:
+ 'The smallest ecological power plant dealt that is not in the market goes on top of the deck, in place of the usual top plant; if there is none, no plant goes on top.',
+ chileNoRemoval: 'No power plants are removed for the number of players.',
ukStep3: 'The Step 3 card is placed third from the bottom of the deck (two plants below it).',
} as const;
@@ -310,6 +318,19 @@ function mapText(mapName: string, options: GameOptions, numPlayers: number): str
}
case 'UK & Ireland':
return [fill('ukStep3'), fill('standardSetup')];
+ case 'Chile':
+ return shuffled
+ ? [
+ ...gone,
+ fill('chileSetAsideShuffled'),
+ ...(original ? [fill('chileShuffledTop')] : []),
+ fill('chileNoRemoval'),
+ ]
+ : [
+ ...gone,
+ fill('chileSetAside', chileSetAsidePlants[deck as SingleDeck].join(', ')),
+ fill('chileNoRemoval'),
+ ];
default:
return [];
}
diff --git a/engine/src/deckChanges.ts b/engine/src/deckChanges.ts
index 73113d1..51f9f68 100644
--- a/engine/src/deckChanges.ts
+++ b/engine/src/deckChanges.ts
@@ -30,6 +30,12 @@ export function removedPlants(mapName: string, deck: PowerPlantDeck, numPlayers:
return forDeck({ standard: [6, 14], deck1: [6, 21], deck2: [5, 14] }, deck);
case 'India':
return isShuffled(deck) ? forDeck({ standard: [11], deck1: [8], deck2: [13] }, deck) : [];
+ case 'Chile':
+ // Chile's uranium plants (it has no uranium); its three set-aside ecological plants are in setAsidePlants.
+ return forDeck(
+ { standard: [11, 17, 23, 28, 34, 39], deck1: [8, 19, 24, 31, 38, 50], deck2: [13, 21, 32, 37, 50] },
+ deck
+ );
case 'Australia':
return forDeck({ standard: [17], deck1: [19], deck2: [21] }, deck);
case 'South Africa':
@@ -92,6 +98,9 @@ export function originalTopPlants(mapName: string, deck: PowerPlantDeck): number
return { standard: [13, 14], deck1: [11], deck2: [13, 14] };
case 'Quebec':
return { standard: [13, 18, 22], deck1: [11, 15, 16], deck2: [11, 17, 24] };
+ case 'Chile':
+ // The smallest ecological plant, as in the base game; Deck 2's 13 is a (removed) uranium plant.
+ return { standard: [13], deck1: [11], deck2: [11] };
default:
return { standard: [13], deck1: [11], deck2: [13] };
}
diff --git a/engine/src/engine.ts b/engine/src/engine.ts
index e7dee20..996c730 100644
--- a/engine/src/engine.ts
+++ b/engine/src/engine.ts
@@ -39,7 +39,7 @@ import {
SingleDeck,
} from './gamestate';
import { LogItem } from './log';
-import { GameMap, maps, mapsRecharged } from './maps';
+import { City, GameMap, maps, mapsRecharged } from './maps';
import { Move, MoveName, Moves } from './move';
import {
availableDecks,
@@ -197,7 +197,9 @@ export function setup(
if (map == 'Random') {
// Dedicated rng so the pick doesn't shift the rest of the setup's draws.
const mapRng = seedrandom(seed + '-map');
- map = variantMaps[Math.floor(mapRng() * variantMaps.length)].name as MapName;
+ // Chile is in testing: left out of the random pick, which also keeps every other seed's pick unchanged.
+ const pool = variantMaps.filter((m) => m.name != 'Chile');
+ map = pool[Math.floor(mapRng() * pool.length)].name as MapName;
}
const chosenMapRaw = variantMaps.find((m) => m.name == map);
if (!chosenMapRaw) {
@@ -233,11 +235,15 @@ export function setup(
: 'standard';
const sampleShuffled = chosenDeck == 'shuffled' && shuffledSample;
const ecologicalRules = ECOLOGICAL_RULE_MAPS.includes(chosenMap.name) && !legacyEcological;
+ if (chosenMap.name == 'Chile' && randomizeMap) {
+ throw new Error('Chile cannot be played on a randomized map: its gates and grids belong to its own board');
+ }
let actualMarket: PowerPlant[];
let futureMarket: PowerPlant[];
let powerPlantsDeck: PowerPlant[];
let heldPowerPlants: PowerPlant[] | undefined;
+ let setAsidePlants: PowerPlant[] | undefined;
if (forceDeck) {
powerPlantsDeck = forceDeck;
@@ -245,7 +251,7 @@ export function setup(
futureMarket = powerPlantsDeck.splice(0, 4);
} else {
if (chosenMap.setupDeck) {
- ({ actualMarket, futureMarket, powerPlantsDeck, heldPowerPlants } = chosenMap.setupDeck(
+ ({ actualMarket, futureMarket, powerPlantsDeck, heldPowerPlants, setAsidePlants } = chosenMap.setupDeck(
numPlayers,
variant,
rng,
@@ -402,6 +408,8 @@ export function setup(
const graph = computeRegionGraph(chosenMap);
const regions = graph.regions;
const regionsNeeded = Math.min(regionsInPlay[p], regions.length);
+ // Regions always in play (Chile's two northern regions); the rest are picked or drafted as usual.
+ const fixedRegions = chosenMap.fixedRegions ?? [];
if (chooseRegions && regions.length > regionsNeeded) {
// Defer region selection to a player draft (the RegionSelection phase).
@@ -409,9 +417,9 @@ export function setup(
// chosen regions once the draft completes, and applies the
// regionalPowerPlants swap at that point.
finalMap = chosenMap;
- pendingRegionDraft = { regionsNeeded, picked: [] };
+ pendingRegionDraft = { regionsNeeded, picked: [...fixedRegions] };
} else {
- const playRegions = new Set();
+ const playRegions = new Set(fixedRegions);
while (playRegions.size != regionsNeeded) {
const region = regions[Math.floor(rng() * regions.length)];
@@ -432,7 +440,7 @@ export function setup(
}
}
- finalMap = filterMapToRegions(chosenMap, playRegions);
+ finalMap = filterMapToRegions(chosenMap, playRegions, numPlayers);
applyRegionalPowerPlants(
chosenMap,
playRegions,
@@ -521,6 +529,8 @@ export function setup(
garbagePricesNorth,
actualMarket,
futureMarket,
+ // Chile: the plants its setupDeck set aside (copies, never the catalogue's shared objects).
+ ...(setAsidePlants ? { setAsidePlants } : {}),
chosenPowerPlant: undefined,
currentBid: undefined,
highestBidders: [],
@@ -652,13 +662,26 @@ export function setup(
// Filters a (full) map down to just the chosen regions: keeps only cities in
// those regions and connections whose endpoints are both kept. Returns a new map;
-// the input is not mutated.
-function filterMapToRegions(map: GameMap, playRegions: Set): GameMap {
+// the input is not mutated. A city with minPlayers is left out below that player count.
+function filterMapToRegions(map: GameMap, playRegions: Set, numPlayers: number): GameMap {
const filteredMap = cloneDeep(map);
- filteredMap.cities = filteredMap.cities.filter((city) => playRegions.has(city.region));
- filteredMap.connections = filteredMap.connections.filter((con) =>
- con.nodes.map((n) => map.cities.find((city) => city.name == n)!.region).every((r) => playRegions.has(r))
+ const counts = (city: City) => !city.minPlayers || numPlayers >= city.minPlayers;
+ const kept = new Set(
+ map.cities.filter((city) => playRegions.has(city.region) && counts(city)).map((city) => city.name)
);
+ // A city in no region (Chile's Salta) is in play when a connection joins it to a city that is.
+ for (const city of map.cities.filter((c) => !c.region && counts(c))) {
+ if (map.connections.some((con) => con.nodes.includes(city.name) && con.nodes.some((n) => kept.has(n)))) {
+ kept.add(city.name);
+ }
+ }
+ filteredMap.cities = filteredMap.cities.filter((city) => kept.has(city.name));
+ filteredMap.connections = filteredMap.connections.filter((con) => con.nodes.every((n) => kept.has(n)));
+ if (filteredMap.step3Connections) {
+ filteredMap.step3Connections = filteredMap.step3Connections.filter((con) =>
+ con.nodes.every((n) => kept.has(n))
+ );
+ }
return filteredMap;
}
@@ -741,7 +764,7 @@ function finalizeRegions(G: GameState) {
const playRegions = new Set(G.regionDraft!.picked);
const fullMap = G.map;
- G.map = filterMapToRegions(fullMap, playRegions);
+ G.map = filterMapToRegions(fullMap, playRegions, G.players.length);
applyRegionalPowerPlants(
fullMap,
playRegions,
@@ -1181,7 +1204,7 @@ export function move(
// Korea: end of this player's buying turn — clear the side lock
// so the next player can pick freely.
- if (G.map.name == 'Korea') {
+ if (G.map.name == 'Korea' || G.map.name == 'Chile') {
G.chosenSide = undefined;
}
@@ -1319,6 +1342,7 @@ export function move(
// market lifecycle, not a step change.
startStep(G, 3);
applyAustraliaStep3Shift(G);
+ applyChileStep3(G);
}
}
} else {
@@ -1498,7 +1522,9 @@ export function move(
if (G.coalResupplyNorth) {
G.log.push({
type: 'event',
- event: `Resupplying resources — North: [${coalResupplyNorthValue}, ${oilResupplyNorthValue}, ${garbageResupplyNorthValue}], South: [${coalResupplyValue}, ${oilResupplyValue}, ${garbageResupplyValue}, ${uraniumResupplyValue}].`,
+ event: `Resupplying resources — North: [${coalResupplyNorthValue}, ${oilResupplyNorthValue}, ${garbageResupplyNorthValue}], ${
+ G.map.name == 'Chile' ? 'Central' : 'South'
+ }: [${coalResupplyValue}, ${oilResupplyValue}, ${garbageResupplyValue}, ${uraniumResupplyValue}].`,
});
} else {
G.log.push({
@@ -1616,6 +1642,7 @@ export function move(
if (G.futureMarket.length == 0 && G.map.name != 'China' && G.map.name != 'Manhattan') {
startStep(G, 3);
applyAustraliaStep3Shift(G);
+ applyChileStep3(G);
}
G.plantDiscountActive =
@@ -1958,8 +1985,10 @@ export function move(
if (G.options.trackTotalSpent) {
const cityData = G.map.cities.find((c) => c.name == move.data.name)!;
if (cityData.singleOccupancy) {
- // SA cross-border: no house base — full price is "connection".
- player.totalSpentConnections += move.data.price;
+ // SA cross-border: no house base — full price is "connection". Chile's Salta: its one slot cost.
+ const house = cityData.slotCosts?.[0] ?? 0;
+ player.totalSpentCities += house;
+ player.totalSpentConnections += move.data.price - house;
} else {
player.totalSpentCities += 10 + position * 5;
player.totalSpentConnections += move.data.price - (10 + position * 5);
@@ -2302,7 +2331,8 @@ export function reconstructState(gameState: GameState, to?: number, _forcePublic
if (gameState.seed == 'secret') {
if (gameState.knownPowerPlantDeck) {
- G.map = gameState.map;
+ // Chile: the live map may already have its gates open, but the replay starts before Step 3.
+ G.map = closeChileGates(gameState.map);
G.blockedCities = gameState.blockedCities?.slice();
G.powerPlantsDeck = cloneDeep(gameState.knownPowerPlantDeck);
// Split sizes must match the map's setup, not the standard 4+4: Russia
@@ -2900,6 +2930,94 @@ export function applyAustraliaStep3Shift(G: GameState) {
});
}
+/**
+ * Chile, when Step 3 begins (after the usual shuffle), in this order:
+ * 1. The two markets merge onto the standard 24-slot tracks, filling from the most expensive spaces; from now on
+ * the main market restocks with its Step 3 column and the North market is gone.
+ * 2. The gates open.
+ * 3. The set-aside ecological plants go on top of the draw stack (33 on top, then 37, then 44).
+ * 4. Every ecological plant powers one more city than printed, wherever it is: deck, market or a player's hand.
+ * Fusion plant 50 is not boosted. Plants are replaced by boosted copies, never changed in place, so no shared
+ * catalogue object is touched.
+ * Runs once (the North market is gone afterwards), so it is safe at every Step 3 entry.
+ */
+/** Chile: the map as it was before Step 3, with any open gates back in step3Connections. Other maps unchanged. */
+export function closeChileGates(map: GameMap): GameMap {
+ if (map.name !== 'Chile' || map.step3Connections) {
+ return map;
+ }
+ const chile = maps.find((m) => m.name == 'Chile')!;
+ const isGate = (con: { nodes: string[] }) =>
+ chile.step3Connections!.some((gate) => gate.nodes.every((n) => con.nodes.includes(n)));
+ return {
+ ...map,
+ connections: map.connections.filter((con) => !isGate(con)),
+ step3Connections: map.connections.filter(isGate),
+ };
+}
+
+export function applyChileStep3(G: GameState) {
+ if (G.map.name !== 'Chile' || G.coalMarketNorth === undefined) {
+ return;
+ }
+
+ G.coalPrices = [...prices[ResourceType.Coal]];
+ G.oilPrices = [...prices[ResourceType.Oil]];
+ G.garbagePrices = [...prices[ResourceType.Garbage]];
+ G.coalMarket += G.coalMarketNorth;
+ G.oilMarket += G.oilMarketNorth ?? 0;
+ G.garbageMarket += G.garbageMarketNorth ?? 0;
+ delete G.coalMarketNorth;
+ delete G.oilMarketNorth;
+ delete G.garbageMarketNorth;
+ delete G.coalResupplyNorth;
+ delete G.oilResupplyNorth;
+ delete G.garbageResupplyNorth;
+ delete G.coalPricesNorth;
+ delete G.oilPricesNorth;
+ delete G.garbagePricesNorth;
+ delete G.resourceResupplyNorth;
+ G.chosenSide = undefined;
+ G.log.push({ type: 'event', event: 'Step 3: the North and Central resource markets merge into one.' });
+
+ const gates = G.map.step3Connections ?? [];
+ G.map = { ...G.map, connections: [...G.map.connections, ...gates] };
+ delete G.map.step3Connections;
+ if (gates.length > 0) {
+ G.log.push({ type: 'event', event: 'Step 3: the gated connections open.' });
+ }
+
+ if (G.setAsidePlants?.length) {
+ // A replay from known draws (secret seed) already holds these plants in its Step 3 deck.
+ if (G.powerPlantDeckAfterStep3 === undefined) G.powerPlantsDeck = [...G.setAsidePlants, ...G.powerPlantsDeck];
+ G.log.push({
+ type: 'event',
+ event: `Step 3: power plants ${G.setAsidePlants.map((pp) => pp.number).join(', ')} go on top of the deck.`,
+ });
+ }
+ delete G.setAsidePlants;
+
+ // From the printed value, so boosting twice can't add two.
+ const boost = (plants: PowerPlant[]) =>
+ plants.map((pp) =>
+ pp.type == PowerPlantType.Wind
+ ? {
+ ...pp,
+ citiesPowered:
+ (plantCatalogue('Chile', gameDeck(G.options)).find((c) => c.number == pp.number)
+ ?.citiesPowered ?? pp.citiesPowered) + 1,
+ }
+ : pp
+ );
+ G.powerPlantsDeck = boost(G.powerPlantsDeck);
+ G.actualMarket = boost(G.actualMarket);
+ G.futureMarket = boost(G.futureMarket);
+ G.players.forEach((player) => (player.powerPlants = boost(player.powerPlants)));
+ if (G.chosenPowerPlant) G.chosenPowerPlant = boost([G.chosenPowerPlant])[0];
+ if (G.powerPlantDeckAfterStep3) G.powerPlantDeckAfterStep3 = boost(G.powerPlantDeckAfterStep3);
+ G.log.push({ type: 'event', event: 'Step 3: every ecological power plant now powers one more city.' });
+}
+
export function rebuildPlantMarketForChina(G: GameState) {
/*At the beginning of phase 5, the players fill the power plant market with new power plants. Depending on the
number of players, the players always add a minimum of 1, 2, or 3 power plants to the market from the supply:
@@ -3232,6 +3350,7 @@ function toResourcesPhase(G: GameState) {
G.futureMarket.pop();
startStep(G, 3, `Starting Step 3, Power Plant ${plantLabel(powerPlantDiscarded?.number)} discarded.`);
applyAustraliaStep3Shift(G);
+ applyChileStep3(G);
G.actualMarket = [...G.actualMarket, ...G.futureMarket];
G.futureMarket = [];
diff --git a/engine/src/gamestate.ts b/engine/src/gamestate.ts
index 9fe6625..a3b3b62 100644
--- a/engine/src/gamestate.ts
+++ b/engine/src/gamestate.ts
@@ -33,7 +33,8 @@ export type MapName =
| 'Japan'
| 'Australia'
| 'Bremen'
- | 'Manhattan';
+ | 'Manhattan'
+ | 'Chile';
export type Variant = 'original' | 'recharged';
// 'standard' is the base game's deck; deck1 and deck2 are The New Power Plants
// (Set 1) and Set 2. 'shuffled' plays every plant of all three decks together;
@@ -255,6 +256,8 @@ export interface GameState {
uraniumPrices?: number[];
actualMarket: PowerPlant[];
futureMarket: PowerPlant[];
+ // Chile: the ecological plants set aside at setup; emptied onto the draw stack when Step 3 begins.
+ setAsidePlants?: PowerPlant[];
chosenPowerPlant: PowerPlant | undefined;
chosenResource?: ResourceType | undefined; // Used for India map, where only one resource can be bought at a time.
// Korea: locked to the side a player bought their first resource from this turn.
diff --git a/engine/src/maps.ts b/engine/src/maps.ts
index 5f2e408..293fb99 100644
--- a/engine/src/maps.ts
+++ b/engine/src/maps.ts
@@ -7,6 +7,7 @@ import { map as benelux } from './maps/benelux';
import { map as brazil } from './maps/brazil';
import { map as bremen } from './maps/bremen';
import { map as centraleurope } from './maps/centraleurope';
+import { map as chile } from './maps/chile';
import { map as china } from './maps/china';
import { map as europe } from './maps/europe';
import { map as france } from './maps/france';
@@ -45,6 +46,8 @@ export interface City {
// 10+position*5 house-base cost — the dijkstra path cost (the 30-Elektro edge)
// is the complete cost.
singleOccupancy?: boolean;
+ // In play only with at least this many players (Chile's Tacna and Jujuy: 4).
+ minPlayers?: number;
// UK & Ireland: which physical island this city sits on ('gb' or 'ie'). Used
// together with GameMap.crossIslandSurcharge to model the two-network mechanic
// (no sea edges; starting a network on a new island costs a flat surcharge on
@@ -57,6 +60,9 @@ export interface City {
// makes links naturally asymmetric (A→B costs B, B→A costs A) and charges
// transit through unbuilt districts, matching the printed Bremen rules.
connectionCost?: number;
+ // Chile: the grid this city belongs to. Until Step 3 a player with cities buys only from their grid's market
+ // (North, or the main market for Central).
+ grid?: 'North' | 'Central';
}
export interface Connection {
@@ -91,6 +97,11 @@ export interface GameMap {
// the city coordinates. Useful for fitting non-rectangular maps into the
// viewBox (e.g., Europe).
mapRotation?: number;
+ // The point mapRotation turns around, in board coordinates (after adjustRatio). Without it, the centre of the
+ // cities in play; with it, the board sits still whichever regions are in play (Chile).
+ mapRotationCenter?: [number, number];
+ // The turn in the viewer's stacked layout (tall screens), in place of mapRotation there (Chile: north up).
+ mapRotationPortrait?: number;
buttonsPosition?: [number, number];
playerBoardsPosition?: [number, number];
supplyPosition?: [number, number];
@@ -110,6 +121,8 @@ export interface GameMap {
// for the starting arrays (no uranium row — North bans nuclear).
resupplyNorth?: number[][][];
startingResourcesNorth?: number[];
+ // Regions always in play (Chile: the two northern regions). The others are picked, or drafted, as usual.
+ fixedRegions?: string[];
coalPricesNorth?: number[];
oilPricesNorth?: number[];
garbagePricesNorth?: number[];
@@ -133,6 +146,8 @@ export interface GameMap {
actualMarket: PowerPlant[];
futureMarket: PowerPlant[];
powerPlantsDeck: PowerPlant[];
+ // Chile: the plants set aside until Step 3.
+ setAsidePlants?: PowerPlant[];
// Spain & Portugal with the shuffled decks: the held-back copies dealt.
heldPowerPlants?: PowerPlant[];
};
@@ -143,6 +158,9 @@ export interface GameMap {
// choose which spaces to block, so the selection is random within cost tiers.
blockSpaces?: (numPlayers: number, cities: City[], rng: seedrandom.prng) => string[];
regionalPowerPlants?: Record;
+ // Chile: connections that open when Step 3 begins (the gates between the grids). Until then they are kept out of
+ // `connections`, so no build or path uses them.
+ step3Connections?: Connection[];
// UK & Ireland: extra Elektro paid to start a network on an island where the
// player has no city yet. Builds on the new island skip the dijkstra path
// cost (there is no sea edge) and pay 10+position*5 + this surcharge.
@@ -186,6 +204,7 @@ export const maps: GameMap[] = [
bremen,
manhattan,
japan,
+ chile,
];
export const mapsRecharged: GameMap[] = [
@@ -214,4 +233,5 @@ export const mapsRecharged: GameMap[] = [
manhattan,
// china,
japanRecharged,
+ chile,
];
diff --git a/engine/src/maps/chile-board.ts b/engine/src/maps/chile-board.ts
new file mode 100644
index 0000000..325168e
--- /dev/null
+++ b/engine/src/maps/chile-board.ts
@@ -0,0 +1,158 @@
+// Generated by scripts/generate-chile-map.mjs from the Chile design's chile-map-data.json. Do not edit by hand:
+// change the design and regenerate.
+import { City, Connection } from './../maps';
+
+export const chileRegions = {
+ brown: 'Northern coast',
+ yellow: 'Atacama Desert',
+ purple: 'Norte Chico',
+ red: 'Santiago & Valparaíso',
+ green: 'Central Valley',
+ pink: 'Biobío & the South',
+};
+
+export const chileViewBox: [number, number] = [1683, 2542];
+
+export const chileCities: City[] = [
+ { name: 'Arica', region: 'brown', grid: 'North', x: 203, y: 201 },
+ { name: 'Iquique', region: 'brown', grid: 'North', x: 258, y: 340 },
+ { name: 'Tocopilla', region: 'brown', grid: 'North', x: 224, y: 465 },
+ { name: 'Mejillones', region: 'brown', grid: 'North', x: 110, y: 551 },
+ { name: 'Antofagasta', region: 'brown', grid: 'North', x: 191, y: 635 },
+ { name: 'Taltal', region: 'brown', grid: 'Central', x: 270, y: 756 },
+ { name: 'Chañaral', region: 'brown', grid: 'Central', x: 297, y: 849 },
+ { name: 'Pozo Almonte', region: 'yellow', grid: 'North', x: 449, y: 354 },
+ { name: 'María Elena', region: 'yellow', grid: 'North', x: 445, y: 511 },
+ { name: 'Calama', region: 'yellow', grid: 'North', x: 755, y: 520 },
+ { name: 'San Pedro', region: 'yellow', grid: 'North', x: 1058, y: 556 },
+ { name: 'Sierra Gorda', region: 'yellow', grid: 'North', x: 588, y: 574 },
+ { name: 'El Salvador', region: 'yellow', grid: 'Central', x: 701, y: 854 },
+ { name: 'Copiapó', region: 'yellow', grid: 'Central', x: 514, y: 927 },
+ { name: 'Caldera', region: 'purple', grid: 'Central', x: 235, y: 973 },
+ { name: 'Vallenar', region: 'purple', grid: 'Central', x: 406, y: 1067 },
+ { name: 'La Serena', region: 'purple', grid: 'Central', x: 290, y: 1175 },
+ { name: 'Ovalle', region: 'purple', grid: 'Central', x: 379, y: 1205 },
+ { name: 'Illapel', region: 'purple', grid: 'Central', x: 382, y: 1326 },
+ { name: 'Los Vilos', region: 'purple', grid: 'Central', x: 208, y: 1308 },
+ { name: 'Los Andes', region: 'red', grid: 'Central', x: 719, y: 1429 },
+ { name: 'Quillota', region: 'red', grid: 'Central', x: 363, y: 1468 },
+ { name: 'Viña del Mar', region: 'red', grid: 'Central', x: 210, y: 1447 },
+ { name: 'Valparaíso', region: 'red', grid: 'Central', x: 150, y: 1543 },
+ { name: 'San Antonio', region: 'red', grid: 'Central', x: 263, y: 1592 },
+ { name: 'Santiago N', region: 'red', grid: 'Central', x: 692, y: 1502 },
+ { name: 'Santiago W', region: 'red', grid: 'Central', x: 627, y: 1567 },
+ { name: 'Santiago E', region: 'green', grid: 'Central', x: 757, y: 1567 },
+ { name: 'Santiago S', region: 'green', grid: 'Central', x: 692, y: 1632 },
+ { name: 'Rancagua', region: 'green', grid: 'Central', x: 721, y: 1722 },
+ { name: 'Curicó', region: 'green', grid: 'Central', x: 638, y: 1803 },
+ { name: 'Talca', region: 'green', grid: 'Central', x: 523, y: 1873 },
+ { name: 'Chillán', region: 'green', grid: 'Central', x: 538, y: 1946 },
+ { name: 'Los Ángeles', region: 'pink', grid: 'Central', x: 525, y: 2047 },
+ { name: 'Constitución', region: 'pink', grid: 'Central', x: 148, y: 1818 },
+ { name: 'Concepción', region: 'pink', grid: 'Central', x: 181, y: 1968 },
+ { name: 'Temuco', region: 'pink', grid: 'Central', x: 458, y: 2159 },
+ { name: 'Valdivia', region: 'pink', grid: 'Central', x: 204, y: 2266 },
+ { name: 'Puerto Montt', region: 'pink', grid: 'Central', x: 427, y: 2432 },
+ { name: 'Huasco', region: 'purple', grid: 'Central', x: 156, y: 1048 },
+ { name: 'Melipilla', region: 'red', grid: 'Central', x: 489, y: 1643 },
+ { name: 'San Fernando', region: 'green', grid: 'Central', x: 789, y: 1839 },
+ { name: 'Santa Cruz', region: 'pink', grid: 'Central', x: 528, y: 1749 },
+ { name: 'Cauquenes', region: 'pink', grid: 'Central', x: 337, y: 1864 },
+ { name: 'Salta', region: '', grid: 'North', x: 1573, y: 575, singleOccupancy: true, slotCosts: [10] },
+ { name: 'Tacna', region: '', grid: 'North', x: 354, y: 110, singleOccupancy: true, slotCosts: [10], minPlayers: 4 },
+ {
+ name: 'Jujuy',
+ region: '',
+ grid: 'North',
+ x: 1560,
+ y: 713,
+ singleOccupancy: true,
+ slotCosts: [10],
+ minPlayers: 4,
+ },
+];
+
+export const chileConnections: Connection[] = [
+ { nodes: ['Arica', 'Iquique'], cost: 15 },
+ { nodes: ['Arica', 'Pozo Almonte'], cost: 14 },
+ { nodes: ['Iquique', 'Pozo Almonte'], cost: 6 },
+ { nodes: ['Iquique', 'Tocopilla'], cost: 13 },
+ { nodes: ['Tocopilla', 'Mejillones'], cost: 10 },
+ { nodes: ['Mejillones', 'Antofagasta'], cost: 6 },
+ { nodes: ['Pozo Almonte', 'María Elena'], cost: 12 },
+ { nodes: ['Tocopilla', 'María Elena'], cost: 5 },
+ { nodes: ['Antofagasta', 'Sierra Gorda'], cost: 12 },
+ { nodes: ['María Elena', 'Calama'], cost: 8 },
+ { nodes: ['Calama', 'San Pedro'], cost: 7 },
+ { nodes: ['Calama', 'Sierra Gorda'], cost: 6 },
+ { nodes: ['San Pedro', 'Sierra Gorda'], cost: 10 },
+ { nodes: ['Taltal', 'Chañaral'], cost: 9 },
+ { nodes: ['Chañaral', 'El Salvador'], cost: 8 },
+ { nodes: ['Chañaral', 'Caldera'], cost: 8 },
+ { nodes: ['El Salvador', 'Copiapó'], cost: 10 },
+ { nodes: ['Caldera', 'Copiapó'], cost: 5 },
+ { nodes: ['Copiapó', 'Vallenar'], cost: 10 },
+ { nodes: ['Vallenar', 'La Serena'], cost: 13 },
+ { nodes: ['Ovalle', 'Illapel'], cost: 9 },
+ { nodes: ['Illapel', 'Los Vilos'], cost: 6 },
+ { nodes: ['Los Vilos', 'Quillota'], cost: 9 },
+ { nodes: ['Illapel', 'Los Andes'], cost: 10 },
+ { nodes: ['Quillota', 'Viña del Mar'], cost: 5 },
+ { nodes: ['Viña del Mar', 'Valparaíso'], cost: 3 },
+ { nodes: ['Quillota', 'Los Andes'], cost: 8 },
+ { nodes: ['Valparaíso', 'San Antonio'], cost: 8 },
+ { nodes: ['Quillota', 'Santiago N'], cost: 7 },
+ { nodes: ['Valparaíso', 'Santiago W'], cost: 9 },
+ { nodes: ['San Antonio', 'Santiago W'], cost: 8 },
+ { nodes: ['Los Andes', 'Santiago E'], cost: 7 },
+ { nodes: ['Santiago N', 'Santiago E'], cost: 0 },
+ { nodes: ['Santiago E', 'Santiago S'], cost: 0 },
+ { nodes: ['Santiago S', 'Santiago W'], cost: 0 },
+ { nodes: ['Santiago W', 'Santiago N'], cost: 0 },
+ { nodes: ['Santiago S', 'Rancagua'], cost: 6 },
+ { nodes: ['Curicó', 'Talca'], cost: 4 },
+ { nodes: ['Talca', 'Chillán'], cost: 9 },
+ { nodes: ['Chillán', 'Los Ángeles'], cost: 7 },
+ { nodes: ['San Antonio', 'Constitución'], cost: 13 },
+ { nodes: ['Los Ángeles', 'Concepción'], cost: 8 },
+ { nodes: ['Los Ángeles', 'Temuco'], cost: 11 },
+ { nodes: ['Temuco', 'Valdivia'], cost: 9 },
+ { nodes: ['Valdivia', 'Puerto Montt'], cost: 12 },
+ { nodes: ['Temuco', 'Puerto Montt'], cost: 16 },
+ { nodes: ['San Pedro', 'Salta'], cost: 20 },
+ { nodes: ['Arica', 'Tacna'], cost: 12 },
+ { nodes: ['San Pedro', 'Jujuy'], cost: 20 },
+ { nodes: ['Caldera', 'Huasco'], cost: 11 },
+ { nodes: ['Huasco', 'Vallenar'], cost: 6 },
+ { nodes: ['Huasco', 'La Serena'], cost: 11 },
+ { nodes: ['Vallenar', 'Ovalle'], cost: 14 },
+ { nodes: ['La Serena', 'Ovalle'], cost: 5 },
+ { nodes: ['La Serena', 'Los Vilos'], cost: 14 },
+ { nodes: ['Los Vilos', 'Viña del Mar'], cost: 9 },
+ { nodes: ['Los Andes', 'Santiago N'], cost: 7 },
+ { nodes: ['Santiago W', 'Melipilla'], cost: 6 },
+ { nodes: ['San Antonio', 'Melipilla'], cost: 6 },
+ { nodes: ['Santiago S', 'Melipilla'], cost: 6 },
+ { nodes: ['Melipilla', 'Rancagua'], cost: 7 },
+ { nodes: ['Santiago E', 'San Fernando'], cost: 10 },
+ { nodes: ['Rancagua', 'San Fernando'], cost: 6 },
+ { nodes: ['San Fernando', 'Curicó'], cost: 6 },
+ { nodes: ['Rancagua', 'Curicó'], cost: 7 },
+ { nodes: ['San Antonio', 'Santa Cruz'], cost: 9 },
+ { nodes: ['Melipilla', 'Santa Cruz'], cost: 9 },
+ { nodes: ['Santa Cruz', 'Constitución'], cost: 9 },
+ { nodes: ['Santa Cruz', 'Cauquenes'], cost: 11 },
+ { nodes: ['Constitución', 'Cauquenes'], cost: 7 },
+ { nodes: ['Constitución', 'Concepción'], cost: 12 },
+ { nodes: ['Cauquenes', 'Concepción'], cost: 9 },
+ { nodes: ['Cauquenes', 'Los Ángeles'], cost: 11 },
+ { nodes: ['Concepción', 'Temuco'], cost: 14 },
+ { nodes: ['Mejillones', 'María Elena'], cost: 12 },
+ { nodes: ['Taltal', 'El Salvador'], cost: 14 },
+];
+
+/** The gates between the grids: closed until Step 3. */
+export const chileGates: Connection[] = [
+ { nodes: ['Antofagasta', 'Taltal'], cost: 13 },
+ { nodes: ['Sierra Gorda', 'El Salvador'], cost: 20 },
+];
diff --git a/engine/src/maps/chile.ts b/engine/src/maps/chile.ts
new file mode 100644
index 0000000..81c2467
--- /dev/null
+++ b/engine/src/maps/chile.ts
@@ -0,0 +1,206 @@
+// Chile, designed by Mike Isom (draft, in testing). The board itself is generated into chile-board.ts.
+import { cloneDeep } from 'lodash';
+import seedrandom from 'seedrandom';
+import { PowerPlant, PowerPlantDeck, PowerPlantType, SingleDeck } from '../gamestate';
+import { shuffle } from '../utils';
+import { originalTopPlants, removedPlants } from './../deckChanges';
+import { GameMap } from './../maps';
+import { dealtCatalogue, isPlugPlant, plantCatalogue } from './../powerPlants';
+import { chileCities, chileConnections, chileGates } from './chile-board';
+
+/** No nuclear power in Chile: the standard deck's uranium plants are out of the game. Fusion plant 50 stays. */
+export const chileRemovedPlants = [11, 17, 23, 28, 34, 39];
+/**
+ * The three largest ecological plants of each single deck, set aside at setup; they go on top of the draw stack when
+ * Step 3 begins (smallest on top). Deck 1's 44 is fusion, not ecological.
+ */
+export const chileSetAsidePlants: Record = {
+ standard: [33, 37, 44],
+ deck1: [26, 32, 39],
+ deck2: [31, 36, 44],
+};
+
+const isShuffledDeck = (deck: PowerPlantDeck) => deck == 'shuffled' || deck == 'shuffledUnique';
+
+/**
+ * The plants Chile sets aside from the plants dealt (uranium already out): each single deck's own three; with the
+ * shuffled decks, the three largest ecological plants dealt, whichever deck they came from (all of them, when a
+ * sampled deck deals three or fewer). Smallest first, the order they go on top of the deck.
+ */
+export function chileSetAsideFrom(dealt: PowerPlant[], deck: PowerPlantDeck): PowerPlant[] {
+ if (!isShuffledDeck(deck)) {
+ return chileSetAsidePlants[deck as SingleDeck].map((n) => dealt.find((pp) => pp.number == n)!);
+ }
+ return dealt
+ .filter((pp) => pp.type == PowerPlantType.Wind)
+ .sort((a, b) => a.number - b.number)
+ .slice(-3);
+}
+
+/** Chile, Step 3 began: the set-aside plants, read back from the log's Step 3 event (smallest first). */
+export function chileSetAsideFromLog(log: { type: string; event?: string }[]): number[] | undefined {
+ for (const entry of log) {
+ const match = /^Step 3: power plants ([\d., ]+) go on top of the deck\.$/.exec(entry.event ?? '');
+ if (match) return match[1].split(', ').map(Number);
+ }
+ return undefined;
+}
+
+export const map: GameMap = {
+ name: 'Chile',
+ cities: chileCities,
+ connections: chileConnections,
+ step3Connections: chileGates,
+ // The two northern regions, each holding a gate, are always in play.
+ fixedRegions: ['brown', 'yellow'],
+ // Viewer layout: the board (drawn upright, north at the top, at 1683 x 2542, stretched 2x east-west) at 70%. On
+ // wide screens it is turned to run diagonally from the top left (north) to the bottom right; on tall screens (the
+ // stacked layout) it stays upright. It turns around the whole board's centre, so it sits still whichever regions
+ // are in play. Plant market along the top, player boards on the right, North and Central markets side by side
+ // underneath.
+ layout: 'Landscape',
+ adjustRatio: [0.7, 0.7],
+ mapRotation: -70,
+ mapRotationPortrait: 0,
+ mapRotationCenter: [589, 890],
+ mapPosition: [197, -259],
+ viewBox: [2010, 1250],
+ playerBoardsPosition: [1650, 240],
+ supplyPosition: [0, 990],
+ roundInfoPosition: [1520, 1050],
+ // Central market (the engine's main market). [resource][players-2][step-1]. The Step 3 column is
+ // the merged market's restock.
+ resupply: [
+ // Coal
+ [
+ [2, 3, 4],
+ [3, 3, 4],
+ [3, 4, 5],
+ [3, 5, 4],
+ [4, 6, 6],
+ ],
+ // Oil
+ [
+ [1, 1, 4],
+ [1, 1, 4],
+ [2, 1, 5],
+ [2, 1, 5],
+ [3, 1, 7],
+ ],
+ // Garbage
+ [
+ [1, 2, 4],
+ [1, 2, 4],
+ [2, 3, 5],
+ [3, 3, 4],
+ [3, 5, 6],
+ ],
+ // Uranium: none
+ [
+ [0, 0, 0],
+ [0, 0, 0],
+ [0, 0, 0],
+ [0, 0, 0],
+ [0, 0, 0],
+ ],
+ ],
+ // North market, restocked first. It has no garbage, and it is gone in Step 3.
+ resupplyNorth: [
+ // Coal
+ [
+ [2, 3, 0],
+ [1, 3, 0],
+ [2, 3, 0],
+ [2, 3, 0],
+ [3, 4, 0],
+ ],
+ // Oil
+ [
+ [1, 1, 0],
+ [1, 1, 0],
+ [1, 1, 0],
+ [2, 1, 0],
+ [2, 1, 0],
+ ],
+ // Garbage: none
+ [
+ [0, 0, 0],
+ [0, 0, 0],
+ [0, 0, 0],
+ [0, 0, 0],
+ [0, 0, 0],
+ ],
+ ],
+ // Central: 12 coal on [1,1,1,1,2,2,2,2] slots per price; 10 oil on spaces 4-8 and 4 garbage on spaces 7-8 of
+ // 16-slot tracks. North: 12 coal on [2,2,2,2,1,1,1,1] slots and 8 oil filling an 8-slot track; no garbage track.
+ // Markets fill from the expensive end. Supply: 24 each of coal, oil and garbage across both markets; no uranium.
+ startingResources: [12, 10, 4, 0],
+ startingResourcesNorth: [12, 8, 0],
+ startingSupply: [24, 24, 24, 0],
+ coalPrices: [1, 2, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8],
+ oilPrices: [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8],
+ garbagePrices: [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8],
+ coalPricesNorth: [1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8],
+ oilPricesNorth: [1, 2, 3, 4, 5, 6, 7, 8],
+ garbagePricesNorth: [],
+ // The deck without its uranium plants and the set-aside plants, built as usual except that no plants are removed
+ // for the number of players.
+ setupDeck(
+ numPlayers: number,
+ variant: string,
+ rng: seedrandom.prng,
+ powerPlantDeck: PowerPlantDeck = 'standard',
+ _fusionEcological?: boolean,
+ sampleShuffled?: boolean
+ ) {
+ const shuffled = isShuffledDeck(powerPlantDeck);
+ const single = powerPlantDeck as SingleDeck;
+ const removed = new Set(removedPlants('Chile', powerPlantDeck, numPlayers, variant));
+ const dealt = cloneDeep(
+ shuffled ? dealtCatalogue('Chile', powerPlantDeck, rng, sampleShuffled) : plantCatalogue('Chile', single)
+ ).filter((pp) => !removed.has(pp.number));
+ const setAsidePlants = chileSetAsideFrom(dealt, powerPlantDeck);
+ let deck: PowerPlant[] = dealt.filter((pp) => !setAsidePlants.includes(pp));
+ const step3 = deck.pop()!;
+ let actualMarket: PowerPlant[];
+ let futureMarket: PowerPlant[];
+
+ if (variant == 'original') {
+ const market = deck.splice(0, 8); // The eight smallest: 3-10 in the standard deck
+ actualMarket = market.slice(0, 4);
+ futureMarket = market.slice(4);
+ // The smallest ecological plant left; each single deck names it (Deck 1's 10 opens in the deck, not on top).
+ // A shuffled deck may have none left, and then nothing goes on top.
+ const topNumber = shuffled
+ ? deck.find((pp) => pp.type == PowerPlantType.Wind)?.number
+ : originalTopPlants('Chile', single)[0];
+ const topIndex = deck.findIndex((pp) => pp.number == topNumber);
+ const top = topIndex >= 0 ? deck.splice(topIndex, 1) : [];
+ deck = shuffle(deck, rng() + '');
+ deck.unshift(...top);
+ } else {
+ // The plug-back plants (3-15 in the standard deck, 12 of them without 11): eight open the market, one
+ // goes on top of the deck and the rest are shuffled into it.
+ const initial = shuffle(
+ deck.filter((pp) => isPlugPlant(pp, powerPlantDeck)),
+ rng() + ''
+ );
+ deck = deck.filter((pp) => !isPlugPlant(pp, powerPlantDeck));
+ const market = initial.splice(0, 8).sort((a, b) => a.number - b.number);
+ actualMarket = market.slice(0, 4);
+ futureMarket = market.slice(4);
+ const first = initial.shift()!;
+ deck = shuffle(shuffle(deck, rng() + '').concat(initial), rng() + '');
+ deck.unshift(first);
+ }
+ deck.push(step3);
+ return { actualMarket, futureMarket, powerPlantsDeck: deck, setAsidePlants };
+ },
+ mapSpecificRules:
+ 'Chile has two separate resource markets: North and Central. Until Step 3, you may only buy from the market of the grid your cities are in; if you have no cities, choose one market for that turn.\n' +
+ 'There is no uranium: all uranium power plants are removed and there is no uranium market. No power plants are removed for the number of players.\n' +
+ 'The three largest ecological power plants are set aside at setup.\n' +
+ 'Both markets share one supply. During bureaucracy, North restocks first, then Central. Garbage is only restocked in the Central market. In Step 2, oil restocks only 1 per market.\n' +
+ 'Gated connections cannot be built across until Step 3. The border spaces (Salta; with 4-6 players also Tacna and Jujuy) hold one city each, cost $10 plus the connection, and cannot be your first city.\n' +
+ 'Step 3: the two markets merge into one, the gated connections open, the set-aside ecological plants go on top of the deck, and every ecological plant (except fusion) powers one additional city.',
+};
diff --git a/scripts/achievement-map-framing.py b/scripts/achievement-map-framing.py
index e761be0..b75dfcb 100644
--- a/scripts/achievement-map-framing.py
+++ b/scripts/achievement-map-framing.py
@@ -9,6 +9,7 @@ import math
from pathlib import Path
from shapely.geometry import shape, box
from shapely.ops import transform
+from shapely import affinity
ROOT = Path(__file__).resolve().parents[1]
SOURCE = 'viewer/scripts/geography/source.json'
@@ -38,20 +39,31 @@ FRAMES = {
'australia': ((112, -44, 154, -10), 'Australian mainland and Tasmania; omit external Indian/Pacific Ocean territories.'),
'bremen': ((8.4, 52.98, 9.03, 53.27), 'Bremen city component; omit detached Bremerhaven to preserve city silhouette.'),
'manhattan': ((-74.025, 40.68, -73.9, 40.885), 'Manhattan main island; omit tiny detached borough islets.'),
+ 'chile': ((-76, -43, -66, -17), 'Chile from Arica to Puerto Montt, the stretch on the board; widened 2x east-west and turned 40 degrees, as on the board, so the thin country reads at badge size.'),
}
+# Maps whose outline is not in SOURCE (Chile, in testing, has its own Natural Earth cut).
+SOURCES = {'chile': 'viewer/scripts/geography/chile-badge.json'}
+# Chile only: the board's east-west widening and the turn it is drawn at (degrees, clockwise on screen).
+SHAPES = {'chile': dict(widen=2, turn=-40)}
+
+def source_for(name):
+ return SOURCES.get(name, SOURCE)
def polygons(geometry):
return [geometry] if geometry.geom_type == 'Polygon' else [p for p in geometry.geoms if p.geom_type == 'Polygon']
def framed_map(name):
- data = json.loads((ROOT / SOURCE).read_text())['maps'][name]
+ data = json.loads((ROOT / source_for(name)).read_text(encoding='utf-8'))['maps'][name]
bounds, reason = FRAMES[name]
+ shaping = SHAPES.get(name, {})
# Local equirectangular projection preserves a sensible geographic aspect;
# unlike the viewer's city-fitted warp it never joins separate islands.
- cosine = math.cos(math.radians((bounds[1] + bounds[3]) / 2))
+ cosine = math.cos(math.radians((bounds[1] + bounds[3]) / 2)) * shaping.get('widen', 1)
project = lambda x, y, z=None: (x * cosine, -y)
selected = shape(data['active']).intersection(box(*bounds))
projected = transform(project, selected)
+ if shaping.get('turn'):
+ projected = affinity.rotate(projected, shaping['turn'], origin='centroid')
parts = polygons(projected)
# Remove subpixel islands BEFORE fitting, so a remote speck cannot set scale.
largest = max(p.area for p in parts)
@@ -69,5 +81,5 @@ def framed_map(name):
metrics = dict(window=list(bounds), reason=reason, components=len(parts),
bounds=[x0*scale+tx,y0*scale+ty,x1*scale+tx,y1*scale+ty],
principalSpan=max(max(p.bounds[2]-p.bounds[0],p.bounds[3]-p.bounds[1]) for p in screen),
- simplifyTolerance=.45, minRelativeArea=.003)
+ simplifyTolerance=.45, minRelativeArea=.003, **shaping)
return paths, metrics
diff --git a/scripts/check-achievement-art.py b/scripts/check-achievement-art.py
index f04d85f..a46a8d2 100644
--- a/scripts/check-achievement-art.py
+++ b/scripts/check-achievement-art.py
@@ -11,8 +11,11 @@ root = Path(__file__).resolve().parents[1]
folder = root / 'art/achievements'
manifest = json.loads((folder / 'manifest.json').read_text())
baseline = json.loads((root / 'docs/releases/achievements-2.0.33.json').read_text())['achievementManifest']
-assert [a['id'] for a in manifest['assets']] == [a['id'] for a in baseline['achievements']]
-assert len(manifest['assets']) == 36
+# Revision 4 adds Chile Champion after the other map badges.
+baseline_ids = [a['id'] for a in baseline['achievements']]
+baseline_ids.insert(27, 'chile-champion')
+assert [a['id'] for a in manifest['assets']] == baseline_ids
+assert len(manifest['assets']) == 37
framing = runpy.run_path(str(root / 'scripts/achievement-map-framing.py'))
assert manifest['framingSha256'] == hashlib.sha256((root / 'scripts/achievement-map-framing.py').read_bytes()).hexdigest()
assert manifest['generatorSha256'] == hashlib.sha256((root / 'scripts/generate-achievement-art.py').read_bytes()).hexdigest()
@@ -51,9 +54,10 @@ for a in manifest['assets']:
cyan = sum(1 for r,g,b,alpha in pixels.get_flattened_data()
if alpha > 200 and g > r*1.3 and b > r*1.3 and g > 110)
assert cyan >= size*size*.025, (a['id'], size, cyan)
-assert sum(bool(a['source']) for a in manifest['assets']) == 24
+assert sum(bool(a['source']) for a in manifest['assets']) == 25
old = subprocess.check_output(['git', 'show', 'c52a87e4b9c41feb35d8e902643514d99fe722f1:engine/src/achievements.ts'], cwd=root).decode()
-new = (root / 'engine/src/achievements.ts').read_text()
+# The evaluator is unchanged apart from Chile's line in the map table.
+new = (root / 'engine/src/achievements.ts').read_text().replace(" Chile: 'chile-champion'," + chr(10), '')
assert old.split('export function achievementDefinitions')[0] == new.split('export function achievementDefinitions')[0]
assert old.split('function tied(')[1] == new.split('function tied(')[1]
-print('36 unique decoded 256px PNGs; 24 hashed geographic sources; full IDs/definitions and evaluator unchanged.')
+print('37 unique decoded 256px PNGs; 25 hashed geographic sources; full IDs/definitions and evaluator unchanged.')
diff --git a/scripts/check-packed-achievement-art.cjs b/scripts/check-packed-achievement-art.cjs
index 1f1b859..305f9d0 100644
--- a/scripts/check-packed-achievement-art.cjs
+++ b/scripts/check-packed-achievement-art.cjs
@@ -4,21 +4,37 @@ const fs = require('node:fs');
const path = require('node:path');
const modules = path.resolve(process.argv[2]);
const wrapper = require(path.join(modules, 'powergrid-engine/dist/wrapper.js'));
-const { achievementManifestSchema, achievementResultsSchema } = require(require.resolve('@boardgamers/protocol/achievements', { paths: [modules] }));
+const { achievementManifestSchema, achievementResultsSchema } = require(require.resolve(
+ '@boardgamers/protocol/achievements',
+ { paths: [modules] }
+));
const old = require('../docs/releases/achievements-2.0.33.json').achievementManifest;
const art = require('../art/achievements/manifest.json');
const manifest = wrapper.achievementDefinitions();
assert.equal(require(path.join(modules, 'powergrid-engine/package.json')).version, '2.0.34');
achievementManifestSchema.parse(manifest);
-assert.equal(manifest.revision, 3);
-assert.deepEqual(manifest.achievements.map(({ icon, ...rest }) => rest), old.achievements);
-assert.deepEqual(manifest.achievements.map(({ icon }) => icon), art.assets.map(({ key }) => ({ type: 'asset', key })));
+assert.equal(manifest.revision, 4);
+// Revision 4 only adds Chile Champion, after the other map badges.
+const chile = { id: 'chile-champion', name: 'Chile Champion', description: 'Win on the Chile map.' };
+assert.deepEqual(
+ manifest.achievements.map(({ icon, ...rest }) => rest),
+ [...old.achievements.slice(0, 27), chile, ...old.achievements.slice(27)]
+);
+assert.deepEqual(
+ manifest.achievements.map(({ icon }) => icon),
+ art.assets.map(({ key }) => ({ type: 'asset', key }))
+);
for (const fixture of ['GermanyRecharged', 'USAOriginal']) {
const data = JSON.parse(fs.readFileSync(path.join(__dirname, '../engine/src/fixtures', fixture + '.json')));
const completed = wrapper.replay(data);
const results = wrapper.achievements(completed);
achievementResultsSchema(manifest, completed.players.length).parse(results);
assert.equal(results.length, completed.players.length);
- assert.deepEqual(results.map((r) => r.outcome), wrapper.rankings(completed).map((rank) => rank === 1 ? 'win' : 'loss'));
+ assert.deepEqual(
+ results.map((r) => r.outcome),
+ wrapper.rankings(completed).map((rank) => (rank === 1 ? 'win' : 'loss'))
+ );
}
-console.log('Exact installed 2.0.34 tarball: 36 stable refs, revision 3, published schema and two replay fixtures pass.');
+console.log(
+ 'Exact installed 2.0.34 tarball: 37 stable refs, revision 4, published schema and two replay fixtures pass.'
+);
diff --git a/scripts/generate-achievement-art.py b/scripts/generate-achievement-art.py
index fde6dc0..25ff80b 100644
--- a/scripts/generate-achievement-art.py
+++ b/scripts/generate-achievement-art.py
@@ -13,8 +13,11 @@ OUT = ROOT / 'art/achievements'
OUT.mkdir(parents=True, exist_ok=True)
GOLD, INK, BLUE, WHITE = '#ffcf66', '#102b3b', '#65d4d1', '#f4f5de'
BASE = json.loads((ROOT / 'docs/releases/achievements-2.0.33.json').read_text())['achievementManifest']
+# Revision 4 adds Chile Champion after the 24 map badges of revision 3.
+CHILE = dict(id='chile-champion', name='Chile Champion', description='Win on the Chile map.')
+BASE['achievements'].insert(27, CHILE)
FRAMING = runpy.run_path(str(ROOT / 'scripts/achievement-map-framing.py'))
-MAPS = dict(zip([d['id'] for d in BASE['achievements'][3:27]], ['germany','america','france','japan','brazil','spainportugal','indian','italy','quebec','middleeast','china','benelux','russia','centraleurope','badenwurttemberg','northerneurope','korea','europe','northamerica','southafrica','ukireland','australia','bremen','manhattan']))
+MAPS = dict(zip([d['id'] for d in BASE['achievements'][3:28]], ['germany','america','france','japan','brazil','spainportugal','indian','italy','quebec','middleeast','china','benelux','russia','centraleurope','badenwurttemberg','northerneurope','korea','europe','northamerica','southafrica','ukireland','australia','bremen','manhattan','chile']))
def path(d, fill=BLUE, stroke=INK, width=2):
return f''
def line(a,b,color=BLUE,width=3):
@@ -37,7 +40,7 @@ def motif(id):
if id in MAPS:
paths, _ = FRAMING['framed_map'](MAPS[id])
body=''.join(path(d,BLUE,WHITE,1.25) for d in paths)
- return body+crown(64,21), FRAMING['SOURCE']
+ return body+crown(64,21), FRAMING['source_for'](MAPS[id])
if id=='grid-champion':
return crown()+path('M64,38 L46,91 M64,38 L82,91 M49,58 H79 M44,73 H84 M55,62 L75,84 M73,62 L53,84','none',BLUE,4)+house(33,85,.8,True)+house(95,85,.8,True),None
if id=='head-to-head':
@@ -75,7 +78,7 @@ for item in manifest:
if item['id'] in MAPS:
item['map'] = MAPS[item['id']]
item['framing'] = FRAMING['framed_map'](item['map'])[1]
-(OUT/'manifest.json').write_text(json.dumps(dict(game='powergrid',engine='2.0.34',revision=3,provenance='PROVENANCE.md',framingSha256=hashlib.sha256((ROOT/'scripts/achievement-map-framing.py').read_bytes()).hexdigest(),generatorSha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),assets=manifest),indent=2)+'\n')
+(OUT/'manifest.json').write_text(json.dumps(dict(game='powergrid',engine='2.0.35',revision=4,provenance='PROVENANCE.md',framingSha256=hashlib.sha256((ROOT/'scripts/achievement-map-framing.py').read_bytes()).hexdigest(),generatorSha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),assets=manifest),indent=2)+'\n')
# Actual raster exports composited at display sizes, not enlarged SVG screenshots.
for size in [32,48,64]:
sheet=Image.new('RGB',(960,6*(size+55)*2),'#eef1f3'); draw=ImageDraw.Draw(sheet)
diff --git a/scripts/generate-chile-map.mjs b/scripts/generate-chile-map.mjs
new file mode 100644
index 0000000..55cc890
--- /dev/null
+++ b/scripts/generate-chile-map.mjs
@@ -0,0 +1,55 @@
+// Writes engine/src/maps/chile-board.ts from the Chile design's board data (chile-map-data.json, the source of truth).
+// node scripts/generate-chile-map.mjs
+// Regions become their colours (as on the other maps); Salta, in no region, gets the empty region '' and keeps its
+// one slot cost (its $10 house). Each city carries its grid (North or Central).
+// Connections marked closedUntilStep3 go to step3Connections, which join the board when Step 3 begins.
+import fs from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const source = process.argv[2];
+if (!source) {
+ console.error('usage: node scripts/generate-chile-map.mjs ');
+ process.exit(1);
+}
+const data = JSON.parse(fs.readFileSync(source, 'utf8'));
+const colour = Object.fromEntries(data.regions.map((r) => [r.name, r.color]));
+const q = (s) => `'${s.replace(/'/g, "\\'")}'`;
+
+const cities = data.cities.map((c) => {
+ const extra =
+ (c.singleOccupancy ? ', singleOccupancy: true' : '') +
+ (c.slotCosts ? `, slotCosts: [${c.slotCosts.join(', ')}]` : '') +
+ (c.minPlayers ? `, minPlayers: ${c.minPlayers}` : '');
+ if (c.grid !== 'North' && c.grid !== 'Central') throw new Error(`${c.name} has no grid`);
+ const region = q(c.region ? colour[c.region] : '');
+ return ` { name: ${q(c.name)}, region: ${region}, grid: ${q(c.grid)}, x: ${c.x}, y: ${c.y}${extra} },`;
+});
+const conn = (c) => ` { nodes: [${q(c.nodes[0])}, ${q(c.nodes[1])}], cost: ${c.cost} },`;
+const open = data.connections.filter((c) => !c.closedUntilStep3).map(conn);
+const gates = data.connections.filter((c) => c.closedUntilStep3).map(conn);
+
+const out = `// Generated by scripts/generate-chile-map.mjs from the Chile design's chile-map-data.json. Do not edit by hand:
+// change the design and regenerate.
+import { City, Connection } from './../maps';
+
+export const chileRegions = ${JSON.stringify(Object.fromEntries(data.regions.map((r) => [r.color, r.name])))};
+
+export const chileViewBox: [number, number] = [${data.viewBox[0]}, ${data.viewBox[1]}];
+
+export const chileCities: City[] = [
+${cities.join('\n')}
+];
+
+export const chileConnections: Connection[] = [
+${open.join('\n')}
+];
+
+/** The gates between the grids: closed until Step 3. */
+export const chileGates: Connection[] = [
+${gates.join('\n')}
+];
+`;
+const target = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'engine', 'src', 'maps', 'chile-board.ts');
+fs.writeFileSync(target, out);
+console.log(`wrote ${target}: ${data.cities.length} cities, ${open.length} connections, ${gates.length} gates`);
diff --git a/viewer/scripts/geography/chile-badge.json b/viewer/scripts/geography/chile-badge.json
new file mode 100644
index 0000000..baa07d5
--- /dev/null
+++ b/viewer/scripts/geography/chile-badge.json
@@ -0,0 +1 @@
+{"note":"Chile for the Chile Champion badge only (scripts/achievement-map-framing.py): Natural Earth 1:50m admin-0 countries, Chile polygons (ne_50m_admin_0_countries.geojson, natural-earth-vector revision ca96624), public domain. Lon/lat MultiPolygon.","maps":{"chile":{"name":"Chile","active":{"type":"MultiPolygon","coordinates":[[[[-78.8042,-33.6465],[-78.9834,-33.6678],[-78.9895,-33.6617],[-78.9793,-33.6441],[-78.9381,-33.6136],[-78.8883,-33.5764],[-78.8774,-33.5752],[-78.859,-33.5781],[-78.8382,-33.5851],[-78.7847,-33.6102],[-78.7689,-33.6273],[-78.7747,-33.6416],[-78.8042,-33.6465]]],[[[-70.4183,-18.3456],[-70.3775,-18.3336],[-70.2823,-18.3254],[-70.1838,-18.3252],[-70.0591,-18.2835],[-69.9264,-18.2061],[-69.8397,-18.0935],[-69.8026,-17.9902],[-69.8024,-17.9],[-69.8415,-17.7852],[-69.8521,-17.7038],[-69.8061,-17.6649],[-69.6848,-17.6498],[-69.5864,-17.5732],[-69.5109,-17.5061],[-69.495,-17.6195],[-69.358,-17.7717],[-69.3134,-17.9432],[-69.2823,-17.9648],[-69.0939,-18.0505],[-69.0904,-18.0707],[-69.1181,-18.1027],[-69.1455,-18.144],[-69.1264,-18.2024],[-69.0923,-18.2824],[-69.081,-18.3566],[-69.0602,-18.433],[-69.0394,-18.5501],[-69.0268,-18.6563],[-68.9789,-18.813],[-68.9691,-18.9097],[-68.9683,-18.968],[-68.931,-19.0252],[-68.858,-19.0934],[-68.7591,-19.1622],[-68.6807,-19.2424],[-68.6206,-19.2967],[-68.5479,-19.3411],[-68.492,-19.3819],[-68.4702,-19.41],[-68.4629,-19.4328],[-68.487,-19.4544],[-68.5753,-19.5602],[-68.6983,-19.7211],[-68.6962,-19.7407],[-68.5783,-19.8565],[-68.5594,-19.9023],[-68.5607,-19.9671],[-68.6002,-20.0449],[-68.7275,-20.0696],[-68.7558,-20.0908],[-68.7593,-20.1155],[-68.73,-20.1484],[-68.7346,-20.2252],[-68.6886,-20.3101],[-68.7123,-20.339],[-68.7592,-20.378],[-68.7605,-20.4162],[-68.7452,-20.4586],[-68.6958,-20.493],[-68.4999,-20.612],[-68.4843,-20.6284],[-68.4874,-20.6407],[-68.5632,-20.7201],[-68.571,-20.7691],[-68.5689,-20.8498],[-68.5583,-20.902],[-68.5338,-20.9236],[-68.4355,-20.9482],[-68.3139,-21.1297],[-68.197,-21.3003],[-68.1985,-21.4473],[-68.1864,-21.6186],[-68.1122,-21.753],[-68.1018,-21.8606],[-68.0768,-21.9828],[-67.9884,-22.0571],[-67.9539,-22.204],[-67.9449,-22.2822],[-67.9504,-22.3337],[-67.8817,-22.4934],[-67.8737,-22.6306],[-67.89,-22.7292],[-67.8892,-22.7842],[-67.8794,-22.8229],[-67.8205,-22.8577],[-67.7944,-22.8795],[-67.7073,-22.8892],[-67.5799,-22.8917],[-67.3623,-22.8552],[-67.1949,-22.8217],[-67.0088,-23.0014],[-67.0897,-23.2451],[-67.2191,-23.634],[-67.3191,-23.9347],[-67.3356,-23.9748],[-67.3562,-24.0338],[-67.5718,-24.1189],[-67.8862,-24.2434],[-68.0474,-24.3083],[-68.2503,-24.392],[-68.2995,-24.4604],[-68.3581,-24.4973],[-68.4226,-24.5451],[-68.4471,-24.597],[-68.5073,-24.6298],[-68.562,-24.7474],[-68.562,-24.8377],[-68.5271,-24.8992],[-68.4663,-24.9252],[-68.4471,-24.9989],[-68.428,-25.051],[-68.3842,-25.0919],[-68.3952,-25.1247],[-68.4307,-25.1493],[-68.4963,-25.163],[-68.5408,-25.2367],[-68.5921,-25.42],[-68.6003,-25.4856],[-68.5419,-25.6516],[-68.5108,-25.741],[-68.4268,-26.0654],[-68.4145,-26.1537],[-68.5298,-26.277],[-68.5758,-26.352],[-68.5922,-26.4181],[-68.5916,-26.4704],[-68.5812,-26.5184],[-68.4851,-26.6703],[-68.3733,-26.8064],[-68.3187,-26.8775],[-68.3187,-26.9732],[-68.346,-27.0279],[-68.4054,-27.0481],[-68.5374,-27.0854],[-68.5921,-27.14],[-68.6522,-27.1483],[-68.7096,-27.1045],[-68.7698,-27.1154],[-68.8463,-27.1537],[-68.8751,-27.2467],[-68.942,-27.4052],[-68.9994,-27.449],[-69.0422,-27.57],[-69.1185,-27.7436],[-69.1553,-27.8481],[-69.1744,-27.9247],[-69.2512,-27.9736],[-69.3407,-28.0708],[-69.4096,-28.1653],[-69.4369,-28.1927],[-69.4889,-28.2009],[-69.5271,-28.2856],[-69.6569,-28.4136],[-69.6879,-28.562],[-69.7349,-28.6411],[-69.7432,-28.7839],[-69.8148,-29.0455],[-69.8279,-29.1032],[-69.9003,-29.1488],[-69.9956,-29.25],[-70.0268,-29.324],[-69.9826,-29.5454],[-69.9276,-29.7691],[-69.9241,-29.874],[-69.9455,-30.0164],[-69.96,-30.0783],[-69.9235,-30.1039],[-69.8634,-30.1203],[-69.8443,-30.175],[-69.888,-30.2133],[-69.9071,-30.2816],[-69.9563,-30.3582],[-70.102,-30.3883],[-70.1532,-30.3609],[-70.1696,-30.3855],[-70.1614,-30.4402],[-70.1939,-30.5047],[-70.2694,-30.6772],[-70.3192,-30.834],[-70.3481,-30.9023],[-70.3364,-30.9598],[-70.3118,-30.9926],[-70.3091,-31.0227],[-70.3506,-31.0604],[-70.3884,-31.1211],[-70.4294,-31.1293],[-70.4731,-31.1128],[-70.5196,-31.1484],[-70.5291,-31.2229],[-70.5547,-31.3174],[-70.5664,-31.4279],[-70.5852,-31.5694],[-70.5256,-31.6664],[-70.4501,-31.8419],[-70.3938,-31.8838],[-70.331,-31.8811],[-70.2817,-31.9166],[-70.2544,-31.9577],[-70.2909,-32.0311],[-70.3556,-32.0424],[-70.3638,-32.0835],[-70.3446,-32.1765],[-70.32,-32.2667],[-70.2578,-32.31],[-70.2298,-32.4307],[-70.1696,-32.4717],[-70.177,-32.6261],[-70.1162,-32.8074],[-70.0521,-32.86],[-70.022,-32.8846],[-70.0421,-32.9637],[-70.0931,-33.0268],[-70.104,-33.1279],[-70.0849,-33.2018],[-70.0198,-33.2715],[-69.969,-33.2794],[-69.8962,-33.251],[-69.8196,-33.2838],[-69.8087,-33.3439],[-69.7978,-33.3986],[-69.8388,-33.4697],[-69.8826,-33.601],[-69.8943,-33.7313],[-69.8815,-33.9298],[-69.8615,-34.0836],[-69.8574,-34.1805],[-69.8524,-34.2243],[-69.8798,-34.2544],[-69.9463,-34.2699],[-70.0028,-34.2763],[-70.0521,-34.3008],[-70.063,-34.35],[-70.1015,-34.432],[-70.1413,-34.4929],[-70.2107,-34.5812],[-70.2547,-34.6727],[-70.2899,-34.7328],[-70.2868,-34.7745],[-70.3121,-34.855],[-70.3381,-34.9218],[-70.3932,-35.1469],[-70.4666,-35.1937],[-70.5251,-35.2168],[-70.5552,-35.2469],[-70.5323,-35.3079],[-70.4704,-35.3262],[-70.4485,-35.3754],[-70.4567,-35.452],[-70.4157,-35.523],[-70.4197,-35.6092],[-70.3802,-35.7719],[-70.4157,-35.8785],[-70.4037,-35.9705],[-70.4048,-36.0617],[-70.4567,-36.1327],[-70.5634,-36.1464],[-70.6219,-36.2119],[-70.7219,-36.2832],[-70.7329,-36.3406],[-70.7493,-36.3926],[-70.7903,-36.4117],[-70.8532,-36.4117],[-70.9051,-36.4199],[-70.9779,-36.4873],[-71.0555,-36.5237],[-71.0732,-36.578],[-71.0664,-36.644],[-71.1074,-36.6851],[-71.1594,-36.7616],[-71.1922,-36.8437],[-71.1594,-36.9202],[-71.1238,-37.0569],[-71.1184,-37.1144],[-71.1635,-37.2274],[-71.2004,-37.3003],[-71.1649,-37.3933],[-71.1348,-37.4451],[-71.1628,-37.5592],[-71.1867,-37.6311],[-71.1676,-37.7623],[-71.0962,-37.91],[-71.0282,-38.0412],[-71.0182,-38.1939],[-71.0005,-38.3148],[-70.968,-38.4459],[-70.8997,-38.4979],[-70.8477,-38.5416],[-70.8586,-38.6045],[-70.8969,-38.6811],[-70.9516,-38.7385],[-71.0871,-38.7575],[-71.1973,-38.8094],[-71.2857,-38.8454],[-71.3532,-38.8889],[-71.4016,-38.9351],[-71.4256,-38.9856],[-71.4094,-39.206],[-71.42,-39.2872],[-71.4654,-39.4023],[-71.5078,-39.4952],[-71.5258,-39.5231],[-71.5313,-39.5642],[-71.5395,-39.6024],[-71.587,-39.6111],[-71.6543,-39.5942],[-71.6926,-39.6052],[-71.7199,-39.6353],[-71.6968,-39.707],[-71.6721,-39.8333],[-71.6379,-39.8868],[-71.6471,-39.9292],[-71.6598,-40.0208],[-71.7044,-40.0949],[-71.7637,-40.0946],[-71.802,-40.1247],[-71.8183,-40.1767],[-71.8006,-40.2443],[-71.7227,-40.2997],[-71.6953,-40.3353],[-71.709,-40.3817],[-71.7691,-40.4009],[-71.8046,-40.4392],[-71.8385,-40.5244],[-71.8838,-40.6206],[-71.9321,-40.6917],[-71.9414,-40.7892],[-71.873,-40.893],[-71.8807,-40.9946],[-71.8856,-41.2924],[-71.8922,-41.3934],[-71.8711,-41.5605],[-71.8976,-41.6066],[-71.9113,-41.6504],[-71.8445,-41.772],[-71.77,-41.9686],[-71.75,-42.0468],[-71.7609,-42.1015],[-71.8608,-42.1479],[-71.9441,-42.1671],[-71.9933,-42.1343],[-72.0261,-42.1479],[-72.0644,-42.2054],[-72.1082,-42.2519],[-72.1246,-42.2983],[-72.0781,-42.3585],[-72.0535,-42.4732],[-72.1054,-42.5225],[-72.1437,-42.5771],[-72.13,-42.6482],[-72.1136,-42.7768],[-72.1464,-42.99],[-72.1024,-43.0656],[-72.0547,-43.102],[-71.8986,-43.1453],[-71.7815,-43.1668],[-71.7506,-43.2373],[-71.7639,-43.2946],[-71.8202,-43.3229],[-71.905,-43.3476],[-71.905,-43.4401],[-71.8324,-43.5271],[-71.7506,-43.5901],[-71.7328,-43.6468],[-71.7374,-43.7047],[-71.7947,-43.7532],[-71.716,-43.8584],[-71.6801,-43.9296],[-71.7162,-43.9845],[-71.7672,-44.0667],[-71.8124,-44.1061],[-71.8121,-44.1508],[-71.8308,-44.2414],[-71.8351,-44.3302],[-71.82,-44.3831],[-71.3257,-44.4249],[-71.2126,-44.4412],[-71.1509,-44.494],[-71.1597,-44.5603],[-71.2215,-44.6308],[-71.2611,-44.7631],[-71.3582,-44.7852],[-71.4552,-44.7498],[-71.5604,-44.762],[-71.6517,-44.7704],[-71.7828,-44.7744],[-71.957,-44.7915],[-72.0637,-44.7719],[-72.0725,-44.8204],[-72.0417,-44.9042],[-71.8124,-44.9307],[-71.5963,-44.9792],[-71.5313,-45.0679],[-71.4435,-45.1683],[-71.3538,-45.2305],[-71.3493,-45.3319],[-71.4904,-45.4377],[-71.5081,-45.5127],[-71.6933,-45.5348],[-71.7462,-45.5789],[-71.7727,-45.7244],[-71.7506,-45.8391],[-71.6801,-45.8787],[-71.6315,-45.9537],[-71.6845,-46.0419],[-71.8093,-46.1027],[-71.8757,-46.1605],[-71.8341,-46.2067],[-71.7776,-46.28],[-71.7621,-46.3198],[-71.7313,-46.4278],[-71.6952,-46.5784],[-71.6997,-46.6514],[-71.7327,-46.7059],[-71.8564,-46.7916],[-71.9402,-46.8312],[-71.9566,-46.9368],[-71.963,-47.016],[-71.9542,-47.0875],[-71.9005,-47.1443],[-71.905,-47.2017],[-71.9785,-47.2139],[-72.0417,-47.2414],[-72.1034,-47.3428],[-72.2829,-47.4463],[-72.3459,-47.4927],[-72.3415,-47.5721],[-72.4126,-47.6855],[-72.4722,-47.7842],[-72.5179,-47.8764],[-72.5091,-47.9733],[-72.4079,-48.0159],[-72.3283,-48.1101],[-72.293,-48.2291],[-72.3547,-48.3658],[-72.4981,-48.4174],[-72.5829,-48.4754],[-72.6084,-48.5193],[-72.5859,-48.6625],[-72.5917,-48.7297],[-72.6144,-48.7929],[-72.6513,-48.8416],[-72.7285,-48.8963],[-72.8654,-48.9439],[-72.9817,-48.9768],[-73.0336,-49.0144],[-73.0946,-49.0969],[-73.1489,-49.188],[-73.1353,-49.3007],[-73.4616,-49.3139],[-73.4836,-49.3977],[-73.5542,-49.4639],[-73.5763,-49.5829],[-73.5045,-49.698],[-73.4704,-49.7945],[-73.5289,-49.9109],[-73.5077,-50.0303],[-73.5013,-50.1253],[-73.3866,-50.2312],[-73.3117,-50.3619],[-73.2742,-50.4726],[-73.2516,-50.5585],[-73.2216,-50.6107],[-73.1745,-50.67],[-73.1529,-50.7383],[-73.0824,-50.7604],[-72.9556,-50.6965],[-72.8659,-50.6531],[-72.8036,-50.6377],[-72.6204,-50.6477],[-72.5098,-50.6075],[-72.4602,-50.6117],[-72.3926,-50.6343],[-72.3402,-50.6818],[-72.3006,-50.7896],[-72.2763,-50.9103],[-72.3074,-51.0334],[-72.3592,-51.0602],[-72.3768,-51.0954],[-72.3592,-51.1704],[-72.3019,-51.2233],[-72.3032,-51.2989],[-72.3664,-51.4703],[-72.4077,-51.5408],[-72.3345,-51.6203],[-72.269,-51.6911],[-72.137,-51.744],[-72.0284,-51.8187],[-71.9535,-51.8804],[-71.9711,-51.9642],[-71.9187,-51.9896],[-71.7166,-51.9913],[-71.4147,-51.9939],[-70.9432,-51.9981],[-70.4829,-52.0022],[-69.9603,-52.0082],[-69.7126,-52.0754],[-69.4884,-52.1361],[-69.2062,-52.1361],[-68.9246,-52.2081],[-68.7152,-52.2555],[-68.5898,-52.2733],[-68.461,-52.2904],[-68.4434,-52.3566],[-69.0072,-52.2627],[-69.1338,-52.2114],[-69.241,-52.2055],[-69.4469,-52.2694],[-69.5606,-52.4216],[-69.6203,-52.4647],[-69.7633,-52.5056],[-69.9072,-52.5136],[-70.391,-52.6608],[-70.5629,-52.6734],[-70.6803,-52.7125],[-70.7951,-52.7687],[-70.8391,-52.8896],[-70.8212,-52.9631],[-70.9521,-53.227],[-70.9843,-53.3736],[-70.9851,-53.4483],[-70.9478,-53.5704],[-70.9959,-53.7793],[-71.0828,-53.825],[-71.2978,-53.8834],[-71.4439,-53.8409],[-71.6938,-53.8031],[-71.8719,-53.7227],[-72.1009,-53.6658],[-72.1744,-53.6323],[-72.3768,-53.4712],[-72.3982,-53.4178],[-72.4129,-53.3502],[-72.3061,-53.2537],[-72.2486,-53.2467],[-72.0812,-53.2496],[-71.9417,-53.2341],[-71.8527,-53.2857],[-71.8282,-53.3983],[-71.8673,-53.4584],[-71.9028,-53.4955],[-71.8917,-53.5235],[-71.7915,-53.4846],[-71.7405,-53.2326],[-71.4003,-53.107],[-71.289,-53.0337],[-71.1802,-52.9205],[-71.1633,-52.8881],[-71.1551,-52.8456],[-71.2271,-52.8106],[-71.3877,-52.7643],[-71.898,-53.0018],[-72.1291,-53.0644],[-72.278,-53.1323],[-72.4583,-53.2545],[-72.4926,-53.2906],[-72.5308,-53.3717],[-72.5489,-53.4607],[-72.7268,-53.42],[-72.9984,-53.2907],[-73.0527,-53.2435],[-72.9982,-53.1772],[-72.9155,-53.122],[-72.9099,-52.9365],[-72.8892,-52.8716],[-72.8319,-52.8195],[-72.7277,-52.7623],[-72.676,-52.749],[-72.6321,-52.7738],[-72.6266,-52.8176],[-72.4535,-52.8145],[-72.1176,-52.65],[-71.9793,-52.6461],[-71.7971,-52.6828],[-71.5912,-52.6607],[-71.5542,-52.6439],[-71.5113,-52.6054],[-71.6647,-52.5601],[-71.8119,-52.537],[-72.2257,-52.521],[-72.3154,-52.5386],[-72.4377,-52.6258],[-72.4783,-52.604],[-72.5044,-52.5601],[-72.6448,-52.5291],[-72.7121,-52.5355],[-72.7766,-52.5774],[-72.766,-52.6426],[-72.8019,-52.7124],[-72.9319,-52.7816],[-73.0203,-52.8918],[-73.0161,-52.9774],[-73.023,-53.0221],[-73.0555,-53.0456],[-73.1225,-53.0739],[-73.3382,-53.0547],[-73.4599,-52.9648],[-73.5075,-52.9035],[-73.6452,-52.837],[-73.3459,-52.7543],[-73.2408,-52.7071],[-73.1448,-52.602],[-73.0732,-52.5351],[-73.1239,-52.488],[-73.1838,-52.4879],[-73.1782,-52.5627],[-73.2441,-52.624],[-73.3821,-52.5951],[-73.5857,-52.6857],[-73.7108,-52.6615],[-73.9147,-52.6882],[-74.0145,-52.6394],[-74.0358,-52.5772],[-73.9999,-52.5126],[-74.0374,-52.4029],[-74.0935,-52.3763],[-74.1508,-52.3825],[-74.1766,-52.3172],[-74.2385,-52.2023],[-74.266,-52.1713],[-74.2957,-52.1179],[-74.2649,-52.1049],[-74.1949,-52.1202],[-74.1335,-52.1548],[-74.0402,-52.1592],[-73.8345,-52.234],[-73.7491,-52.216],[-73.7028,-52.1988],[-73.6854,-52.1367],[-73.6843,-52.0777],[-73.649,-52.0777],[-73.5322,-52.1531],[-73.458,-52.146],[-73.3268,-52.1659],[-73.2604,-52.1578],[-73.1374,-52.1297],[-72.9437,-52.0469],[-72.8432,-51.9611],[-72.795,-51.9495],[-72.7354,-51.9605],[-72.6955,-51.9852],[-72.6948,-52.0447],[-72.6496,-52.0999],[-72.588,-52.1451],[-72.5708,-52.2001],[-72.5834,-52.2542],[-72.6936,-52.3303],[-72.714,-52.3567],[-72.6771,-52.3847],[-72.6315,-52.3716],[-72.5687,-52.334],[-72.5329,-52.2823],[-72.5233,-52.2555],[-72.5193,-52.2171],[-72.5241,-52.1703],[-72.6136,-52.037],[-72.6248,-52.0069],[-72.6246,-51.9465],[-72.5229,-51.8909],[-72.4941,-51.8476],[-72.4896,-51.7637],[-72.5425,-51.7062],[-72.7612,-51.5732],[-73.1268,-51.4399],[-73.1688,-51.4539],[-73.197,-51.478],[-73.1634,-51.4956],[-73.115,-51.5045],[-72.7894,-51.6143],[-72.7046,-51.6779],[-72.6491,-51.695],[-72.5833,-51.7373],[-72.6,-51.7991],[-72.9284,-51.8599],[-73.1887,-51.9906],[-73.3833,-52.07],[-73.5182,-52.041],[-73.5823,-51.9604],[-73.6503,-51.8563],[-73.7526,-51.7955],[-73.8106,-51.8012],[-73.8576,-51.7899],[-73.8944,-51.7578],[-73.9732,-51.7845],[-74.1464,-51.7121],[-74.1967,-51.6806],[-74.0696,-51.5787],[-73.9298,-51.6179],[-73.8959,-51.3314],[-73.9395,-51.2663],[-74.1212,-51.1954],[-74.2105,-51.2046],[-74.3323,-51.195],[-74.4144,-51.1625],[-74.5079,-51.1496],[-74.5869,-51.1307],[-74.6901,-51.0865],[-74.8147,-51.0629],[-74.9831,-50.8811],[-75.0553,-50.7855],[-75.0947,-50.6812],[-74.8366,-50.6789],[-74.6857,-50.662],[-74.6489,-50.6185],[-74.7021,-50.5354],[-74.7759,-50.4699],[-74.7217,-50.4085],[-74.6445,-50.3609],[-74.5641,-50.382],[-74.3656,-50.4879],[-74.3314,-50.5596],[-74.1902,-50.778],[-74.1561,-50.7975],[-74.1394,-50.8178],[-73.8475,-50.94],[-73.8065,-50.9384],[-73.8246,-50.8358],[-73.7406,-50.6967],[-73.659,-50.6507],[-73.6182,-50.6512],[-73.614,-50.6279],[-73.6933,-50.57],[-73.6544,-50.4927],[-73.6799,-50.4902],[-73.7502,-50.5398],[-73.8915,-50.7827],[-73.978,-50.8271],[-74.0967,-50.7171],[-74.1641,-50.6379],[-74.1972,-50.6098],[-74.1856,-50.4854],[-73.9503,-50.5105],[-74.0311,-50.4698],[-74.3056,-50.398],[-74.3741,-50.363],[-74.4251,-50.3502],[-74.5164,-50.2656],[-74.6296,-50.194],[-74.4343,-50.0652],[-74.3337,-49.9746],[-74.0194,-50.0228],[-73.9586,-49.9947],[-74.0112,-49.9285],[-74.0733,-49.9485],[-74.1713,-49.9073],[-74.3239,-49.7834],[-74.3187,-49.7201],[-74.2908,-49.6041],[-74.2304,-49.5793],[-74.102,-49.5554],[-73.9555,-49.5931],[-73.8916,-49.6237],[-73.8364,-49.6094],[-73.8925,-49.5234],[-73.988,-49.4909],[-74.0944,-49.4297],[-74.0835,-49.3618],[-74.0492,-49.3057],[-74.0234,-49.2441],[-74.0056,-49.158],[-74.0154,-49.0909],[-73.9848,-49.06],[-73.9379,-49.0461],[-73.935,-49.0209],[-74.0277,-49.0262],[-74.0613,-49.111],[-74.0739,-49.1884],[-74.1398,-49.2505],[-74.1679,-49.3205],[-74.1846,-49.4044],[-74.2213,-49.5006],[-74.3015,-49.464],[-74.3485,-49.4263],[-74.3666,-49.4005],[-74.3582,-49.3514],[-74.38,-49.0479],[-74.3821,-48.7937],[-74.341,-48.5957],[-74.2277,-48.517],[-74.1762,-48.4941],[-74.1293,-48.5042],[-74.0569,-48.5036],[-74.0091,-48.475],[-74.1715,-48.4274],[-74.2701,-48.4546],[-74.343,-48.4926],[-74.4744,-48.464],[-74.4994,-48.3623],[-74.5772,-48.2744],[-74.5907,-48.1619],[-74.5847,-47.999],[-74.4005,-48.0131],[-74.2504,-48.0449],[-73.8538,-48.0422],[-73.5282,-48.1982],[-73.3845,-48.1773],[-73.3911,-48.1459],[-73.501,-48.1066],[-73.5696,-48.0193],[-73.6099,-47.9939],[-73.6289,-47.9415],[-73.6351,-47.8804],[-73.7159,-47.6555],[-73.7482,-47.6613],[-73.7792,-47.7385],[-73.8467,-47.867],[-73.9409,-47.9294],[-74.0848,-47.9547],[-74.2271,-47.9689],[-74.3506,-47.9443],[-74.3793,-47.8912],[-74.3762,-47.8297],[-74.4297,-47.7996],[-74.5692,-47.7729],[-74.6089,-47.758],[-74.6549,-47.7022],[-74.5884,-47.618],[-74.5338,-47.5677],[-74.4669,-47.5776],[-74.4036,-47.6004],[-74.3226,-47.6667],[-74.243,-47.6793],[-74.152,-47.6267],[-74.1341,-47.5908],[-74.191,-47.5684],[-74.2429,-47.5597],[-74.3237,-47.5314],[-74.4827,-47.4305],[-74.4033,-47.3275],[-74.2157,-47.2096],[-74.1584,-47.1825],[-74.2081,-47.0831],[-74.1519,-46.9744],[-74.2095,-46.8848],[-74.3136,-46.7882],[-74.4542,-46.7668],[-74.4844,-46.795],[-74.4894,-46.8346],[-74.467,-46.8644],[-74.4802,-46.8858],[-74.5123,-46.8852],[-74.6908,-46.864],[-74.8106,-46.7997],[-75.006,-46.7411],[-75.0314,-46.6953],[-75.0525,-46.628],[-74.9842,-46.5121],[-75.0187,-46.5105],[-75.1458,-46.6001],[-75.3374,-46.6471],[-75.4784,-46.6624],[-75.5403,-46.6987],[-75.5651,-46.7287],[-75.5276,-46.7464],[-75.446,-46.7508],[-75.3864,-46.8627],[-75.4012,-46.9057],[-75.4304,-46.9346],[-75.4966,-46.9401],[-75.6353,-46.8628],[-75.7081,-46.775],[-75.7064,-46.7053],[-75.6568,-46.6104],[-75.4369,-46.483],[-75.376,-46.4291],[-75.247,-46.3693],[-75.0749,-46.2346],[-74.9245,-46.1597],[-74.9977,-46.0977],[-75.0745,-46.0045],[-75.0667,-45.8749],[-74.7631,-45.8236],[-74.6307,-45.8447],[-74.4628,-45.8407],[-74.3691,-45.8097],[-74.3012,-45.803],[-74.1579,-45.7672],[-74.0962,-45.7168],[-74.0818,-45.6783],[-74.0825,-45.6447],[-74.0993,-45.6034],[-74.1227,-45.4962],[-74.0989,-45.4604],[-74.0375,-45.4177],[-73.9572,-45.4044],[-73.9203,-45.4077],[-73.825,-45.4469],[-73.8441,-45.5024],[-73.8823,-45.5693],[-73.9603,-45.8353],[-73.9995,-45.8953],[-74.061,-45.9474],[-74.0199,-46.0559],[-74.0815,-46.1318],[-74.3568,-46.2127],[-74.393,-46.2174],[-74.3725,-46.2463],[-74.2131,-46.2395],[-74.0897,-46.2224],[-73.9676,-46.1541],[-73.9292,-46.0499],[-73.8787,-45.8469],[-73.8125,-45.8182],[-73.7353,-45.8117],[-73.6949,-45.8596],[-73.7079,-45.9667],[-73.7082,-46.0703],[-73.8106,-46.3773],[-73.9348,-46.5007],[-73.9486,-46.5331],[-73.9437,-46.5716],[-73.8454,-46.566],[-73.7703,-46.4998],[-73.7162,-46.4152],[-73.6621,-46.2975],[-73.6682,-46.2121],[-73.6517,-46.1593],[-73.6294,-45.9865],[-73.5918,-45.8991],[-73.5943,-45.7769],[-73.662,-45.7308],[-73.7566,-45.7028],[-73.7804,-45.6279],[-73.7308,-45.48],[-73.5499,-45.4838],[-73.3786,-45.3828],[-73.2662,-45.3462],[-73.2023,-45.3538],[-72.9782,-45.4512],[-72.9338,-45.4523],[-72.9408,-45.4173],[-72.9755,-45.3926],[-73.0639,-45.3598],[-73.2264,-45.2552],[-73.445,-45.2382],[-73.4049,-45.1023],[-73.3625,-44.9782],[-73.2564,-44.961],[-73.0784,-44.9202],[-72.739,-44.7342],[-72.6801,-44.5939],[-72.6639,-44.4364],[-72.8275,-44.3954],[-73.001,-44.2924],[-73.141,-44.2375],[-73.2651,-44.1687],[-73.2407,-44.0657],[-73.2245,-43.8979],[-73.0688,-43.862],[-72.9966,-43.6315],[-73.101,-43.4552],[-73.076,-43.3236],[-72.94,-43.2113],[-72.9155,-43.1336],[-72.878,-43.0481],[-72.758,-43.0395],[-72.7554,-42.993],[-72.766,-42.9082],[-72.845,-42.808],[-72.848,-42.6691],[-72.7739,-42.5052],[-72.6548,-42.5166],[-72.6318,-42.5097],[-72.7163,-42.4104],[-72.7852,-42.3013],[-72.7732,-42.2577],[-72.7074,-42.2205],[-72.6311,-42.1998],[-72.5484,-42.2558],[-72.4303,-42.4339],[-72.4124,-42.3882],[-72.4601,-42.2066],[-72.4994,-41.9809],[-72.624,-42.0105],[-72.7382,-41.9946],[-72.7812,-41.9596],[-72.8241,-41.9088],[-72.7838,-41.8468],[-72.7437,-41.8006],[-72.6599,-41.7425],[-72.486,-41.7221],[-72.3604,-41.6491],[-72.3183,-41.499],[-72.3595,-41.5139],[-72.4277,-41.6459],[-72.5424,-41.6906],[-72.6008,-41.6841],[-72.6698,-41.6594],[-72.8051,-41.5443],[-72.88,-41.5176],[-72.9528,-41.5147],[-73.015,-41.5438],[-73.1741,-41.7466],[-73.2418,-41.7809],[-73.5213,-41.7971],[-73.624,-41.7736],[-73.7352,-41.7425],[-73.7219,-41.6925],[-73.6881,-41.6393],[-73.625,-41.6119],[-73.6239,-41.5813],[-73.7106,-41.5736],[-73.8107,-41.5175],[-73.855,-41.4464],[-73.8762,-41.3193],[-73.9659,-41.1183],[-73.9836,-40.9743],[-73.9203,-40.8716],[-73.784,-40.4685],[-73.7425,-40.263],[-73.6694,-40.0823],[-73.671,-39.9632],[-73.4822,-39.8543],[-73.4104,-39.7892],[-73.2499,-39.4224],[-73.2265,-39.2244],[-73.4808,-38.624],[-73.5202,-38.5094],[-73.5326,-38.3668],[-73.4719,-38.1301],[-73.4648,-38.0403],[-73.5167,-37.9105],[-73.6618,-37.6985],[-73.6646,-37.5904],[-73.6034,-37.4791],[-73.6624,-37.341],[-73.6336,-37.2555],[-73.6017,-37.1885],[-73.3746,-37.2243],[-73.2711,-37.2074],[-73.216,-37.1669],[-73.1729,-37.0535],[-73.1513,-36.8762],[-73.1378,-36.7999],[-73.1181,-36.6884],[-73.0066,-36.6435],[-72.9678,-36.5378],[-72.8746,-36.3904],[-72.7784,-35.9785],[-72.6834,-35.877],[-72.5874,-35.7597],[-72.6239,-35.5857],[-72.5621,-35.5054],[-72.5052,-35.447],[-72.455,-35.3408],[-72.3867,-35.2404],[-72.2238,-35.0962],[-72.1824,-34.9202],[-72.056,-34.6158],[-72.0308,-34.4205],[-71.9915,-34.2885],[-72.0028,-34.1653],[-71.9269,-34.0156],[-71.854,-33.8896],[-71.831,-33.8195],[-71.6644,-33.6526],[-71.6363,-33.5192],[-71.6955,-33.429],[-71.6966,-33.2891],[-71.743,-33.0951],[-71.6355,-33.0226],[-71.592,-32.9695],[-71.4522,-32.6596],[-71.4614,-32.5379],[-71.4213,-32.3868],[-71.513,-32.2079],[-71.5259,-31.8059],[-71.5773,-31.4964],[-71.662,-31.1695],[-71.6539,-30.9866],[-71.7057,-30.7593],[-71.7089,-30.628],[-71.6695,-30.3304],[-71.4004,-30.143],[-71.348,-29.9332],[-71.3157,-29.6497],[-71.3267,-29.4432],[-71.3533,-29.3504],[-71.4858,-29.1982],[-71.5192,-28.9265],[-71.4936,-28.8553],[-71.3841,-28.7787],[-71.3067,-28.6725],[-71.2668,-28.5075],[-71.1864,-28.3778],[-71.1545,-28.0641],[-71.0865,-27.8145],[-71.0526,-27.7273],[-70.9458,-27.6179],[-70.9258,-27.5887],[-70.9093,-27.5052],[-70.9143,-27.3079],[-70.8979,-27.1875],[-70.8127,-26.9506],[-70.8029,-26.8409],[-70.7084,-26.597],[-70.687,-26.4218],[-70.6466,-26.3294],[-70.6623,-26.2254],[-70.6354,-25.9927],[-70.6996,-25.8611],[-70.7137,-25.7842],[-70.633,-25.5456],[-70.5781,-25.4875],[-70.4895,-25.3765],[-70.4522,-25.2519],[-70.4454,-25.1727],[-70.5586,-24.7785],[-70.5741,-24.6443],[-70.5464,-24.3316],[-70.5074,-24.1297],[-70.5201,-23.9686],[-70.5074,-23.8857],[-70.4878,-23.7817],[-70.41,-23.6556],[-70.3923,-23.5659],[-70.4196,-23.5285],[-70.512,-23.4828],[-70.5881,-23.3684],[-70.5934,-23.2555],[-70.5688,-23.1733],[-70.5632,-23.057],[-70.4497,-23.0342],[-70.3892,-22.9696],[-70.3317,-22.8486],[-70.2595,-22.5561],[-70.2285,-22.1932],[-70.1854,-21.9746],[-70.1551,-21.8666],[-70.1296,-21.6408],[-70.0875,-21.4931],[-70.08,-21.3568],[-70.0884,-21.2532],[-70.197,-20.7254],[-70.1937,-20.5314],[-70.1475,-20.2298],[-70.1481,-19.8051],[-70.1574,-19.7059],[-70.1983,-19.613],[-70.2104,-19.4869],[-70.2758,-19.2676],[-70.3349,-18.8275],[-70.3361,-18.5952],[-70.3616,-18.398],[-70.4183,-18.3456]]],[[[-68.6299,-52.6526],[-68.6317,-52.9495],[-68.6334,-53.2419],[-68.6351,-53.5154],[-68.6367,-53.7889],[-68.6382,-54.0529],[-68.6398,-54.324],[-68.6475,-54.6278],[-68.6532,-54.8536],[-68.8039,-54.8536],[-68.8436,-54.8768],[-69.0816,-54.9099],[-69.4863,-54.8589],[-69.5875,-54.8128],[-69.7234,-54.7121],[-69.7718,-54.7392],[-69.8995,-54.7818],[-70.0305,-54.8155],[-70.1381,-54.8192],[-70.2378,-54.7775],[-70.2591,-54.7563],[-70.2817,-54.7518],[-70.4972,-54.8096],[-70.7352,-54.7506],[-70.9247,-54.7144],[-71.2292,-54.6941],[-71.4409,-54.6196],[-71.8315,-54.6262],[-71.9016,-54.6016],[-71.9277,-54.5287],[-71.907,-54.4948],[-71.8234,-54.4744],[-71.8001,-54.434],[-71.7158,-54.4437],[-71.6063,-54.4972],[-71.5728,-54.4953],[-71.5004,-54.4449],[-71.3934,-54.4002],[-71.3552,-54.3954],[-71.1588,-54.4506],[-71.0799,-54.4442],[-70.9665,-54.4195],[-70.9462,-54.398],[-70.9282,-54.3601],[-70.8982,-54.3379],[-70.7973,-54.3272],[-70.6988,-54.3488],[-70.6875,-54.4147],[-70.7011,-54.4854],[-70.573,-54.5044],[-70.4179,-54.5022],[-70.311,-54.5285],[-70.2977,-54.4855],[-70.4683,-54.3732],[-70.54,-54.3034],[-70.6361,-54.2623],[-70.7599,-54.2413],[-70.8631,-54.1104],[-70.8567,-53.9958],[-70.8677,-53.8842],[-70.6445,-53.8229],[-70.6956,-53.7274],[-70.6188,-53.6551],[-70.5313,-53.6273],[-70.4432,-53.8935],[-70.3797,-53.9867],[-70.4605,-54.0057],[-70.6298,-54.0056],[-70.5353,-54.1361],[-70.38,-54.1807],[-70.2461,-54.2774],[-70.2434,-54.3477],[-70.169,-54.3793],[-69.9901,-54.3813],[-69.867,-54.3675],[-69.8091,-54.3208],[-69.7418,-54.3059],[-69.6217,-54.3641],[-69.4193,-54.4071],[-69.3648,-54.4376],[-69.3251,-54.4882],[-69.3225,-54.5427],[-69.3121,-54.5715],[-69.2532,-54.5574],[-69.1692,-54.4833],[-69.1279,-54.4576],[-69.0772,-54.445],[-69.0452,-54.4284],[-69.0443,-54.4067],[-69.1957,-54.3544],[-69.9881,-54.1091],[-70.0856,-54.0111],[-70.1511,-53.8881],[-70.1488,-53.7611],[-70.0911,-53.7218],[-69.9497,-53.6716],[-69.6897,-53.6009],[-69.3899,-53.4994],[-69.3524,-53.48],[-69.356,-53.4163],[-69.3936,-53.3734],[-69.5125,-53.342],[-69.637,-53.3341],[-69.7556,-53.3372],[-69.8741,-53.3505],[-70.0904,-53.4182],[-70.2128,-53.414],[-70.3293,-53.3776],[-70.4157,-53.3048],[-70.4603,-53.2062],[-70.46,-53.1434],[-70.4434,-53.0855],[-70.3907,-53.0265],[-70.32,-53.0007],[-70.2563,-53.0041],[-70.1965,-52.9902],[-70.1609,-52.9699],[-70.1306,-52.9428],[-70.1396,-52.9193],[-70.1627,-52.899],[-70.2592,-52.8572],[-70.2974,-52.817],[-70.3801,-52.752],[-70.3349,-52.7338],[-70.1896,-52.7236],[-70.0882,-52.7686],[-69.9936,-52.8213],[-69.9354,-52.8211],[-69.8832,-52.799],[-69.7636,-52.7313],[-69.6633,-52.6463],[-69.5719,-52.5493],[-69.4984,-52.4914],[-69.4141,-52.4862],[-69.167,-52.6676],[-69.0799,-52.6743],[-68.7898,-52.5768],[-68.7575,-52.582],[-68.6592,-52.6315],[-68.6299,-52.6526]]],[[[-67.0799,-55.1538],[-67.1095,-55.1921],[-67.1726,-55.2426],[-67.2574,-55.2818],[-67.3397,-55.2926],[-67.3993,-55.2723],[-67.4294,-55.2365],[-67.4433,-55.2012],[-67.4635,-55.1817],[-67.4947,-55.1774],[-67.5353,-55.1785],[-67.5852,-55.192],[-67.6915,-55.243],[-67.737,-55.2564],[-67.7678,-55.2596],[-68.07,-55.2211],[-68.0995,-55.2068],[-68.1351,-55.1727],[-68.1743,-55.0713],[-68.3014,-54.9807],[-68.1069,-54.9294],[-67.8741,-54.9297],[-67.4246,-54.9689],[-67.2453,-54.9776],[-67.1073,-55.0636],[-67.0855,-55.1152],[-67.0799,-55.1538]]],[[[-73.7734,-43.3459],[-73.8486,-43.3668],[-73.9187,-43.372],[-73.9899,-43.3566],[-74.1144,-43.3579],[-74.2386,-43.3188],[-74.3549,-43.2636],[-74.3874,-43.2316],[-74.3731,-43.1857],[-74.2894,-43.0795],[-74.2095,-42.8787],[-74.1563,-42.5905],[-74.1988,-42.4813],[-74.1936,-42.436],[-74.1741,-42.3815],[-74.1644,-42.3255],[-74.1703,-42.2689],[-74.1602,-42.2164],[-74.0723,-42.1059],[-74.0594,-42.0562],[-74.0568,-42.0023],[-74.0188,-41.8909],[-74.0305,-41.854],[-74.063,-41.8228],[-74.0367,-41.7955],[-73.731,-41.8772],[-73.5278,-41.8963],[-73.5169,-41.9809],[-73.4778,-42.0472],[-73.4545,-42.1659],[-73.4229,-42.1929],[-73.4393,-42.2778],[-73.5328,-42.3145],[-73.5246,-42.3926],[-73.4708,-42.4663],[-73.5493,-42.4926],[-73.6339,-42.5082],[-73.6535,-42.5287],[-73.7147,-42.5447],[-73.7893,-42.5857],[-73.7668,-42.6219],[-73.673,-42.7044],[-73.5683,-42.7616],[-73.5107,-42.8472],[-73.4363,-42.9365],[-73.4727,-42.9933],[-73.5408,-43.0737],[-73.6496,-43.1271],[-73.7497,-43.1591],[-73.7379,-43.2914],[-73.7734,-43.3459]]],[[[-74.4762,-49.1479],[-74.4668,-49.2945],[-74.4836,-49.4419],[-74.5221,-49.6229],[-74.5158,-49.6596],[-74.4708,-49.6686],[-74.4588,-49.6911],[-74.472,-49.7862],[-74.4961,-49.8595],[-74.5426,-49.9191],[-74.5698,-49.9907],[-74.5947,-50.0066],[-74.7034,-50.0192],[-74.763,-50.0114],[-74.8108,-49.9297],[-74.8247,-49.8795],[-74.8219,-49.8139],[-74.8804,-49.7259],[-74.8822,-49.6922],[-74.8593,-49.6342],[-74.812,-49.6053],[-74.8048,-49.516],[-74.781,-49.4893],[-74.7271,-49.4523],[-74.7188,-49.437],[-74.7238,-49.4238],[-74.7438,-49.4225],[-74.9601,-49.533],[-74.9813,-49.5642],[-74.9908,-49.6057],[-74.9935,-49.7518],[-75.0315,-49.8362],[-75.066,-49.8523],[-75.1669,-49.856],[-75.3001,-49.8475],[-75.4512,-49.7699],[-75.5498,-49.7913],[-75.5701,-49.6971],[-75.5208,-49.6217],[-75.3371,-49.6282],[-75.3059,-49.494],[-75.3642,-49.4625],[-75.4289,-49.4084],[-75.4675,-49.3589],[-75.4332,-49.3221],[-75.3267,-49.2687],[-75.2696,-49.2629],[-75.2168,-49.2928],[-75.086,-49.2702],[-75.0937,-49.1854],[-75.2102,-49.148],[-75.1842,-49.0836],[-75.0371,-49.0221],[-74.9492,-48.9602],[-74.9452,-48.8895],[-74.9808,-48.8188],[-74.9695,-48.7913],[-74.8962,-48.7332],[-74.7935,-48.7051],[-74.7467,-48.7089],[-74.6516,-48.7499],[-74.5666,-48.7548],[-74.5461,-48.7669],[-74.5307,-48.8126],[-74.4762,-49.1479]]],[[[-75.5103,-48.7635],[-75.6229,-48.7646],[-75.6509,-48.5863],[-75.5185,-48.3288],[-75.509,-48.2307],[-75.5535,-48.1567],[-75.5715,-48.0959],[-75.5607,-48.0709],[-75.3914,-48.0197],[-75.3384,-48.074],[-75.2755,-48.2185],[-75.1555,-48.4252],[-75.1585,-48.6227],[-75.2251,-48.6714],[-75.434,-48.7212],[-75.5103,-48.7635]]],[[[-74.3857,-52.9224],[-74.3693,-52.9314],[-74.33,-52.9293],[-74.2746,-52.9455],[-74.066,-52.9653],[-73.8792,-53.0122],[-73.7818,-53.0561],[-73.654,-53.0698],[-73.5493,-53.1257],[-73.5045,-53.14],[-73.4506,-53.1443],[-73.3104,-53.2477],[-73.3025,-53.2595],[-73.1434,-53.3409],[-73.1352,-53.3539],[-73.2257,-53.3584],[-73.4094,-53.3205],[-73.501,-53.3185],[-73.5673,-53.3068],[-73.5828,-53.3002],[-73.5959,-53.2529],[-73.6171,-53.2297],[-73.7935,-53.1207],[-73.8669,-53.0969],[-73.994,-53.0758],[-74.1386,-53.0905],[-74.2364,-53.0765],[-74.2702,-53.0815],[-74.4144,-52.9949],[-74.5583,-52.9219],[-74.6199,-52.8348],[-74.7115,-52.7682],[-74.712,-52.7487],[-74.67,-52.7339],[-74.5715,-52.7713],[-74.4746,-52.8356],[-74.4223,-52.8601],[-74.3857,-52.9224]]],[[[-74.5673,-48.592],[-74.5863,-48.6157],[-74.7096,-48.6012],[-74.923,-48.6265],[-75.0128,-48.5357],[-75.0521,-48.3914],[-75.0789,-48.3615],[-75.1319,-48.2793],[-75.1585,-48.2253],[-75.2129,-48.1417],[-75.2339,-48.0534],[-75.2473,-48.0268],[-75.1983,-47.9746],[-74.9751,-47.9229],[-74.8957,-47.8394],[-74.8274,-47.8504],[-74.8462,-48.0208],[-74.8052,-48.0782],[-74.7293,-48.1259],[-74.7152,-48.1455],[-74.7024,-48.2059],[-74.6644,-48.2993],[-74.6151,-48.3431],[-74.6024,-48.3703],[-74.6001,-48.3931],[-74.6182,-48.4252],[-74.5673,-48.592]]],[[[-72.9232,-53.4816],[-72.8963,-53.5628],[-72.8822,-53.5783],[-72.8094,-53.5653],[-72.6855,-53.5579],[-72.4823,-53.5881],[-72.4592,-53.5988],[-72.3729,-53.6875],[-72.3067,-53.7254],[-72.2054,-53.8074],[-72.3063,-53.8621],[-72.366,-53.9408],[-72.3691,-53.9808],[-72.4085,-54.0038],[-72.4705,-54.0277],[-72.5629,-54.0737],[-72.6766,-54.0789],[-72.7886,-54.1031],[-72.8404,-54.1251],[-72.871,-54.1266],[-72.9073,-54.1146],[-72.9461,-54.0921],[-72.9586,-54.0659],[-72.8817,-54.0416],[-72.7817,-53.9548],[-72.7638,-53.8648],[-72.8717,-53.8485],[-72.9361,-53.8608],[-72.9842,-53.8605],[-73.0395,-53.8328],[-73.073,-53.8753],[-73.0855,-53.9159],[-73.0708,-53.978],[-73.0808,-53.998],[-73.12,-54.0094],[-73.2106,-53.9858],[-73.3047,-53.9439],[-73.3122,-53.9196],[-73.2929,-53.8358],[-73.2949,-53.7921],[-73.3144,-53.7292],[-73.3248,-53.7227],[-73.3601,-53.724],[-73.4709,-53.7361],[-73.5816,-53.6555],[-73.6415,-53.5703],[-73.8455,-53.5458],[-73.6865,-53.4269],[-73.4471,-53.4101],[-73.3659,-53.4702],[-73.0994,-53.5119],[-73.1153,-53.448],[-73.1109,-53.4252],[-73.0743,-53.3968],[-73.0536,-53.3944],[-73.0221,-53.4146],[-72.9709,-53.423],[-72.9473,-53.4425],[-72.9232,-53.4816]]],[[[-74.8229,-51.6302],[-74.7801,-51.8247],[-74.7495,-51.8519],[-74.6475,-51.8662],[-74.5368,-51.9651],[-74.5318,-51.992],[-74.666,-52.1601],[-74.6945,-52.2792],[-74.8518,-52.2707],[-74.9177,-52.1522],[-75.0171,-52.0379],[-75.0507,-51.9039],[-75.1054,-51.7889],[-75.0081,-51.7237],[-74.9152,-51.7383],[-74.9097,-51.65],[-74.8229,-51.6302]]],[[[-69.703,-54.919],[-68.9008,-55.0178],[-68.6535,-54.9579],[-68.458,-54.9597],[-68.3998,-55.042],[-68.5981,-55.1283],[-68.6133,-55.1556],[-68.5855,-55.1777],[-68.3817,-55.1916],[-68.3301,-55.2194],[-68.2827,-55.2552],[-68.3228,-55.3082],[-68.3266,-55.3327],[-68.3054,-55.3566],[-68.1526,-55.4369],[-68.0899,-55.4783],[-68.0583,-55.518],[-68.0456,-55.5875],[-68.0483,-55.6432],[-68.0827,-55.6506],[-68.1571,-55.6337],[-68.2296,-55.6016],[-68.2934,-55.5214],[-68.338,-55.5053],[-68.4667,-55.4891],[-68.5942,-55.45],[-68.6936,-55.4522],[-68.785,-55.4356],[-68.867,-55.4502],[-68.8961,-55.4238],[-68.9313,-55.3706],[-68.9321,-55.3474],[-68.889,-55.2633],[-68.8901,-55.2412],[-68.9126,-55.2386],[-69.0082,-55.2558],[-69.0468,-55.2443],[-69.1508,-55.1834],[-69.1926,-55.1719],[-69.2971,-55.1658],[-69.3562,-55.2739],[-69.3592,-55.3007],[-69.299,-55.3693],[-69.1809,-55.4748],[-69.2408,-55.4768],[-69.4118,-55.4442],[-69.4557,-55.424],[-69.5087,-55.3709],[-69.6103,-55.3399],[-69.6459,-55.3209],[-69.6563,-55.2984],[-69.6574,-55.229],[-69.6798,-55.2189],[-69.824,-55.2365],[-69.8537,-55.2198],[-69.8658,-55.1906],[-69.8868,-55.1741],[-69.9798,-55.1475],[-69.988,-55.1308],[-69.9465,-55.111],[-69.9209,-55.0611],[-69.8844,-54.882],[-69.703,-54.919]]],[[[-71.3905,-54.0328],[-71.1688,-54.1126],[-71.0219,-54.1118],[-71.0229,-54.1617],[-71.0049,-54.2467],[-71.028,-54.2812],[-71.083,-54.3163],[-71.1175,-54.3663],[-71.1433,-54.374],[-71.3046,-54.3136],[-71.4733,-54.2312],[-71.5581,-54.2456],[-71.6706,-54.2254],[-71.7612,-54.2298],[-71.8176,-54.2765],[-71.9485,-54.3009],[-71.9724,-54.2072],[-72.0916,-54.1187],[-72.2104,-54.0478],[-72.146,-53.9389],[-72.0689,-53.9213],[-71.9965,-53.8849],[-71.7051,-53.9233],[-71.5542,-53.9561],[-71.3905,-54.0328]]],[[[-73.7354,-44.3945],[-73.7846,-44.4375],[-73.8623,-44.4451],[-73.9833,-44.4948],[-73.996,-44.538],[-74.0021,-44.5909],[-73.9186,-44.6547],[-73.8774,-44.7288],[-73.8279,-44.8398],[-73.7921,-44.9458],[-73.7954,-44.9786],[-73.7865,-45.0336],[-73.7271,-45.119],[-73.7217,-45.1576],[-73.7282,-45.1959],[-73.7521,-45.2668],[-73.771,-45.2766],[-73.8299,-45.2835],[-73.8345,-45.3266],[-73.849,-45.3406],[-74.0163,-45.3449],[-74.0991,-45.3254],[-74.0893,-45.1957],[-74.1952,-45.1448],[-74.268,-45.059],[-74.3499,-44.9108],[-74.4188,-44.8652],[-74.4988,-44.7481],[-74.6178,-44.6479],[-74.4805,-44.5846],[-74.5018,-44.4735],[-74.4217,-44.4354],[-74.3012,-44.3957],[-74.2125,-44.427],[-74.1328,-44.4159],[-74.0972,-44.3894],[-74.1081,-44.2759],[-74.0828,-44.1864],[-73.9949,-44.1402],[-73.9002,-44.1349],[-73.8646,-44.1854],[-73.8178,-44.235],[-73.7032,-44.2741],[-73.7037,-44.3254],[-73.7354,-44.3945]]],[[[-72.9861,-44.7801],[-73.2285,-44.86],[-73.35,-44.8332],[-73.3971,-44.7743],[-73.4201,-44.7248],[-73.4451,-44.641],[-73.4037,-44.5961],[-73.3149,-44.5313],[-73.282,-44.4896],[-73.266,-44.4402],[-73.2716,-44.3941],[-73.26,-44.3503],[-73.2077,-44.335],[-73.0284,-44.3841],[-72.8424,-44.4577],[-72.7764,-44.5086],[-72.7641,-44.549],[-72.8453,-44.6385],[-72.8972,-44.712],[-72.9861,-44.7801]]],[[[-75.0425,-44.8901],[-75.0675,-44.9065],[-75.0987,-44.9018],[-75.1242,-44.8699],[-75.1421,-44.8156],[-75.1074,-44.7951],[-75.0795,-44.7951],[-75.0484,-44.8239],[-75.0322,-44.8705],[-75.0425,-44.8901]]],[[[-75.302,-50.68],[-75.3305,-50.7724],[-75.4114,-50.7644],[-75.4385,-50.7411],[-75.4526,-50.6825],[-75.4774,-50.6542],[-75.4427,-50.5955],[-75.4198,-50.5304],[-75.4276,-50.4806],[-75.3037,-50.484],[-75.1562,-50.4968],[-75.1153,-50.5104],[-75.1604,-50.5544],[-75.2034,-50.5807],[-75.2923,-50.5969],[-75.302,-50.68]]],[[[-75.1067,-48.8365],[-75.1151,-48.916],[-75.2627,-49.0689],[-75.3899,-49.1592],[-75.5061,-49.2307],[-75.5804,-49.23],[-75.6412,-49.1954],[-75.5729,-49.1389],[-75.4876,-49.0824],[-75.5146,-49.0096],[-75.5401,-48.9885],[-75.5762,-48.9808],[-75.6378,-48.9426],[-75.6191,-48.8859],[-75.5831,-48.8589],[-75.5353,-48.8382],[-75.4905,-48.8505],[-75.2973,-48.8106],[-75.2362,-48.7786],[-75.1186,-48.7729],[-75.1067,-48.8365]]],[[[-75.1122,-47.8377],[-75.1858,-47.8507],[-75.1943,-47.8181],[-75.261,-47.7639],[-75.2031,-47.728],[-75.0898,-47.6906],[-75.004,-47.6947],[-74.9265,-47.7231],[-74.916,-47.7566],[-75.0513,-47.8005],[-75.0845,-47.8245],[-75.1122,-47.8377]]],[[[-74.6688,-43.6078],[-74.8104,-43.6254],[-74.8427,-43.5955],[-74.842,-43.5703],[-74.8177,-43.5494],[-74.745,-43.5359],[-74.6975,-43.553],[-74.6727,-43.5774],[-74.6648,-43.5996],[-74.6688,-43.6078]]],[[[-73.6322,-44.8215],[-73.6648,-44.8329],[-73.6946,-44.8312],[-73.7248,-44.7969],[-73.7349,-44.7517],[-73.8001,-44.6841],[-73.8185,-44.6521],[-73.817,-44.614],[-73.7795,-44.5592],[-73.7239,-44.5442],[-73.6865,-44.5463],[-73.6412,-44.6108],[-73.6282,-44.6808],[-73.6166,-44.7529],[-73.6322,-44.8215]]],[[[-74.5586,-51.2771],[-74.5609,-51.3608],[-74.5926,-51.3875],[-74.6204,-51.3957],[-74.6907,-51.3702],[-74.7309,-51.3674],[-74.7974,-51.4117],[-74.8533,-51.4342],[-74.9367,-51.4283],[-75.0474,-51.3983],[-75.1463,-51.5243],[-75.1924,-51.5667],[-75.2891,-51.6254],[-75.3,-51.5564],[-75.2385,-51.4535],[-75.21,-51.3833],[-75.1537,-51.2788],[-75.0403,-51.3182],[-74.8814,-51.2795],[-74.7367,-51.2076],[-74.6116,-51.2071],[-74.5705,-51.2454],[-74.5586,-51.2771]]],[[[-75.0548,-50.2961],[-75.2504,-50.3763],[-75.3079,-50.3431],[-75.4491,-50.3434],[-75.4121,-50.2566],[-75.3979,-50.1927],[-75.3767,-50.168],[-75.3688,-50.1127],[-75.3267,-50.0118],[-75.2097,-50.0454],[-75.1226,-50.0553],[-75.0042,-50.0887],[-74.876,-50.11],[-74.8386,-50.1973],[-74.9634,-50.2373],[-75.0548,-50.2961]]],[[[-73.8106,-43.8272],[-73.7896,-43.8765],[-73.8336,-43.8832],[-73.9042,-43.8754],[-73.9383,-43.9143],[-73.9557,-43.922],[-74.1178,-43.8875],[-74.143,-43.8722],[-74.1399,-43.821],[-73.9672,-43.8165],[-73.8569,-43.7838],[-73.8414,-43.789],[-73.8106,-43.8272]]],[[[-74.1422,-51.9311],[-74.1721,-51.9421],[-74.2831,-51.9188],[-74.3387,-51.8979],[-74.4236,-51.8451],[-74.4371,-51.7906],[-74.4754,-51.7257],[-74.4508,-51.7249],[-74.3621,-51.7507],[-74.3257,-51.7702],[-74.2771,-51.8116],[-74.1334,-51.8709],[-74.1154,-51.8885],[-74.1189,-51.9111],[-74.1422,-51.9311]]],[[[-74.3129,-45.6915],[-74.3685,-45.7358],[-74.4655,-45.7572],[-74.5616,-45.7225],[-74.6777,-45.7386],[-74.6898,-45.6626],[-74.6464,-45.6],[-74.5584,-45.5256],[-74.4947,-45.4259],[-74.5023,-45.2852],[-74.45,-45.2529],[-74.4219,-45.2032],[-74.3105,-45.1727],[-74.2854,-45.2772],[-74.3154,-45.4641],[-74.24,-45.5745],[-74.2292,-45.6113],[-74.2439,-45.6536],[-74.3129,-45.6915]]],[[[-67.5752,-55.8896],[-67.6114,-55.8917],[-67.6995,-55.8731],[-67.8315,-55.8648],[-67.8464,-55.8572],[-67.8497,-55.8426],[-67.8341,-55.8275],[-67.7621,-55.8161],[-67.5448,-55.826],[-67.5173,-55.8328],[-67.5098,-55.8443],[-67.5453,-55.8774],[-67.5752,-55.8896]]],[[[-66.4721,-55.2291],[-66.5517,-55.2729],[-66.6111,-55.2699],[-66.6302,-55.2541],[-66.6366,-55.2344],[-66.6248,-55.2131],[-66.5997,-55.1937],[-66.5416,-55.1694],[-66.5231,-55.1655],[-66.4358,-55.1897],[-66.4721,-55.2291]]],[[[-70.9916,-54.868],[-70.9451,-54.9313],[-70.9279,-54.943],[-70.8048,-54.9677],[-70.7493,-54.9527],[-70.6153,-54.9456],[-70.5348,-54.9213],[-70.4175,-54.9089],[-70.2831,-55.0659],[-70.2979,-55.1138],[-70.4042,-55.1656],[-70.4756,-55.1771],[-70.5435,-55.1613],[-70.5387,-55.135],[-70.5511,-55.1119],[-70.5975,-55.082],[-70.6409,-55.0849],[-70.711,-55.1069],[-70.7444,-55.1042],[-70.8155,-55.0799],[-70.9398,-55.0619],[-70.9645,-55.0396],[-70.9673,-55.0068],[-70.9907,-54.9904],[-71.1204,-54.9378],[-71.2033,-54.893],[-71.2736,-54.8869],[-71.2993,-54.8923],[-71.3253,-54.9138],[-71.3886,-54.9343],[-71.4066,-54.9309],[-71.4269,-54.9138],[-71.4372,-54.8893],[-71.4105,-54.8394],[-71.3743,-54.8346],[-71.1971,-54.8444],[-71.0886,-54.8675],[-70.9916,-54.868]]],[[[-67.2889,-55.7769],[-67.3253,-55.7848],[-67.3522,-55.766],[-67.3934,-55.7527],[-67.56,-55.7248],[-67.5635,-55.7078],[-67.5461,-55.6837],[-67.5128,-55.662],[-67.4488,-55.6406],[-67.3974,-55.5852],[-67.3741,-55.5894],[-67.3506,-55.6121],[-67.3104,-55.6887],[-67.2625,-55.7437],[-67.2673,-55.7628],[-67.2889,-55.7769]]]]}}}}
diff --git a/viewer/src/components/Game.vue b/viewer/src/components/Game.vue
index d41d470..fd62ce3 100644
--- a/viewer/src/components/Game.vue
+++ b/viewer/src/components/Game.vue
@@ -208,6 +208,7 @@
:cities="G.map.cities"
:tutorialCity="tutorialCity"
:connections="G.map.connections"
+ :gates="G.map.step3Connections"
:polygons="G.map.polygons"
:buildableCities="getBuildableCities()"
:buildPrices="getBuildableCityPrices()"
@@ -215,7 +216,7 @@
:pickableRegions="getPickableRegions()"
:noUraniumRegions="G.map.noUraniumRegions"
:devBackdrop="G.map.devBackdrop"
- :mapRotation="G.map.mapRotation || 0"
+ :mapRotation="mapRotation"
@build="build($event)"
@pickRegion="pickRegion($event)"
/>
@@ -3194,11 +3195,22 @@ export default class Game extends Vue {
return deckBuildText(this.G.map.name, this.G.options, this.G.players.length);
}
+ /** The board's turn: a map may set its own for the stacked (tall-screen) layout. */
+ get mapRotation(): number {
+ if (!this.G?.map) return 0;
+ const portrait = this.G.map.mapRotationPortrait;
+ return this.stacked && portrait !== undefined ? portrait : this.G.map.mapRotation || 0;
+ }
+
get mapTransform() {
if (!this.G?.map) return '';
const [mx, my] = this.G.map.mapPosition!;
- const rotation = this.G.map.mapRotation;
+ const rotation = this.mapRotation;
if (!rotation) return `translate(${mx}, ${my})`;
+ if (this.G.map.mapRotationCenter) {
+ const [rx, ry] = this.G.map.mapRotationCenter;
+ return `translate(${mx}, ${my}) rotate(${rotation}, ${rx}, ${ry})`;
+ }
const cities = this.G.map.cities;
const xs = cities.map((c) => c.x);
const ys = cities.map((c) => c.y);
diff --git a/viewer/src/components/boards/Map.vue b/viewer/src/components/boards/Map.vue
index aa410c9..7f46cea 100644
--- a/viewer/src/components/boards/Map.vue
+++ b/viewer/src/components/boards/Map.vue
@@ -75,11 +75,15 @@
stroke="black"
stroke-width="1"
/>
- {{ city.name }} — cross-border space (1 house max, 30 Elektro total cost)
+
+ {{ city.name }} — border space (1 house, {{ city.slotCosts[0] }} Elektro plus the connection; not a
+ first city)
+
+ {{ city.name }} — cross-border space (1 house max, 30 Elektro total cost)
-
+
+
+
+
+ Closed until Step 3
+
+