powergrid-engine 1.10.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,62 @@
1
+ import { GameMap } from './../maps';
2
+ export declare enum Regions {
3
+ Pink = "pink",
4
+ Red = "red",
5
+ Brown = "brown",
6
+ Yellow = "yellow",
7
+ Orange = "orange",
8
+ Blue = "blue",
9
+ Green = "green"
10
+ }
11
+ export declare enum Cities {
12
+ Glasgow = "Glasgow",
13
+ Dublin = "Dublin",
14
+ Birmingham = "Birmingham",
15
+ London = "London",
16
+ Randstad = "Randstad",
17
+ Vlaanderen = "Vlaanderen",
18
+ RheinRuhr = "Rhein-Ruhr",
19
+ Paris = "Paris",
20
+ Bordeaux = "Bordeaux",
21
+ Lyon = "Lyon",
22
+ Marseille = "Marseille",
23
+ Lisboa = "Lisboa",
24
+ Madrid = "Madrid",
25
+ Barcelona = "Barcelona",
26
+ Bremen = "Bremen",
27
+ Berlin = "Berlin",
28
+ RheinMain = "Rhein-Main",
29
+ Stuttgart = "Stuttgart",
30
+ Praha = "Praha",
31
+ Katowice = "Katowice",
32
+ München = "M\u00FCnchen",
33
+ Zürich = "Z\u00FCrich",
34
+ Milano = "Milano",
35
+ Roma = "Roma",
36
+ Napoli = "Napoli",
37
+ Wien = "Wien",
38
+ Budapest = "Budapest",
39
+ Zagreb = "Zagreb",
40
+ Oslo = "Oslo",
41
+ Stockholm = "Stockholm",
42
+ Helsinki = "Helsinki",
43
+ Tallinn = "Tallinn",
44
+ Kobenhavn = "K\u00F8benhavn",
45
+ Riga = "Riga",
46
+ StPetersburg = "St. Petersburg",
47
+ Minsk = "Minsk",
48
+ Moskwa = "Moskwa",
49
+ Warszawa = "Warszawa",
50
+ Kyjiv = "Kyjiv",
51
+ Kharkiv = "Kharkiv",
52
+ Odessa = "Odessa",
53
+ Bucuresti = "Bucure\u015Fti",
54
+ Beograd = "Beograd",
55
+ Sofia = "Sofia",
56
+ Tirana = "Tirana",
57
+ Athina = "Athina",
58
+ Istanbul = "Istanbul",
59
+ Izmir = "Izmir",
60
+ Ankara = "Ankara"
61
+ }
62
+ export declare const map: GameMap;
@@ -0,0 +1,356 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.map = exports.Cities = exports.Regions = void 0;
4
+ // by John and Cici
5
+ const lodash_1 = require("lodash");
6
+ const gamestate_1 = require("../gamestate");
7
+ const utils_1 = require("../utils");
8
+ const powerPlants_1 = require("./../powerPlants");
9
+ var Regions;
10
+ (function (Regions) {
11
+ Regions["Pink"] = "pink";
12
+ Regions["Red"] = "red";
13
+ Regions["Brown"] = "brown";
14
+ Regions["Yellow"] = "yellow";
15
+ Regions["Orange"] = "orange";
16
+ Regions["Blue"] = "blue";
17
+ Regions["Green"] = "green";
18
+ })(Regions = exports.Regions || (exports.Regions = {}));
19
+ var Cities;
20
+ (function (Cities) {
21
+ // Pink — UK / Ireland / Low Countries
22
+ Cities["Glasgow"] = "Glasgow";
23
+ Cities["Dublin"] = "Dublin";
24
+ Cities["Birmingham"] = "Birmingham";
25
+ Cities["London"] = "London";
26
+ Cities["Randstad"] = "Randstad";
27
+ Cities["Vlaanderen"] = "Vlaanderen";
28
+ Cities["RheinRuhr"] = "Rhein-Ruhr";
29
+ // Red — France / Iberia
30
+ Cities["Paris"] = "Paris";
31
+ Cities["Bordeaux"] = "Bordeaux";
32
+ Cities["Lyon"] = "Lyon";
33
+ Cities["Marseille"] = "Marseille";
34
+ Cities["Lisboa"] = "Lisboa";
35
+ Cities["Madrid"] = "Madrid";
36
+ Cities["Barcelona"] = "Barcelona";
37
+ // Brown — Central North
38
+ Cities["Bremen"] = "Bremen";
39
+ Cities["Berlin"] = "Berlin";
40
+ Cities["RheinMain"] = "Rhein-Main";
41
+ Cities["Stuttgart"] = "Stuttgart";
42
+ Cities["Praha"] = "Praha";
43
+ Cities["Katowice"] = "Katowice";
44
+ Cities["M\u00FCnchen"] = "M\u00FCnchen";
45
+ // Yellow — Alpine / Italy / Hungary
46
+ Cities["Z\u00FCrich"] = "Z\u00FCrich";
47
+ Cities["Milano"] = "Milano";
48
+ Cities["Roma"] = "Roma";
49
+ Cities["Napoli"] = "Napoli";
50
+ Cities["Wien"] = "Wien";
51
+ Cities["Budapest"] = "Budapest";
52
+ Cities["Zagreb"] = "Zagreb";
53
+ // Orange — Scandinavia / Baltic
54
+ Cities["Oslo"] = "Oslo";
55
+ Cities["Stockholm"] = "Stockholm";
56
+ Cities["Helsinki"] = "Helsinki";
57
+ Cities["Tallinn"] = "Tallinn";
58
+ Cities["Kobenhavn"] = "K\u00F8benhavn";
59
+ Cities["Riga"] = "Riga";
60
+ Cities["StPetersburg"] = "St. Petersburg";
61
+ // Blue — Eastern Europe
62
+ Cities["Minsk"] = "Minsk";
63
+ Cities["Moskwa"] = "Moskwa";
64
+ Cities["Warszawa"] = "Warszawa";
65
+ Cities["Kyjiv"] = "Kyjiv";
66
+ Cities["Kharkiv"] = "Kharkiv";
67
+ Cities["Odessa"] = "Odessa";
68
+ Cities["Bucuresti"] = "Bucure\u015Fti";
69
+ // Green — Balkans / Turkey
70
+ Cities["Beograd"] = "Beograd";
71
+ Cities["Sofia"] = "Sofia";
72
+ Cities["Tirana"] = "Tirana";
73
+ Cities["Athina"] = "Athina";
74
+ Cities["Istanbul"] = "Istanbul";
75
+ Cities["Izmir"] = "Izmir";
76
+ Cities["Ankara"] = "Ankara";
77
+ })(Cities = exports.Cities || (exports.Cities = {}));
78
+ exports.map = {
79
+ name: 'Europe',
80
+ cities: [
81
+ // Pink — UK / Ireland / Low Countries
82
+ { name: Cities.Glasgow, region: Regions.Pink, x: 490, y: 510 },
83
+ { name: Cities.Dublin, region: Regions.Pink, x: 390, y: 660 },
84
+ { name: Cities.Birmingham, region: Regions.Pink, x: 485, y: 695 },
85
+ { name: Cities.London, region: Regions.Pink, x: 545, y: 800 },
86
+ { name: Cities.Randstad, region: Regions.Pink, x: 770, y: 770 },
87
+ { name: Cities.Vlaanderen, region: Regions.Pink, x: 700, y: 830 },
88
+ { name: Cities.RheinRuhr, region: Regions.Pink, x: 845, y: 860 },
89
+ // Red — France / Iberia
90
+ { name: Cities.Paris, region: Regions.Red, x: 730, y: 920 },
91
+ { name: Cities.Bordeaux, region: Regions.Red, x: 655, y: 1095 },
92
+ { name: Cities.Lyon, region: Regions.Red, x: 785, y: 1100 },
93
+ { name: Cities.Marseille, region: Regions.Red, x: 815, y: 1240 },
94
+ { name: Cities.Barcelona, region: Regions.Red, x: 650, y: 1280 },
95
+ { name: Cities.Madrid, region: Regions.Red, x: 435, y: 1335 },
96
+ { name: Cities.Lisboa, region: Regions.Red, x: 255, y: 1335 },
97
+ // Brown — Central North (Germany / Czech / Poland-south)
98
+ { name: Cities.Bremen, region: Regions.Brown, x: 1010, y: 770 },
99
+ { name: Cities.Berlin, region: Regions.Brown, x: 1180, y: 800 },
100
+ { name: Cities.RheinMain, region: Regions.Brown, x: 970, y: 920 },
101
+ { name: Cities.Stuttgart, region: Regions.Brown, x: 995, y: 1000 },
102
+ { name: Cities.München, region: Regions.Brown, x: 1100, y: 1050 },
103
+ { name: Cities.Praha, region: Regions.Brown, x: 1235, y: 940 },
104
+ { name: Cities.Katowice, region: Regions.Brown, x: 1380, y: 940 },
105
+ // Yellow — Alpine / Italy / Hungary
106
+ { name: Cities.Zürich, region: Regions.Yellow, x: 1010, y: 1100 },
107
+ { name: Cities.Milano, region: Regions.Yellow, x: 1075, y: 1180 },
108
+ { name: Cities.Roma, region: Regions.Yellow, x: 1180, y: 1310 },
109
+ { name: Cities.Napoli, region: Regions.Yellow, x: 1235, y: 1430 },
110
+ { name: Cities.Wien, region: Regions.Yellow, x: 1265, y: 1080 },
111
+ { name: Cities.Budapest, region: Regions.Yellow, x: 1390, y: 1080 },
112
+ { name: Cities.Zagreb, region: Regions.Yellow, x: 1300, y: 1180 },
113
+ // Orange — Scandinavia / Baltic
114
+ { name: Cities.Oslo, region: Regions.Orange, x: 1015, y: 365 },
115
+ { name: Cities.Stockholm, region: Regions.Orange, x: 1170, y: 415 },
116
+ { name: Cities.Helsinki, region: Regions.Orange, x: 1395, y: 360 },
117
+ { name: Cities.Tallinn, region: Regions.Orange, x: 1410, y: 470 },
118
+ { name: Cities.Riga, region: Regions.Orange, x: 1395, y: 575 },
119
+ { name: Cities.Kobenhavn, region: Regions.Orange, x: 1180, y: 660 },
120
+ { name: Cities.StPetersburg, region: Regions.Orange, x: 1620, y: 460 },
121
+ // Blue — Eastern Europe
122
+ { name: Cities.Warszawa, region: Regions.Blue, x: 1500, y: 815 },
123
+ { name: Cities.Minsk, region: Regions.Blue, x: 1610, y: 815 },
124
+ { name: Cities.Moskwa, region: Regions.Blue, x: 1830, y: 600 },
125
+ { name: Cities.Kyjiv, region: Regions.Blue, x: 1690, y: 980 },
126
+ { name: Cities.Kharkiv, region: Regions.Blue, x: 1860, y: 980 },
127
+ { name: Cities.Odessa, region: Regions.Blue, x: 1720, y: 1100 },
128
+ { name: Cities.Bucuresti, region: Regions.Blue, x: 1610, y: 1175 },
129
+ // Green — Balkans / Turkey
130
+ { name: Cities.Beograd, region: Regions.Green, x: 1390, y: 1175 },
131
+ { name: Cities.Sofia, region: Regions.Green, x: 1505, y: 1240 },
132
+ { name: Cities.Tirana, region: Regions.Green, x: 1370, y: 1330 },
133
+ { name: Cities.Athina, region: Regions.Green, x: 1480, y: 1450 },
134
+ { name: Cities.Istanbul, region: Regions.Green, x: 1665, y: 1335 },
135
+ { name: Cities.Izmir, region: Regions.Green, x: 1730, y: 1430 },
136
+ { name: Cities.Ankara, region: Regions.Green, x: 1850, y: 1380 },
137
+ ],
138
+ connections: [
139
+ // Pink — UK / Ireland / Low Countries
140
+ { nodes: [Cities.Dublin, Cities.Glasgow], cost: 17 },
141
+ { nodes: [Cities.Glasgow, Cities.Birmingham], cost: 13 },
142
+ { nodes: [Cities.Dublin, Cities.Birmingham], cost: 15 },
143
+ { nodes: [Cities.Birmingham, Cities.London], cost: 4 },
144
+ { nodes: [Cities.London, Cities.Vlaanderen], cost: 15 },
145
+ { nodes: [Cities.London, Cities.Randstad], cost: 18 },
146
+ { nodes: [Cities.Randstad, Cities.Vlaanderen], cost: 4 },
147
+ { nodes: [Cities.Vlaanderen, Cities.RheinRuhr], cost: 4 },
148
+ { nodes: [Cities.Randstad, Cities.RheinRuhr], cost: 4 },
149
+ // Red — France / Iberia (internal)
150
+ { nodes: [Cities.Paris, Cities.Bordeaux], cost: 12 },
151
+ { nodes: [Cities.Paris, Cities.Lyon], cost: 11 },
152
+ { nodes: [Cities.Bordeaux, Cities.Lyon], cost: 12 },
153
+ { nodes: [Cities.Lyon, Cities.Marseille], cost: 8 },
154
+ { nodes: [Cities.Bordeaux, Cities.Marseille], cost: 12 },
155
+ { nodes: [Cities.Marseille, Cities.Barcelona], cost: 11 },
156
+ { nodes: [Cities.Bordeaux, Cities.Barcelona], cost: 15 },
157
+ { nodes: [Cities.Bordeaux, Cities.Madrid], cost: 15 },
158
+ { nodes: [Cities.Madrid, Cities.Barcelona], cost: 14 },
159
+ { nodes: [Cities.Madrid, Cities.Lisboa], cost: 13 },
160
+ // Red ↔ Pink
161
+ { nodes: [Cities.Paris, Cities.London], cost: 16 },
162
+ { nodes: [Cities.Paris, Cities.Vlaanderen], cost: 7 },
163
+ { nodes: [Cities.Paris, Cities.RheinRuhr], cost: 10 },
164
+ // Brown — Central North (internal)
165
+ { nodes: [Cities.Bremen, Cities.Berlin], cost: 6 },
166
+ { nodes: [Cities.Bremen, Cities.RheinMain], cost: 9 },
167
+ { nodes: [Cities.Berlin, Cities.RheinMain], cost: 10 },
168
+ { nodes: [Cities.Berlin, Cities.Praha], cost: 7 },
169
+ { nodes: [Cities.RheinMain, Cities.Praha], cost: 10 },
170
+ { nodes: [Cities.RheinMain, Cities.München], cost: 6 },
171
+ { nodes: [Cities.RheinMain, Cities.Stuttgart], cost: 3 },
172
+ { nodes: [Cities.Stuttgart, Cities.München], cost: 5 },
173
+ { nodes: [Cities.München, Cities.Praha], cost: 6 },
174
+ { nodes: [Cities.Praha, Cities.Katowice], cost: 8 },
175
+ // Brown ↔ Pink
176
+ { nodes: [Cities.Bremen, Cities.Randstad], cost: 8 },
177
+ { nodes: [Cities.Bremen, Cities.Vlaanderen], cost: 10 },
178
+ { nodes: [Cities.RheinMain, Cities.Vlaanderen], cost: 6 },
179
+ { nodes: [Cities.RheinMain, Cities.RheinRuhr], cost: 3 },
180
+ // Brown ↔ Red
181
+ { nodes: [Cities.Stuttgart, Cities.Paris], cost: 14 },
182
+ // Yellow — Alpine / Italy / Hungary (internal)
183
+ { nodes: [Cities.Zürich, Cities.Milano], cost: 11 },
184
+ { nodes: [Cities.Milano, Cities.Zagreb], cost: 17 },
185
+ { nodes: [Cities.Milano, Cities.Roma], cost: 19 },
186
+ { nodes: [Cities.Roma, Cities.Napoli], cost: 7 },
187
+ { nodes: [Cities.Wien, Cities.Budapest], cost: 5 },
188
+ { nodes: [Cities.Wien, Cities.Zagreb], cost: 8 },
189
+ { nodes: [Cities.Budapest, Cities.Zagreb], cost: 7 },
190
+ // Yellow ↔ Red
191
+ { nodes: [Cities.Paris, Cities.Zürich], cost: 14 },
192
+ { nodes: [Cities.Lyon, Cities.Zürich], cost: 14 },
193
+ { nodes: [Cities.Lyon, Cities.Milano], cost: 11 },
194
+ { nodes: [Cities.Marseille, Cities.Milano], cost: 13 },
195
+ // Yellow ↔ Brown
196
+ { nodes: [Cities.Zürich, Cities.München], cost: 8 },
197
+ { nodes: [Cities.Zürich, Cities.Stuttgart], cost: 5 },
198
+ { nodes: [Cities.München, Cities.Wien], cost: 9 },
199
+ { nodes: [Cities.Praha, Cities.Wien], cost: 7 },
200
+ { nodes: [Cities.Wien, Cities.Katowice], cost: 8 },
201
+ { nodes: [Cities.Budapest, Cities.Katowice], cost: 11 },
202
+ // Orange — Scandinavia / Baltic (internal)
203
+ { nodes: [Cities.Oslo, Cities.Kobenhavn], cost: 17 },
204
+ { nodes: [Cities.Oslo, Cities.Stockholm], cost: 13 },
205
+ { nodes: [Cities.Stockholm, Cities.Kobenhavn], cost: 18 },
206
+ { nodes: [Cities.Stockholm, Cities.Helsinki], cost: 21 },
207
+ { nodes: [Cities.Helsinki, Cities.StPetersburg], cost: 11 },
208
+ { nodes: [Cities.Tallinn, Cities.StPetersburg], cost: 9 },
209
+ { nodes: [Cities.Tallinn, Cities.Riga], cost: 7 },
210
+ { nodes: [Cities.Riga, Cities.StPetersburg], cost: 13 },
211
+ // Orange ↔ Brown
212
+ { nodes: [Cities.Kobenhavn, Cities.Bremen], cost: 12 },
213
+ { nodes: [Cities.Kobenhavn, Cities.Berlin], cost: 15 },
214
+ // Blue — Eastern Europe (internal)
215
+ { nodes: [Cities.Warszawa, Cities.Minsk], cost: 10 },
216
+ { nodes: [Cities.Warszawa, Cities.Kyjiv], cost: 14 },
217
+ { nodes: [Cities.Minsk, Cities.Moskwa], cost: 14 },
218
+ { nodes: [Cities.Minsk, Cities.Kyjiv], cost: 10 },
219
+ { nodes: [Cities.Moskwa, Cities.Kharkiv], cost: 16 },
220
+ { nodes: [Cities.Kyjiv, Cities.Kharkiv], cost: 9 },
221
+ { nodes: [Cities.Kyjiv, Cities.Odessa], cost: 9 },
222
+ { nodes: [Cities.Kharkiv, Cities.Odessa], cost: 13 },
223
+ { nodes: [Cities.Odessa, Cities.Bucuresti], cost: 10 },
224
+ // Blue ↔ Brown
225
+ { nodes: [Cities.Berlin, Cities.Warszawa], cost: 11 },
226
+ { nodes: [Cities.Praha, Cities.Warszawa], cost: 11 },
227
+ { nodes: [Cities.Katowice, Cities.Warszawa], cost: 5 },
228
+ // Blue ↔ Orange
229
+ { nodes: [Cities.Kobenhavn, Cities.Warszawa], cost: 25 },
230
+ { nodes: [Cities.Riga, Cities.Warszawa], cost: 12 },
231
+ { nodes: [Cities.Riga, Cities.Minsk], cost: 8 },
232
+ { nodes: [Cities.Riga, Cities.Moskwa], cost: 18 },
233
+ { nodes: [Cities.StPetersburg, Cities.Moskwa], cost: 14 },
234
+ // Blue ↔ Yellow
235
+ { nodes: [Cities.Kyjiv, Cities.Budapest], cost: 21 },
236
+ { nodes: [Cities.Odessa, Cities.Budapest], cost: 25 },
237
+ { nodes: [Cities.Bucuresti, Cities.Budapest], cost: 16 },
238
+ // Green — Balkans / Turkey (internal)
239
+ { nodes: [Cities.Beograd, Cities.Sofia], cost: 11 },
240
+ { nodes: [Cities.Beograd, Cities.Tirana], cost: 15 },
241
+ { nodes: [Cities.Sofia, Cities.Tirana], cost: 13 },
242
+ { nodes: [Cities.Sofia, Cities.Athina], cost: 17 },
243
+ { nodes: [Cities.Sofia, Cities.Istanbul], cost: 13 },
244
+ { nodes: [Cities.Tirana, Cities.Athina], cost: 16 },
245
+ { nodes: [Cities.Istanbul, Cities.Izmir], cost: 8 },
246
+ { nodes: [Cities.Istanbul, Cities.Ankara], cost: 9 },
247
+ { nodes: [Cities.Izmir, Cities.Ankara], cost: 10 },
248
+ // Green ↔ Blue
249
+ { nodes: [Cities.Bucuresti, Cities.Beograd], cost: 12 },
250
+ { nodes: [Cities.Bucuresti, Cities.Sofia], cost: 9 },
251
+ { nodes: [Cities.Bucuresti, Cities.Istanbul], cost: 13 },
252
+ // Green ↔ Yellow
253
+ { nodes: [Cities.Beograd, Cities.Zagreb], cost: 9 },
254
+ { nodes: [Cities.Beograd, Cities.Napoli], cost: 18 },
255
+ { nodes: [Cities.Beograd, Cities.Budapest], cost: 10 },
256
+ { nodes: [Cities.Tirana, Cities.Napoli], cost: 25 },
257
+ ],
258
+ layout: 'Landscape',
259
+ // Coords were authored against the printed board (~1860x1450). The map area
260
+ // in the default landscape viewBox is roughly 0..1100 x 0..720 (player boards
261
+ // start at x=1105, resource market at y=720). Shrink uniformly to fit and
262
+ // shift up-left so the map sits in the top-left of that area.
263
+ adjustRatio: [0.5, 0.5],
264
+ mapPosition: [-30, -50],
265
+ // Slight clockwise tilt — fits the map's NW-tall / SE-tall extents into the
266
+ // available area better than the un-rotated layout.
267
+ mapRotation: 10,
268
+ // Resupply table verified with John from the Europe refill summary cards.
269
+ // Indexed [resource][playerCount-2][step-1].
270
+ resupply: [
271
+ // Coal
272
+ [
273
+ [2, 6, 2],
274
+ [2, 6, 2],
275
+ [3, 7, 4],
276
+ [3, 8, 4],
277
+ [5, 10, 5], // 6P
278
+ ],
279
+ // Oil
280
+ [
281
+ [2, 2, 3],
282
+ [2, 2, 3],
283
+ [3, 3, 4],
284
+ [4, 3, 5],
285
+ [4, 5, 6], // 6P
286
+ ],
287
+ // Garbage
288
+ [
289
+ [2, 3, 5],
290
+ [2, 3, 5],
291
+ [3, 4, 5],
292
+ [3, 5, 7],
293
+ [4, 6, 8], // 6P
294
+ ],
295
+ // Uranium
296
+ [
297
+ [1, 1, 2],
298
+ [1, 1, 2],
299
+ [1, 2, 2],
300
+ [2, 3, 3],
301
+ [2, 3, 4], // 6P
302
+ ],
303
+ ],
304
+ // Europe uses price spaces 1–9 (not the standard 1–8 with uranium ending at 16);
305
+ // every resource — including uranium — caps at price 9.
306
+ //
307
+ // Per-price slot counts (verified with John from the board):
308
+ // Coal [4,4,4,2,2,2,2,2,2] total 24 market slots
309
+ // Oil [2,2,2,2,2,2,2,2,4] total 20 market slots
310
+ // Garbage [3,3,3,3,3,3,3,3,0] total 24 market slots
311
+ // Uranium [1,1,1,1,1,1,2,2,2] total 12 market slots
312
+ //
313
+ // Oil note: market capacity is 20 but we keep the total cube count at 24 for now
314
+ // (per Mike's guidance while he tries to reach 2F-Spiele). This means oil can
315
+ // overflow back to the supply pile and a player holding 1–2 oil on power plants
316
+ // can briefly leave the market with oil still available at price 1. If the
317
+ // publisher confirms otherwise, drop startingSupply oil from 24 to 20.
318
+ coalPrices: [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9],
319
+ oilPrices: [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9],
320
+ garbagePrices: [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8],
321
+ uraniumPrices: [1, 2, 3, 4, 5, 6, 7, 7, 8, 8, 9, 9],
322
+ // Initial market fill from the rules (coal 2–9, oil 3–9, garbage 3–8, uranium 8–9):
323
+ // coal = 4+4+2+2+2+2+2+2 = 20
324
+ // oil = 2+2+2+2+2+2+4 = 16
325
+ // garbage = 3+3+3+3+3+3 = 18
326
+ // uranium = 2+2 = 4
327
+ startingResources: [20, 16, 18, 4],
328
+ // Total cubes in the game (used cubes return here; refill draws from here).
329
+ startingSupply: [24, 24, 24, 12],
330
+ // Europe market setup: shuffle the deck, draw 9 plants, place the 4 lowest in
331
+ // the current market and the 5 next in the future market, with the Step 3 card
332
+ // buried at the bottom of the deck.
333
+ //
334
+ // The rules call for the New Power Plants Set 2 deck ("plug-back" cards) and a
335
+ // rule against placing a plug-back card on top of the deck — both are no-ops
336
+ // here since this engine ships only one power-plant set. Revisit if/when Set 2
337
+ // is added.
338
+ //
339
+ // The Step 2 trigger for Europe is handled in engine.ts (special branch): it
340
+ // removes the lowest plant from the current market once, then re-sorts the
341
+ // remaining 8 plants into 4 actual + 4 future without drawing from the deck.
342
+ setupDeck(numPlayers, variant, rng) {
343
+ let powerPlantsDeck = lodash_1.cloneDeep(powerPlants_1.powerPlants);
344
+ const step3Index = powerPlantsDeck.findIndex((p) => p.type === gamestate_1.PowerPlantType.Step3);
345
+ const step3 = powerPlantsDeck.splice(step3Index, 1)[0];
346
+ powerPlantsDeck = utils_1.shuffle(powerPlantsDeck, rng() + '');
347
+ const initialPlants = powerPlantsDeck.splice(0, 9).sort((a, b) => a.number - b.number);
348
+ const actualMarket = initialPlants.slice(0, 4);
349
+ const futureMarket = initialPlants.slice(4); // 5 plants
350
+ powerPlantsDeck.push(step3);
351
+ return { actualMarket, futureMarket, powerPlantsDeck };
352
+ },
353
+ mapSpecificRules: 'Europe uses the New Power Plants Set 2 deck (cards with a plug on the back). ' +
354
+ 'The power plant market starts as 4 current + 5 future power plants (9 total). ' +
355
+ 'When Step 2 begins, remove the lowest-numbered plant from the current market from the game once and do not replace it; the future market then has 4 plants instead of 5.',
356
+ };
@@ -183,4 +183,111 @@ exports.map = {
183
183
  { nodes: [Cities.Seongjin, Cities.Hamheung], cost: 17 },
184
184
  { nodes: [Cities.Hamheung, Cities.Hyesan], cost: 23 },
185
185
  ],
186
+ layout: 'Portrait',
187
+ adjustRatio: [0.22, 0.22],
188
+ mapPosition: [80, 30],
189
+ // Taller than the default Portrait viewBox to make room for Korea's stacked
190
+ // dual resource markets (North above South).
191
+ viewBox: [1480, 1180],
192
+ supplyPosition: [675, 1040],
193
+ // South-side resource market.
194
+ // Indexed [resource][playerCount-2][step-1].
195
+ // Verified from the Korea Recharged rulebook resource table (S rows).
196
+ resupply: [
197
+ // Coal (S)
198
+ [
199
+ [2, 2, 2],
200
+ [2, 3, 2],
201
+ [3, 3, 2],
202
+ [3, 4, 3],
203
+ [4, 5, 3], // 6P
204
+ ],
205
+ // Oil (S)
206
+ [
207
+ [1, 1, 3],
208
+ [1, 2, 3],
209
+ [2, 3, 3],
210
+ [3, 3, 4],
211
+ [3, 4, 4],
212
+ ],
213
+ // Garbage (S)
214
+ [
215
+ [1, 1, 2],
216
+ [1, 1, 2],
217
+ [1, 2, 2],
218
+ [2, 2, 3],
219
+ [2, 3, 3],
220
+ ],
221
+ // Uranium (S only — North bans nuclear resupply)
222
+ [
223
+ [1, 1, 1],
224
+ [1, 1, 1],
225
+ [1, 2, 2],
226
+ [2, 3, 2],
227
+ [2, 3, 3],
228
+ ],
229
+ ],
230
+ // North-side resource market. Three resources only (no uranium row).
231
+ // Verified from the Korea Recharged rulebook resource table (N rows).
232
+ resupplyNorth: [
233
+ // Coal (N)
234
+ [
235
+ [1, 2, 1],
236
+ [2, 2, 1],
237
+ [2, 3, 2],
238
+ [2, 3, 2],
239
+ [3, 4, 3],
240
+ ],
241
+ // Oil (N)
242
+ [
243
+ [1, 1, 1],
244
+ [1, 1, 1],
245
+ [1, 1, 2],
246
+ [1, 2, 2],
247
+ [2, 2, 3],
248
+ ],
249
+ // Garbage (N)
250
+ [
251
+ [0, 1, 1],
252
+ [0, 1, 1],
253
+ [1, 1, 2],
254
+ [1, 1, 2],
255
+ [1, 2, 3],
256
+ ],
257
+ ],
258
+ // Korea has custom slot counts per price space, different per side.
259
+ // Total resources (across both markets + supply) match standard Power Grid:
260
+ // 24 coal, 24 oil, 24 garbage, 12 uranium.
261
+ //
262
+ // North slots per price [1..8]:
263
+ // coal [2,2,2,2,1,1,1,1] = 12 total
264
+ // oil [1,1,1,1,1,1,1,1] = 8 total
265
+ // garbage [1,1,1,1,1,1,1,1] = 8 total
266
+ //
267
+ // South slots per price [1..8] (uranium prices [1..8,10,12,14,16]):
268
+ // coal [1,1,1,1,2,2,2,2] = 12 total
269
+ // oil [2,2,2,2,2,2,2,2] = 16 total
270
+ // garbage [2,2,2,2,2,2,2,2] = 16 total
271
+ // uranium [1,1,1,1,1,1,1,1,1,1,1,1] = 12 total
272
+ //
273
+ // Initial market fill per rulebook:
274
+ // North: coal 1–8 (12), oil 3–8 (6), garbage 7–8 (2).
275
+ // South: coal 1–8 (12), oil 3–8 (12), garbage 7–8 (4), uranium 14–16 (2).
276
+ startingResources: [12, 12, 4, 2],
277
+ startingResourcesNorth: [12, 6, 2],
278
+ // Total cubes in the game across BOTH markets + shared supply.
279
+ // Used cubes return to the shared supply; on bureaucracy, North restocks
280
+ // first, then South from whatever remains.
281
+ startingSupply: [24, 24, 24, 12],
282
+ coalPrices: [1, 2, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8],
283
+ oilPrices: [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8],
284
+ garbagePrices: [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8],
285
+ uraniumPrices: [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16],
286
+ coalPricesNorth: [1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8],
287
+ oilPricesNorth: [1, 2, 3, 4, 5, 6, 7, 8],
288
+ garbagePricesNorth: [1, 2, 3, 4, 5, 6, 7, 8],
289
+ mapSpecificRules: 'Korea has two separate resource markets: North and South.\n' +
290
+ 'On your buying turn, choose one side — all resources you buy that turn must come from that side. The next turn you may choose the other side.\n' +
291
+ 'The North market has no uranium track; uranium is only available from the South.\n' +
292
+ 'Both markets share a single supply pool. During bureaucracy, North restocks first, then South from whatever remains.',
186
293
  };
@@ -0,0 +1,62 @@
1
+ import { GameMap } from './../maps';
2
+ export declare enum Regions {
3
+ Pink = "pink",
4
+ Brown = "brown",
5
+ Orange = "orange",
6
+ Green = "green",
7
+ Blue = "blue",
8
+ Yellow = "yellow",
9
+ Red = "red"
10
+ }
11
+ export declare enum Cities {
12
+ Edmonton = "Edmonton",
13
+ Calgary = "Calgary",
14
+ Vancouver = "Vancouver",
15
+ Seattle = "Seattle",
16
+ Regina = "Regina",
17
+ Winnipeg = "Winnipeg",
18
+ Minneapolis = "Minneapolis",
19
+ Portland = "Portland",
20
+ SanFrancisco = "San Francisco",
21
+ LosAngeles = "Los Angeles",
22
+ SanDiego = "San Diego",
23
+ SaltLakeCity = "Salt Lake City",
24
+ LasVegas = "Las Vegas",
25
+ Denver = "Denver",
26
+ Albuquerque = "Albuquerque",
27
+ Juarez = "Juarez",
28
+ Chihuahua = "Chihuahua",
29
+ Monterrey = "Monterrey",
30
+ Guadalajara = "Guadalajara",
31
+ MexicoCityN = "Mexico City N",
32
+ MexicoCityS = "Mexico City S",
33
+ SanAntonio = "San Antonio",
34
+ DallasFortWorth = "Dallas-Fort Worth",
35
+ Houston = "Houston",
36
+ NewOrleans = "New Orleans",
37
+ Atlanta = "Atlanta",
38
+ Jacksonville = "Jacksonville",
39
+ Miami = "Miami",
40
+ Milwaukee = "Milwaukee",
41
+ Chicago = "Chicago",
42
+ KansasCity = "Kansas City",
43
+ StLouis = "St. Louis",
44
+ Indianapolis = "Indianapolis",
45
+ OklahomaCity = "Oklahoma City",
46
+ Memphis = "Memphis",
47
+ Toronto = "Toronto",
48
+ Detroit = "Detroit",
49
+ Pittsburgh = "Pittsburgh",
50
+ Columbus = "Columbus",
51
+ Nashville = "Nashville",
52
+ Washington = "Washington",
53
+ Charlotte = "Charlotte",
54
+ Quebec = "Quebec",
55
+ Ottawa = "Ottawa",
56
+ Montreal = "Montreal",
57
+ NewYorkN = "New York N",
58
+ NewYorkS = "New York S",
59
+ Boston = "Boston",
60
+ Philadelphia = "Philadelphia"
61
+ }
62
+ export declare const map: GameMap;