powergrid-engine 1.9.7
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.
- package/LICENSE +21 -0
- package/README.md +31 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +17 -0
- package/dist/src/available-moves.d.ts +24 -0
- package/dist/src/available-moves.js +363 -0
- package/dist/src/engine.d.ts +20 -0
- package/dist/src/engine.js +1937 -0
- package/dist/src/gamestate.d.ts +135 -0
- package/dist/src/gamestate.js +30 -0
- package/dist/src/log.d.ts +14 -0
- package/dist/src/log.js +2 -0
- package/dist/src/maps/america.d.ts +55 -0
- package/dist/src/maps/america.js +411 -0
- package/dist/src/maps/australia.d.ts +46 -0
- package/dist/src/maps/australia.js +138 -0
- package/dist/src/maps/badenwurttemberg.d.ts +46 -0
- package/dist/src/maps/badenwurttemberg.js +163 -0
- package/dist/src/maps/benelux.d.ts +46 -0
- package/dist/src/maps/benelux.js +210 -0
- package/dist/src/maps/brazil.d.ts +54 -0
- package/dist/src/maps/brazil.js +292 -0
- package/dist/src/maps/centraleurope.d.ts +54 -0
- package/dist/src/maps/centraleurope.js +236 -0
- package/dist/src/maps/china.d.ts +54 -0
- package/dist/src/maps/china.js +262 -0
- package/dist/src/maps/france.d.ts +54 -0
- package/dist/src/maps/france.js +290 -0
- package/dist/src/maps/germany.d.ts +57 -0
- package/dist/src/maps/germany.js +328 -0
- package/dist/src/maps/indian.d.ts +54 -0
- package/dist/src/maps/indian.js +283 -0
- package/dist/src/maps/italy.d.ts +54 -0
- package/dist/src/maps/italy.js +190 -0
- package/dist/src/maps/japan.d.ts +46 -0
- package/dist/src/maps/japan.js +144 -0
- package/dist/src/maps/korea.d.ts +54 -0
- package/dist/src/maps/korea.js +186 -0
- package/dist/src/maps/middleeast.d.ts +54 -0
- package/dist/src/maps/middleeast.js +225 -0
- package/dist/src/maps/northerneurope.d.ts +54 -0
- package/dist/src/maps/northerneurope.js +197 -0
- package/dist/src/maps/quebec.d.ts +54 -0
- package/dist/src/maps/quebec.js +283 -0
- package/dist/src/maps/russia.d.ts +54 -0
- package/dist/src/maps/russia.js +286 -0
- package/dist/src/maps/southafrica.d.ts +46 -0
- package/dist/src/maps/southafrica.js +152 -0
- package/dist/src/maps/spainportugal.d.ts +54 -0
- package/dist/src/maps/spainportugal.js +289 -0
- package/dist/src/maps/ukireland.d.ts +52 -0
- package/dist/src/maps/ukireland.js +176 -0
- package/dist/src/maps.d.ts +50 -0
- package/dist/src/maps.js +61 -0
- package/dist/src/move.d.ts +63 -0
- package/dist/src/move.js +15 -0
- package/dist/src/powerPlants.d.ts +4 -0
- package/dist/src/powerPlants.js +60 -0
- package/dist/src/prices.d.ts +7 -0
- package/dist/src/prices.js +10 -0
- package/dist/src/randomizeMap.d.ts +3 -0
- package/dist/src/randomizeMap.js +244 -0
- package/dist/src/utils.d.ts +2 -0
- package/dist/src/utils.js +24 -0
- package/dist/wrapper.d.ts +30 -0
- package/dist/wrapper.js +127 -0
- package/index.ts +6 -0
- package/package.json +51 -0
- package/src/available-moves.ts +450 -0
- package/src/engine.spec.ts +163 -0
- package/src/engine.ts +2270 -0
- package/src/fixtures/GermanyRecharged.json +6627 -0
- package/src/fixtures/USAOriginal.json +5216 -0
- package/src/fixtures/supply.json +5792 -0
- package/src/fixtures/undo.json +4102 -0
- package/src/gamestate.ts +164 -0
- package/src/log.ts +17 -0
- package/src/maps/america.ts +411 -0
- package/src/maps/australia.ts +137 -0
- package/src/maps/badenwurttemberg.ts +162 -0
- package/src/maps/benelux.ts +210 -0
- package/src/maps/brazil.ts +306 -0
- package/src/maps/centraleurope.ts +235 -0
- package/src/maps/china.ts +268 -0
- package/src/maps/france.ts +295 -0
- package/src/maps/germany.ts +328 -0
- package/src/maps/indian.ts +289 -0
- package/src/maps/italy.ts +189 -0
- package/src/maps/japan.ts +143 -0
- package/src/maps/korea.ts +185 -0
- package/src/maps/middleeast.ts +225 -0
- package/src/maps/northerneurope.ts +196 -0
- package/src/maps/quebec.ts +304 -0
- package/src/maps/russia.ts +292 -0
- package/src/maps/southafrica.ts +151 -0
- package/src/maps/spainportugal.ts +295 -0
- package/src/maps/ukireland.ts +175 -0
- package/src/maps.ts +123 -0
- package/src/move.ts +83 -0
- package/src/powerPlants.ts +59 -0
- package/src/prices.ts +10 -0
- package/src/randomizeMap.ts +288 -0
- package/src/rankings.spec.ts +18 -0
- package/src/utils.spec.ts +13 -0
- package/src/utils.ts +23 -0
- package/tsconfig.json +17 -0
- package/wrapper.ts +126 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { GameMap } from './../maps';
|
|
2
|
+
export declare enum Regions {
|
|
3
|
+
Brown = "brown",
|
|
4
|
+
Yellow = "yellow",
|
|
5
|
+
Pink = "pink",
|
|
6
|
+
Purple = "purple",
|
|
7
|
+
Orange = "orange",
|
|
8
|
+
Red = "red"
|
|
9
|
+
}
|
|
10
|
+
export declare enum Cities {
|
|
11
|
+
Oulu = "Oulu",
|
|
12
|
+
Kuopid = "Kuopid",
|
|
13
|
+
Tampere = "Tampere",
|
|
14
|
+
Helsinki = "Helsinki",
|
|
15
|
+
Espoo = "Espoo",
|
|
16
|
+
Pori = "Pori",
|
|
17
|
+
Turku = "Turku",
|
|
18
|
+
Uppsala = "Uppsala",
|
|
19
|
+
Stockholm = "Stockholm",
|
|
20
|
+
Vasteras = "Vasteras",
|
|
21
|
+
Drebro = "Drebro",
|
|
22
|
+
Sundsvall = "Sundsvall",
|
|
23
|
+
Lulea = "Lulea",
|
|
24
|
+
Ostersund = "Ostersund",
|
|
25
|
+
Tallinn = "Tallinn",
|
|
26
|
+
Tartu = "Tartu",
|
|
27
|
+
Daugavpils = "Daugavpils",
|
|
28
|
+
Vilnius = "Vilnius",
|
|
29
|
+
Kaunas = "Kaunas",
|
|
30
|
+
Rica = "Rica",
|
|
31
|
+
Klaipeda = "Klaipeda",
|
|
32
|
+
Karlstad = "Karlstad",
|
|
33
|
+
Linkopinc = "Linkopinc",
|
|
34
|
+
Jonkoping = "Jonkoping",
|
|
35
|
+
Visby = "Visby",
|
|
36
|
+
Kristianstad = "Kristianstad",
|
|
37
|
+
Malmo = "Malmo",
|
|
38
|
+
Goteborg = "Goteborg",
|
|
39
|
+
Aalborg = "Aalborg",
|
|
40
|
+
Aarhus = "Aarhus",
|
|
41
|
+
Kobenhavn = "Kobenhavn",
|
|
42
|
+
Nykobingfalster = "Nykobing Falster",
|
|
43
|
+
Ringkobing = "Ringkobing",
|
|
44
|
+
Esbjerg = "Esbjerg",
|
|
45
|
+
Odense = "Odense",
|
|
46
|
+
Tromso = "Tromso",
|
|
47
|
+
Bood = "Bood",
|
|
48
|
+
Trondheim = "Trondheim",
|
|
49
|
+
Oslo = "Oslo",
|
|
50
|
+
Arendal = "Arendal",
|
|
51
|
+
Bergen = "Bergen",
|
|
52
|
+
Stavanger = "Stavanger"
|
|
53
|
+
}
|
|
54
|
+
export declare const map: GameMap;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.map = exports.Cities = exports.Regions = void 0;
|
|
4
|
+
var Regions;
|
|
5
|
+
(function (Regions) {
|
|
6
|
+
Regions["Brown"] = "brown";
|
|
7
|
+
Regions["Yellow"] = "yellow";
|
|
8
|
+
Regions["Pink"] = "pink";
|
|
9
|
+
Regions["Purple"] = "purple";
|
|
10
|
+
Regions["Orange"] = "orange";
|
|
11
|
+
Regions["Red"] = "red";
|
|
12
|
+
})(Regions = exports.Regions || (exports.Regions = {}));
|
|
13
|
+
var Cities;
|
|
14
|
+
(function (Cities) {
|
|
15
|
+
Cities["Oulu"] = "Oulu";
|
|
16
|
+
Cities["Kuopid"] = "Kuopid";
|
|
17
|
+
Cities["Tampere"] = "Tampere";
|
|
18
|
+
Cities["Helsinki"] = "Helsinki";
|
|
19
|
+
Cities["Espoo"] = "Espoo";
|
|
20
|
+
Cities["Pori"] = "Pori";
|
|
21
|
+
Cities["Turku"] = "Turku";
|
|
22
|
+
Cities["Uppsala"] = "Uppsala";
|
|
23
|
+
Cities["Stockholm"] = "Stockholm";
|
|
24
|
+
Cities["Vasteras"] = "Vasteras";
|
|
25
|
+
Cities["Drebro"] = "Drebro";
|
|
26
|
+
Cities["Sundsvall"] = "Sundsvall";
|
|
27
|
+
Cities["Lulea"] = "Lulea";
|
|
28
|
+
Cities["Ostersund"] = "Ostersund";
|
|
29
|
+
Cities["Tallinn"] = "Tallinn";
|
|
30
|
+
Cities["Tartu"] = "Tartu";
|
|
31
|
+
Cities["Daugavpils"] = "Daugavpils";
|
|
32
|
+
Cities["Vilnius"] = "Vilnius";
|
|
33
|
+
Cities["Kaunas"] = "Kaunas";
|
|
34
|
+
Cities["Rica"] = "Rica";
|
|
35
|
+
Cities["Klaipeda"] = "Klaipeda";
|
|
36
|
+
Cities["Karlstad"] = "Karlstad";
|
|
37
|
+
Cities["Linkopinc"] = "Linkopinc";
|
|
38
|
+
Cities["Jonkoping"] = "Jonkoping";
|
|
39
|
+
Cities["Visby"] = "Visby";
|
|
40
|
+
Cities["Kristianstad"] = "Kristianstad";
|
|
41
|
+
Cities["Malmo"] = "Malmo";
|
|
42
|
+
Cities["Goteborg"] = "Goteborg";
|
|
43
|
+
Cities["Aalborg"] = "Aalborg";
|
|
44
|
+
Cities["Aarhus"] = "Aarhus";
|
|
45
|
+
Cities["Kobenhavn"] = "Kobenhavn";
|
|
46
|
+
Cities["Nykobingfalster"] = "Nykobing Falster";
|
|
47
|
+
Cities["Ringkobing"] = "Ringkobing";
|
|
48
|
+
Cities["Esbjerg"] = "Esbjerg";
|
|
49
|
+
Cities["Odense"] = "Odense";
|
|
50
|
+
Cities["Tromso"] = "Tromso";
|
|
51
|
+
Cities["Bood"] = "Bood";
|
|
52
|
+
Cities["Trondheim"] = "Trondheim";
|
|
53
|
+
Cities["Oslo"] = "Oslo";
|
|
54
|
+
Cities["Arendal"] = "Arendal";
|
|
55
|
+
Cities["Bergen"] = "Bergen";
|
|
56
|
+
Cities["Stavanger"] = "Stavanger";
|
|
57
|
+
})(Cities = exports.Cities || (exports.Cities = {}));
|
|
58
|
+
exports.map = {
|
|
59
|
+
name: 'Northern Europe',
|
|
60
|
+
cities: [
|
|
61
|
+
{ name: Cities.Oulu, region: Regions.Brown, x: 514, y: 376 },
|
|
62
|
+
{ name: Cities.Kuopid, region: Regions.Brown, x: 551, y: 474 },
|
|
63
|
+
{ name: Cities.Tampere, region: Regions.Brown, x: 484, y: 544 },
|
|
64
|
+
{ name: Cities.Helsinki, region: Regions.Brown, x: 513, y: 602 },
|
|
65
|
+
{ name: Cities.Espoo, region: Regions.Brown, x: 457, y: 603 },
|
|
66
|
+
{ name: Cities.Pori, region: Regions.Brown, x: 417, y: 540 },
|
|
67
|
+
{ name: Cities.Turku, region: Regions.Brown, x: 416, y: 579 },
|
|
68
|
+
{ name: Cities.Uppsala, region: Regions.Yellow, x: 365, y: 612 },
|
|
69
|
+
{ name: Cities.Stockholm, region: Regions.Yellow, x: 360, y: 642 },
|
|
70
|
+
{ name: Cities.Vasteras, region: Regions.Yellow, x: 308, y: 611 },
|
|
71
|
+
{ name: Cities.Drebro, region: Regions.Yellow, x: 304, y: 641 },
|
|
72
|
+
{ name: Cities.Sundsvall, region: Regions.Yellow, x: 332, y: 506 },
|
|
73
|
+
{ name: Cities.Lulea, region: Regions.Yellow, x: 423, y: 345 },
|
|
74
|
+
{ name: Cities.Ostersund, region: Regions.Yellow, x: 272, y: 462 },
|
|
75
|
+
{ name: Cities.Tallinn, region: Regions.Pink, x: 487, y: 642 },
|
|
76
|
+
{ name: Cities.Tartu, region: Regions.Pink, x: 544, y: 689 },
|
|
77
|
+
{ name: Cities.Daugavpils, region: Regions.Pink, x: 547, y: 771 },
|
|
78
|
+
{ name: Cities.Vilnius, region: Regions.Pink, x: 520, y: 819 },
|
|
79
|
+
{ name: Cities.Kaunas, region: Regions.Pink, x: 458, y: 811 },
|
|
80
|
+
{ name: Cities.Rica, region: Regions.Pink, x: 472, y: 734 },
|
|
81
|
+
{ name: Cities.Klaipeda, region: Regions.Pink, x: 411, y: 784 },
|
|
82
|
+
{ name: Cities.Karlstad, region: Regions.Purple, x: 246, y: 629 },
|
|
83
|
+
{ name: Cities.Linkopinc, region: Regions.Purple, x: 309, y: 676 },
|
|
84
|
+
{ name: Cities.Jonkoping, region: Regions.Purple, x: 285, y: 712 },
|
|
85
|
+
{ name: Cities.Visby, region: Regions.Purple, x: 364, y: 717 },
|
|
86
|
+
{ name: Cities.Kristianstad, region: Regions.Purple, x: 330, y: 750 },
|
|
87
|
+
{ name: Cities.Malmo, region: Regions.Purple, x: 268, y: 778 },
|
|
88
|
+
{ name: Cities.Goteborg, region: Regions.Purple, x: 231, y: 700 },
|
|
89
|
+
{ name: Cities.Aalborg, region: Regions.Orange, x: 188, y: 726 },
|
|
90
|
+
{ name: Cities.Aarhus, region: Regions.Orange, x: 191, y: 761 },
|
|
91
|
+
{ name: Cities.Kobenhavn, region: Regions.Orange, x: 216, y: 787 },
|
|
92
|
+
{ name: Cities.Nykobingfalster, region: Regions.Orange, x: 224, y: 815 },
|
|
93
|
+
{ name: Cities.Ringkobing, region: Regions.Orange, x: 133, y: 742 },
|
|
94
|
+
{ name: Cities.Esbjerg, region: Regions.Orange, x: 128, y: 769 },
|
|
95
|
+
{ name: Cities.Odense, region: Regions.Orange, x: 162, y: 797 },
|
|
96
|
+
{ name: Cities.Tromso, region: Regions.Red, x: 371, y: 122 },
|
|
97
|
+
{ name: Cities.Bood, region: Regions.Red, x: 276, y: 254 },
|
|
98
|
+
{ name: Cities.Trondheim, region: Regions.Red, x: 173, y: 450 },
|
|
99
|
+
{ name: Cities.Oslo, region: Regions.Red, x: 176, y: 606 },
|
|
100
|
+
{ name: Cities.Arendal, region: Regions.Red, x: 145, y: 651 },
|
|
101
|
+
{ name: Cities.Bergen, region: Regions.Red, x: 68, y: 586 },
|
|
102
|
+
{ name: Cities.Stavanger, region: Regions.Red, x: 72, y: 647 },
|
|
103
|
+
],
|
|
104
|
+
connections: [
|
|
105
|
+
{ nodes: [Cities.Bood, Cities.Tromso], cost: 17 },
|
|
106
|
+
{ nodes: [Cities.Tromso, Cities.Oulu], cost: 25 },
|
|
107
|
+
{ nodes: [Cities.Oulu, Cities.Kuopid], cost: 10 },
|
|
108
|
+
{ nodes: [Cities.Lulea, Cities.Tromso], cost: 19 },
|
|
109
|
+
{ nodes: [Cities.Lulea, Cities.Oulu], cost: 13 },
|
|
110
|
+
{ nodes: [Cities.Oulu, Cities.Pori], cost: 15 },
|
|
111
|
+
{ nodes: [Cities.Oulu, Cities.Tampere], cost: 14 },
|
|
112
|
+
{ nodes: [Cities.Sundsvall, Cities.Lulea], cost: 16 },
|
|
113
|
+
{ nodes: [Cities.Lulea, Cities.Bood], cost: 16 },
|
|
114
|
+
{ nodes: [Cities.Bood, Cities.Ostersund], cost: 18 },
|
|
115
|
+
{ nodes: [Cities.Ostersund, Cities.Lulea], cost: 17 },
|
|
116
|
+
{ nodes: [Cities.Lulea, Cities.Pori], cost: 22 },
|
|
117
|
+
{ nodes: [Cities.Pori, Cities.Sundsvall], cost: 17 },
|
|
118
|
+
{ nodes: [Cities.Bood, Cities.Trondheim], cost: 21 },
|
|
119
|
+
{ nodes: [Cities.Trondheim, Cities.Bergen], cost: 17 },
|
|
120
|
+
{ nodes: [Cities.Trondheim, Cities.Oslo], cost: 17 },
|
|
121
|
+
{ nodes: [Cities.Oslo, Cities.Ostersund], cost: 18 },
|
|
122
|
+
{ nodes: [Cities.Ostersund, Cities.Karlstad], cost: 16 },
|
|
123
|
+
{ nodes: [Cities.Bergen, Cities.Oslo], cost: 15 },
|
|
124
|
+
{ nodes: [Cities.Oslo, Cities.Stavanger], cost: 11 },
|
|
125
|
+
{ nodes: [Cities.Stavanger, Cities.Arendal], cost: 8 },
|
|
126
|
+
{ nodes: [Cities.Arendal, Cities.Oslo], cost: 7 },
|
|
127
|
+
{ nodes: [Cities.Bergen, Cities.Stavanger], cost: 9 },
|
|
128
|
+
{ nodes: [Cities.Arendal, Cities.Ringkobing], cost: 19 },
|
|
129
|
+
{ nodes: [Cities.Ringkobing, Cities.Esbjerg], cost: 4 },
|
|
130
|
+
{ nodes: [Cities.Esbjerg, Cities.Odense], cost: 5 },
|
|
131
|
+
{ nodes: [Cities.Odense, Cities.Nykobingfalster], cost: 8 },
|
|
132
|
+
{ nodes: [Cities.Arendal, Cities.Aalborg], cost: 16 },
|
|
133
|
+
{ nodes: [Cities.Arendal, Cities.Goteborg], cost: 19 },
|
|
134
|
+
{ nodes: [Cities.Goteborg, Cities.Oslo], cost: 11 },
|
|
135
|
+
{ nodes: [Cities.Oslo, Cities.Karlstad], cost: 7 },
|
|
136
|
+
{ nodes: [Cities.Karlstad, Cities.Goteborg], cost: 9 },
|
|
137
|
+
{ nodes: [Cities.Karlstad, Cities.Jonkoping], cost: 9 },
|
|
138
|
+
{ nodes: [Cities.Karlstad, Cities.Linkopinc], cost: 7 },
|
|
139
|
+
{ nodes: [Cities.Tampere, Cities.Kuopid], cost: 10 },
|
|
140
|
+
{ nodes: [Cities.Tampere, Cities.Pori], cost: 4 },
|
|
141
|
+
{ nodes: [Cities.Tampere, Cities.Turku], cost: 5 },
|
|
142
|
+
{ nodes: [Cities.Tampere, Cities.Espoo], cost: 5 },
|
|
143
|
+
{ nodes: [Cities.Tampere, Cities.Helsinki], cost: 6 },
|
|
144
|
+
{ nodes: [Cities.Helsinki, Cities.Espoo], cost: 2 },
|
|
145
|
+
{ nodes: [Cities.Espoo, Cities.Tallinn], cost: 7 },
|
|
146
|
+
{ nodes: [Cities.Tallinn, Cities.Helsinki], cost: 7 },
|
|
147
|
+
{ nodes: [Cities.Visby, Cities.Kristianstad], cost: 13 },
|
|
148
|
+
{ nodes: [Cities.Visby, Cities.Klaipeda], cost: 19 },
|
|
149
|
+
{ nodes: [Cities.Visby, Cities.Rica], cost: 20 },
|
|
150
|
+
{ nodes: [Cities.Rica, Cities.Tallinn], cost: 11 },
|
|
151
|
+
{ nodes: [Cities.Tallinn, Cities.Tartu], cost: 5 },
|
|
152
|
+
{ nodes: [Cities.Tartu, Cities.Daugavpils], cost: 9 },
|
|
153
|
+
{ nodes: [Cities.Rica, Cities.Tartu], cost: 7 },
|
|
154
|
+
{ nodes: [Cities.Daugavpils, Cities.Kaunas], cost: 7 },
|
|
155
|
+
{ nodes: [Cities.Kaunas, Cities.Vilnius], cost: 3 },
|
|
156
|
+
{ nodes: [Cities.Kaunas, Cities.Klaipeda], cost: 7 },
|
|
157
|
+
{ nodes: [Cities.Klaipeda, Cities.Rica], cost: 8 },
|
|
158
|
+
{ nodes: [Cities.Rica, Cities.Kaunas], cost: 8 },
|
|
159
|
+
{ nodes: [Cities.Rica, Cities.Daugavpils], cost: 7 },
|
|
160
|
+
{ nodes: [Cities.Daugavpils, Cities.Vilnius], cost: 5 },
|
|
161
|
+
{ nodes: [Cities.Vasteras, Cities.Sundsvall], cost: 10 },
|
|
162
|
+
{ nodes: [Cities.Sundsvall, Cities.Ostersund], cost: 7 },
|
|
163
|
+
{ nodes: [Cities.Uppsala, Cities.Stockholm], cost: 2 },
|
|
164
|
+
{ nodes: [Cities.Uppsala, Cities.Turku], cost: 15 },
|
|
165
|
+
{ nodes: [Cities.Uppsala, Cities.Pori], cost: 17 },
|
|
166
|
+
{ nodes: [Cities.Uppsala, Cities.Sundsvall], cost: 11 },
|
|
167
|
+
{ nodes: [Cities.Vasteras, Cities.Drebro], cost: 5 },
|
|
168
|
+
{ nodes: [Cities.Drebro, Cities.Linkopinc], cost: 3 },
|
|
169
|
+
{ nodes: [Cities.Linkopinc, Cities.Stockholm], cost: 7 },
|
|
170
|
+
{ nodes: [Cities.Visby, Cities.Stockholm], cost: 12 },
|
|
171
|
+
{ nodes: [Cities.Visby, Cities.Linkopinc], cost: 9 },
|
|
172
|
+
{ nodes: [Cities.Jonkoping, Cities.Malmo], cost: 10 },
|
|
173
|
+
{ nodes: [Cities.Jonkoping, Cities.Kristianstad], cost: 8 },
|
|
174
|
+
{ nodes: [Cities.Kristianstad, Cities.Malmo], cost: 3 },
|
|
175
|
+
{ nodes: [Cities.Malmo, Cities.Kobenhavn], cost: 3 },
|
|
176
|
+
{ nodes: [Cities.Kobenhavn, Cities.Nykobingfalster], cost: 6 },
|
|
177
|
+
{ nodes: [Cities.Odense, Cities.Aarhus], cost: 7 },
|
|
178
|
+
{ nodes: [Cities.Aarhus, Cities.Aalborg], cost: 3 },
|
|
179
|
+
{ nodes: [Cities.Aalborg, Cities.Goteborg], cost: 11 },
|
|
180
|
+
{ nodes: [Cities.Kobenhavn, Cities.Goteborg], cost: 18 },
|
|
181
|
+
{ nodes: [Cities.Goteborg, Cities.Jonkoping], cost: 4 },
|
|
182
|
+
{ nodes: [Cities.Trondheim, Cities.Ostersund], cost: 9 },
|
|
183
|
+
{ nodes: [Cities.Vasteras, Cities.Stockholm], cost: 4 },
|
|
184
|
+
{ nodes: [Cities.Esbjerg, Cities.Aarhus], cost: 5 },
|
|
185
|
+
{ nodes: [Cities.Jonkoping, Cities.Linkopinc], cost: 5 },
|
|
186
|
+
{ nodes: [Cities.Kobenhavn, Cities.Jonkoping], cost: 12 },
|
|
187
|
+
{ nodes: [Cities.Karlstad, Cities.Drebro], cost: 4 },
|
|
188
|
+
{ nodes: [Cities.Vasteras, Cities.Uppsala], cost: 2 },
|
|
189
|
+
{ nodes: [Cities.Odense, Cities.Kobenhavn], cost: 7 },
|
|
190
|
+
{ nodes: [Cities.Kobenhavn, Cities.Aarhus], cost: 10 },
|
|
191
|
+
{ nodes: [Cities.Ringkobing, Cities.Aalborg], cost: 5 },
|
|
192
|
+
{ nodes: [Cities.Linkopinc, Cities.Kristianstad], cost: 9 },
|
|
193
|
+
{ nodes: [Cities.Drebro, Cities.Stockholm], cost: 7 },
|
|
194
|
+
{ nodes: [Cities.Espoo, Cities.Turku], cost: 4 },
|
|
195
|
+
{ nodes: [Cities.Pori, Cities.Turku], cost: 4 },
|
|
196
|
+
],
|
|
197
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { GameMap } from './../maps';
|
|
2
|
+
export declare enum Regions {
|
|
3
|
+
Green = "green",
|
|
4
|
+
Brown = "brown",
|
|
5
|
+
Pink = "pink",
|
|
6
|
+
Red = "red",
|
|
7
|
+
Yellow = "yellow",
|
|
8
|
+
Purple = "purple"
|
|
9
|
+
}
|
|
10
|
+
export declare enum Cities {
|
|
11
|
+
Septiles = "Sept-Iles",
|
|
12
|
+
Portcartier = "Port-Cartier",
|
|
13
|
+
Baiecomeau = "Baie-Comeau",
|
|
14
|
+
Chicoutimi = "Chicoutimi",
|
|
15
|
+
Alma = "Alma",
|
|
16
|
+
Roberval = "Roberval",
|
|
17
|
+
Jonquiere = "Jonquiere",
|
|
18
|
+
Gaspe = "Gaspe",
|
|
19
|
+
Steannedesmonts = "Ste-Anne-Des-Monts",
|
|
20
|
+
Matane = "Matane",
|
|
21
|
+
Rimouski = "Rimouski",
|
|
22
|
+
Pointealacroix = "Pointe-A-La-Croix",
|
|
23
|
+
Riviereduloup = "Riviere-Du-Loup",
|
|
24
|
+
Montmagny = "Montmagny",
|
|
25
|
+
Stgeorges = "St-Georges",
|
|
26
|
+
Sherbrooke = "Sherbrooke",
|
|
27
|
+
Victoriaville = "Victoriaville",
|
|
28
|
+
Stsimeon = "St-Simeon",
|
|
29
|
+
Charlesbourg = "Charlesbourg",
|
|
30
|
+
Quebec = "Quebec",
|
|
31
|
+
Beauport = "Beauport",
|
|
32
|
+
Granby = "Granby",
|
|
33
|
+
Sthyacinthe = "St-Hyacinthe",
|
|
34
|
+
Brossard = "Brossard",
|
|
35
|
+
Valleyfield = "Valleyfield",
|
|
36
|
+
Vaudreuildorion = "Vaudreuil-Dorion",
|
|
37
|
+
Montreal = "Montreal",
|
|
38
|
+
Pointeclaire = "Pointe-Claire",
|
|
39
|
+
Shawinigan = "Shawinigan",
|
|
40
|
+
Troisrivieres = "Trois-Rivieres",
|
|
41
|
+
Drummondville = "Drummond-Ville",
|
|
42
|
+
Repentigny = "Repentigny",
|
|
43
|
+
Longueuil = "Longueuil",
|
|
44
|
+
Laval = "Laval",
|
|
45
|
+
Lachute = "Lachute",
|
|
46
|
+
Amos = "Amos",
|
|
47
|
+
Valdor = "Val-Dor",
|
|
48
|
+
Rouynnoranda = "Rouyn-Noranda",
|
|
49
|
+
Montlaurier = "Mont-Laurier",
|
|
50
|
+
Maniwaki = "Maniwaki",
|
|
51
|
+
Gatineau = "Gatineau",
|
|
52
|
+
Hull = "Hull"
|
|
53
|
+
}
|
|
54
|
+
export declare const map: GameMap;
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.map = exports.Cities = exports.Regions = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const engine_1 = require("../engine");
|
|
6
|
+
const gamestate_1 = require("../gamestate");
|
|
7
|
+
const powerPlants_1 = require("../powerPlants");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
var Regions;
|
|
10
|
+
(function (Regions) {
|
|
11
|
+
Regions["Green"] = "green";
|
|
12
|
+
Regions["Brown"] = "brown";
|
|
13
|
+
Regions["Pink"] = "pink";
|
|
14
|
+
Regions["Red"] = "red";
|
|
15
|
+
Regions["Yellow"] = "yellow";
|
|
16
|
+
Regions["Purple"] = "purple";
|
|
17
|
+
})(Regions = exports.Regions || (exports.Regions = {}));
|
|
18
|
+
var Cities;
|
|
19
|
+
(function (Cities) {
|
|
20
|
+
Cities["Septiles"] = "Sept-Iles";
|
|
21
|
+
Cities["Portcartier"] = "Port-Cartier";
|
|
22
|
+
Cities["Baiecomeau"] = "Baie-Comeau";
|
|
23
|
+
Cities["Chicoutimi"] = "Chicoutimi";
|
|
24
|
+
Cities["Alma"] = "Alma";
|
|
25
|
+
Cities["Roberval"] = "Roberval";
|
|
26
|
+
Cities["Jonquiere"] = "Jonquiere";
|
|
27
|
+
Cities["Gaspe"] = "Gaspe";
|
|
28
|
+
Cities["Steannedesmonts"] = "Ste-Anne-Des-Monts";
|
|
29
|
+
Cities["Matane"] = "Matane";
|
|
30
|
+
Cities["Rimouski"] = "Rimouski";
|
|
31
|
+
Cities["Pointealacroix"] = "Pointe-A-La-Croix";
|
|
32
|
+
Cities["Riviereduloup"] = "Riviere-Du-Loup";
|
|
33
|
+
Cities["Montmagny"] = "Montmagny";
|
|
34
|
+
Cities["Stgeorges"] = "St-Georges";
|
|
35
|
+
Cities["Sherbrooke"] = "Sherbrooke";
|
|
36
|
+
Cities["Victoriaville"] = "Victoriaville";
|
|
37
|
+
Cities["Stsimeon"] = "St-Simeon";
|
|
38
|
+
Cities["Charlesbourg"] = "Charlesbourg";
|
|
39
|
+
Cities["Quebec"] = "Quebec";
|
|
40
|
+
Cities["Beauport"] = "Beauport";
|
|
41
|
+
Cities["Granby"] = "Granby";
|
|
42
|
+
Cities["Sthyacinthe"] = "St-Hyacinthe";
|
|
43
|
+
Cities["Brossard"] = "Brossard";
|
|
44
|
+
Cities["Valleyfield"] = "Valleyfield";
|
|
45
|
+
Cities["Vaudreuildorion"] = "Vaudreuil-Dorion";
|
|
46
|
+
Cities["Montreal"] = "Montreal";
|
|
47
|
+
Cities["Pointeclaire"] = "Pointe-Claire";
|
|
48
|
+
Cities["Shawinigan"] = "Shawinigan";
|
|
49
|
+
Cities["Troisrivieres"] = "Trois-Rivieres";
|
|
50
|
+
Cities["Drummondville"] = "Drummond-Ville";
|
|
51
|
+
Cities["Repentigny"] = "Repentigny";
|
|
52
|
+
Cities["Longueuil"] = "Longueuil";
|
|
53
|
+
Cities["Laval"] = "Laval";
|
|
54
|
+
Cities["Lachute"] = "Lachute";
|
|
55
|
+
Cities["Amos"] = "Amos";
|
|
56
|
+
Cities["Valdor"] = "Val-Dor";
|
|
57
|
+
Cities["Rouynnoranda"] = "Rouyn-Noranda";
|
|
58
|
+
Cities["Montlaurier"] = "Mont-Laurier";
|
|
59
|
+
Cities["Maniwaki"] = "Maniwaki";
|
|
60
|
+
Cities["Gatineau"] = "Gatineau";
|
|
61
|
+
Cities["Hull"] = "Hull";
|
|
62
|
+
})(Cities = exports.Cities || (exports.Cities = {}));
|
|
63
|
+
exports.map = {
|
|
64
|
+
name: 'Quebec',
|
|
65
|
+
cities: [
|
|
66
|
+
{ name: Cities.Septiles, region: Regions.Green, x: 3524, y: 228 },
|
|
67
|
+
{ name: Cities.Portcartier, region: Regions.Green, x: 3328, y: 370 },
|
|
68
|
+
{ name: Cities.Baiecomeau, region: Regions.Green, x: 3066, y: 630 },
|
|
69
|
+
{ name: Cities.Chicoutimi, region: Regions.Green, x: 2392, y: 898 },
|
|
70
|
+
{ name: Cities.Alma, region: Regions.Green, x: 2172, y: 844 },
|
|
71
|
+
{ name: Cities.Roberval, region: Regions.Green, x: 1944, y: 950 },
|
|
72
|
+
{ name: Cities.Jonquiere, region: Regions.Green, x: 2240, y: 1052 },
|
|
73
|
+
{ name: Cities.Gaspe, region: Regions.Brown, x: 4014, y: 808 },
|
|
74
|
+
{ name: Cities.Steannedesmonts, region: Regions.Brown, x: 3512, y: 708 },
|
|
75
|
+
{ name: Cities.Matane, region: Regions.Brown, x: 3244, y: 808 },
|
|
76
|
+
{ name: Cities.Rimouski, region: Regions.Brown, x: 2990, y: 946 },
|
|
77
|
+
{ name: Cities.Pointealacroix, region: Regions.Brown, x: 3492, y: 1094 },
|
|
78
|
+
{ name: Cities.Riviereduloup, region: Regions.Brown, x: 2780, y: 1208 },
|
|
79
|
+
{ name: Cities.Montmagny, region: Regions.Brown, x: 2522, y: 1534 },
|
|
80
|
+
{ name: Cities.Stgeorges, region: Regions.Pink, x: 2506, y: 1836 },
|
|
81
|
+
{ name: Cities.Sherbrooke, region: Regions.Pink, x: 2242, y: 2128 },
|
|
82
|
+
{ name: Cities.Victoriaville, region: Regions.Pink, x: 2178, y: 1822 },
|
|
83
|
+
{ name: Cities.Stsimeon, region: Regions.Pink, x: 2576, y: 1146 },
|
|
84
|
+
{ name: Cities.Charlesbourg, region: Regions.Pink, x: 2246, y: 1434 },
|
|
85
|
+
{ name: Cities.Quebec, region: Regions.Pink, x: 2302, y: 1536 },
|
|
86
|
+
{ name: Cities.Beauport, region: Regions.Pink, x: 2196, y: 1524 },
|
|
87
|
+
{ name: Cities.Granby, region: Regions.Red, x: 1974, y: 2160 },
|
|
88
|
+
{ name: Cities.Sthyacinthe, region: Regions.Red, x: 1796, y: 2038 },
|
|
89
|
+
{ name: Cities.Brossard, region: Regions.Red, x: 1790, y: 2296 },
|
|
90
|
+
{ name: Cities.Valleyfield, region: Regions.Red, x: 1576, y: 2306 },
|
|
91
|
+
{ name: Cities.Vaudreuildorion, region: Regions.Red, x: 1414, y: 2186 },
|
|
92
|
+
{ name: Cities.Montreal, region: Regions.Red, x: 1624, y: 2052 },
|
|
93
|
+
{ name: Cities.Pointeclaire, region: Regions.Red, x: 1510, y: 2060 },
|
|
94
|
+
{ name: Cities.Shawinigan, region: Regions.Yellow, x: 1864, y: 1448 },
|
|
95
|
+
{ name: Cities.Troisrivieres, region: Regions.Yellow, x: 1918, y: 1650 },
|
|
96
|
+
{ name: Cities.Drummondville, region: Regions.Yellow, x: 1984, y: 1886 },
|
|
97
|
+
{ name: Cities.Repentigny, region: Regions.Yellow, x: 1696, y: 1820 },
|
|
98
|
+
{ name: Cities.Longueuil, region: Regions.Yellow, x: 1598, y: 1964 },
|
|
99
|
+
{ name: Cities.Laval, region: Regions.Yellow, x: 1512, y: 1990 },
|
|
100
|
+
{ name: Cities.Lachute, region: Regions.Yellow, x: 1364, y: 1944 },
|
|
101
|
+
{ name: Cities.Amos, region: Regions.Purple, x: 492, y: 868 },
|
|
102
|
+
{ name: Cities.Valdor, region: Regions.Purple, x: 570, y: 1098 },
|
|
103
|
+
{ name: Cities.Rouynnoranda, region: Regions.Purple, x: 236, y: 1028 },
|
|
104
|
+
{ name: Cities.Montlaurier, region: Regions.Purple, x: 1180, y: 1630 },
|
|
105
|
+
{ name: Cities.Maniwaki, region: Regions.Purple, x: 964, y: 1760 },
|
|
106
|
+
{ name: Cities.Gatineau, region: Regions.Purple, x: 1076, y: 2096 },
|
|
107
|
+
{ name: Cities.Hull, region: Regions.Purple, x: 862, y: 2104 },
|
|
108
|
+
],
|
|
109
|
+
connections: [
|
|
110
|
+
{ nodes: [Cities.Maniwaki, Cities.Montlaurier], cost: 5 },
|
|
111
|
+
{ nodes: [Cities.Maniwaki, Cities.Valdor], cost: 24 },
|
|
112
|
+
{ nodes: [Cities.Valdor, Cities.Amos], cost: 8 },
|
|
113
|
+
{ nodes: [Cities.Amos, Cities.Rouynnoranda], cost: 9 },
|
|
114
|
+
{ nodes: [Cities.Rouynnoranda, Cities.Valdor], cost: 12 },
|
|
115
|
+
{ nodes: [Cities.Hull, Cities.Maniwaki], cost: 15 },
|
|
116
|
+
{ nodes: [Cities.Hull, Cities.Gatineau], cost: 0 },
|
|
117
|
+
{ nodes: [Cities.Gatineau, Cities.Montlaurier], cost: 16 },
|
|
118
|
+
{ nodes: [Cities.Montlaurier, Cities.Lachute], cost: 18 },
|
|
119
|
+
{ nodes: [Cities.Shawinigan, Cities.Troisrivieres], cost: 3 },
|
|
120
|
+
{ nodes: [Cities.Troisrivieres, Cities.Drummondville], cost: 9 },
|
|
121
|
+
{ nodes: [Cities.Drummondville, Cities.Victoriaville], cost: 6 },
|
|
122
|
+
{ nodes: [Cities.Victoriaville, Cities.Stgeorges], cost: 10 },
|
|
123
|
+
{ nodes: [Cities.Stgeorges, Cities.Sherbrooke], cost: 15 },
|
|
124
|
+
{ nodes: [Cities.Sherbrooke, Cities.Granby], cost: 8 },
|
|
125
|
+
{ nodes: [Cities.Granby, Cities.Sthyacinthe], cost: 4 },
|
|
126
|
+
{ nodes: [Cities.Sthyacinthe, Cities.Drummondville], cost: 6 },
|
|
127
|
+
{ nodes: [Cities.Troisrivieres, Cities.Victoriaville], cost: 9 },
|
|
128
|
+
{ nodes: [Cities.Victoriaville, Cities.Sherbrooke], cost: 9 },
|
|
129
|
+
{ nodes: [Cities.Sherbrooke, Cities.Drummondville], cost: 9 },
|
|
130
|
+
{ nodes: [Cities.Sthyacinthe, Cities.Repentigny], cost: 7 },
|
|
131
|
+
{ nodes: [Cities.Sthyacinthe, Cities.Brossard], cost: 5 },
|
|
132
|
+
{ nodes: [Cities.Brossard, Cities.Valleyfield], cost: 8 },
|
|
133
|
+
{ nodes: [Cities.Valleyfield, Cities.Vaudreuildorion], cost: 4 },
|
|
134
|
+
{ nodes: [Cities.Gatineau, Cities.Lachute], cost: 14 },
|
|
135
|
+
{ nodes: [Cities.Montlaurier, Cities.Shawinigan], cost: 28 },
|
|
136
|
+
{ nodes: [Cities.Shawinigan, Cities.Beauport], cost: 14 },
|
|
137
|
+
{ nodes: [Cities.Beauport, Cities.Troisrivieres], cost: 15 },
|
|
138
|
+
{ nodes: [Cities.Troisrivieres, Cities.Repentigny], cost: 13 },
|
|
139
|
+
{ nodes: [Cities.Repentigny, Cities.Longueuil], cost: 3 },
|
|
140
|
+
{ nodes: [Cities.Laval, Cities.Lachute], cost: 6 },
|
|
141
|
+
{ nodes: [Cities.Vaudreuildorion, Cities.Pointeclaire], cost: 3 },
|
|
142
|
+
{ nodes: [Cities.Montreal, Cities.Brossard], cost: 4 },
|
|
143
|
+
{ nodes: [Cities.Laval, Cities.Longueuil], cost: 0 },
|
|
144
|
+
{ nodes: [Cities.Pointeclaire, Cities.Montreal], cost: 0 },
|
|
145
|
+
{ nodes: [Cities.Montreal, Cities.Longueuil], cost: 0 },
|
|
146
|
+
{ nodes: [Cities.Pointeclaire, Cities.Laval], cost: 0 },
|
|
147
|
+
{ nodes: [Cities.Beauport, Cities.Charlesbourg], cost: 0 },
|
|
148
|
+
{ nodes: [Cities.Charlesbourg, Cities.Quebec], cost: 0 },
|
|
149
|
+
{ nodes: [Cities.Quebec, Cities.Beauport], cost: 0 },
|
|
150
|
+
{ nodes: [Cities.Victoriaville, Cities.Beauport], cost: 12 },
|
|
151
|
+
{ nodes: [Cities.Quebec, Cities.Stgeorges], cost: 12 },
|
|
152
|
+
{ nodes: [Cities.Stgeorges, Cities.Montmagny], cost: 12 },
|
|
153
|
+
{ nodes: [Cities.Montmagny, Cities.Riviereduloup], cost: 16 },
|
|
154
|
+
{ nodes: [Cities.Jonquiere, Cities.Charlesbourg], cost: 21 },
|
|
155
|
+
{ nodes: [Cities.Montmagny, Cities.Quebec], cost: 5 },
|
|
156
|
+
{ nodes: [Cities.Stsimeon, Cities.Charlesbourg], cost: 18 },
|
|
157
|
+
{ nodes: [Cities.Drummondville, Cities.Granby], cost: 4 },
|
|
158
|
+
{ nodes: [Cities.Roberval, Cities.Shawinigan], cost: 25 },
|
|
159
|
+
{ nodes: [Cities.Jonquiere, Cities.Stsimeon], cost: 16 },
|
|
160
|
+
{ nodes: [Cities.Roberval, Cities.Jonquiere], cost: 10 },
|
|
161
|
+
{ nodes: [Cities.Jonquiere, Cities.Alma], cost: 4 },
|
|
162
|
+
{ nodes: [Cities.Alma, Cities.Chicoutimi], cost: 4 },
|
|
163
|
+
{ nodes: [Cities.Jonquiere, Cities.Chicoutimi], cost: 0 },
|
|
164
|
+
{ nodes: [Cities.Chicoutimi, Cities.Baiecomeau], cost: 23 },
|
|
165
|
+
{ nodes: [Cities.Stsimeon, Cities.Baiecomeau], cost: 23 },
|
|
166
|
+
{ nodes: [Cities.Baiecomeau, Cities.Portcartier], cost: 16 },
|
|
167
|
+
{ nodes: [Cities.Septiles, Cities.Portcartier], cost: 6 },
|
|
168
|
+
{ nodes: [Cities.Riviereduloup, Cities.Rimouski], cost: 12 },
|
|
169
|
+
{ nodes: [Cities.Rimouski, Cities.Matane], cost: 11 },
|
|
170
|
+
{ nodes: [Cities.Matane, Cities.Pointealacroix], cost: 15 },
|
|
171
|
+
{ nodes: [Cities.Matane, Cities.Steannedesmonts], cost: 10 },
|
|
172
|
+
{ nodes: [Cities.Pointealacroix, Cities.Steannedesmonts], cost: 16 },
|
|
173
|
+
{ nodes: [Cities.Steannedesmonts, Cities.Gaspe], cost: 21 },
|
|
174
|
+
{ nodes: [Cities.Gaspe, Cities.Pointealacroix], cost: 25 },
|
|
175
|
+
],
|
|
176
|
+
layout: 'Portrait',
|
|
177
|
+
adjustRatio: [0.25, 0.35],
|
|
178
|
+
mapPosition: [-20, 75],
|
|
179
|
+
resupply: [
|
|
180
|
+
[
|
|
181
|
+
[3, 3, 3],
|
|
182
|
+
[4, 4, 3],
|
|
183
|
+
[5, 4, 4],
|
|
184
|
+
[5, 5, 5],
|
|
185
|
+
[7, 6, 6],
|
|
186
|
+
],
|
|
187
|
+
[
|
|
188
|
+
[2, 2, 3],
|
|
189
|
+
[2, 3, 3],
|
|
190
|
+
[3, 4, 4],
|
|
191
|
+
[4, 5, 4],
|
|
192
|
+
[5, 6, 5],
|
|
193
|
+
],
|
|
194
|
+
[
|
|
195
|
+
[1, 2, 3],
|
|
196
|
+
[1, 2, 3],
|
|
197
|
+
[2, 3, 4],
|
|
198
|
+
[3, 3, 5],
|
|
199
|
+
[3, 5, 6],
|
|
200
|
+
],
|
|
201
|
+
[
|
|
202
|
+
[1, 1, 1],
|
|
203
|
+
[1, 1, 1],
|
|
204
|
+
[1, 2, 2],
|
|
205
|
+
[2, 3, 2],
|
|
206
|
+
[2, 3, 3],
|
|
207
|
+
],
|
|
208
|
+
],
|
|
209
|
+
startingResources: [21, 21, 6, 2],
|
|
210
|
+
setupDeck(numPlayers, variant, rng) {
|
|
211
|
+
let powerPlantsDeck = lodash_1.cloneDeep(powerPlants_1.powerPlants);
|
|
212
|
+
let actualMarket;
|
|
213
|
+
let futureMarket;
|
|
214
|
+
if (variant == 'original') {
|
|
215
|
+
// No ecological plants will be discarded.
|
|
216
|
+
// 13, 18, 22 will be set aside and placed on top of the deck.
|
|
217
|
+
const setAsidePlants = powerPlantsDeck.filter((pp) => [13, 18, 22].includes(pp.number));
|
|
218
|
+
const otherEcoPlants = powerPlantsDeck.filter((pp) => (pp.type == gamestate_1.PowerPlantType.Wind || pp.type == gamestate_1.PowerPlantType.Nuclear) &&
|
|
219
|
+
![13, 18, 22].includes(pp.number));
|
|
220
|
+
const nonEcoPlantsDeck = powerPlantsDeck.filter((pp) => pp.type != gamestate_1.PowerPlantType.Wind && pp.type != gamestate_1.PowerPlantType.Nuclear);
|
|
221
|
+
// Remove first eight plants for actual and future market.
|
|
222
|
+
powerPlantsDeck = nonEcoPlantsDeck.slice(8);
|
|
223
|
+
actualMarket = [engine_1.getPowerPlant(3), engine_1.getPowerPlant(4), engine_1.getPowerPlant(5), engine_1.getPowerPlant(6)];
|
|
224
|
+
futureMarket = [engine_1.getPowerPlant(7), engine_1.getPowerPlant(8), engine_1.getPowerPlant(9), engine_1.getPowerPlant(10)];
|
|
225
|
+
// Set aside Step 3 card.
|
|
226
|
+
const step3 = powerPlantsDeck.pop();
|
|
227
|
+
// Remove random plants - this does not include any ecological plants.
|
|
228
|
+
powerPlantsDeck = utils_1.shuffle(powerPlantsDeck, rng() + '');
|
|
229
|
+
if (numPlayers == 2 || numPlayers == 3) {
|
|
230
|
+
powerPlantsDeck = powerPlantsDeck.slice(8);
|
|
231
|
+
}
|
|
232
|
+
else if (numPlayers == 4) {
|
|
233
|
+
powerPlantsDeck = powerPlantsDeck.slice(4);
|
|
234
|
+
}
|
|
235
|
+
// Put back ecological plants and shuffle again.
|
|
236
|
+
powerPlantsDeck = powerPlantsDeck.concat(otherEcoPlants);
|
|
237
|
+
powerPlantsDeck = utils_1.shuffle(powerPlantsDeck, rng() + '');
|
|
238
|
+
// Put 13, 18, 22 on top of deck.
|
|
239
|
+
powerPlantsDeck = setAsidePlants.concat(powerPlantsDeck);
|
|
240
|
+
// Put Step 3 card on the bottom.
|
|
241
|
+
powerPlantsDeck.push(step3);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
// No ecological plants will be discarded.
|
|
245
|
+
// For recharged 2 player, remove a random 1 from 3-15 and random 5 from 16-50.
|
|
246
|
+
// For recharged 3 player, remove a random 2 from 3-15 and random 6 from 16-50.
|
|
247
|
+
// For recharged 4 player, remove a random 1 from 3-15 and random 3 from 16-50.
|
|
248
|
+
// Once you have the deck, for recharged the starting 8 are a random 8 from 3-15 (including 13),
|
|
249
|
+
// then a random one from 3-15 on top, then 18, then 22, then the rest of the deck.
|
|
250
|
+
const step3 = powerPlantsDeck.pop();
|
|
251
|
+
const powerPlantsDeckLow = powerPlantsDeck.filter((pp) => pp.number >= 3 && pp.number <= 10);
|
|
252
|
+
const plant13 = powerPlantsDeck.filter((pp) => pp.number == 13);
|
|
253
|
+
const otherInitialEcoPlants = powerPlantsDeck.filter((pp) => pp.number == 18 || pp.number == 22);
|
|
254
|
+
const otherEcoPlants = powerPlantsDeck.filter((pp) => ![13, 18, 22].includes(pp.number) &&
|
|
255
|
+
(pp.type == gamestate_1.PowerPlantType.Wind || pp.type == gamestate_1.PowerPlantType.Nuclear));
|
|
256
|
+
let otherPlants1 = powerPlantsDeck.filter((pp) => pp.type != gamestate_1.PowerPlantType.Wind && pp.number >= 11 && pp.number <= 15);
|
|
257
|
+
let otherPlants2 = powerPlantsDeck.filter((pp) => pp.type != gamestate_1.PowerPlantType.Wind && pp.type != gamestate_1.PowerPlantType.Nuclear && pp.number >= 16);
|
|
258
|
+
if (numPlayers == 2) {
|
|
259
|
+
otherPlants1 = utils_1.shuffle(otherPlants1, rng() + '').slice(1);
|
|
260
|
+
otherPlants2 = utils_1.shuffle(otherPlants2, rng() + '').slice(5);
|
|
261
|
+
}
|
|
262
|
+
else if (numPlayers == 3) {
|
|
263
|
+
otherPlants1 = utils_1.shuffle(otherPlants1, rng() + '').slice(2);
|
|
264
|
+
otherPlants2 = utils_1.shuffle(otherPlants2, rng() + '').slice(6);
|
|
265
|
+
}
|
|
266
|
+
else if (numPlayers == 4) {
|
|
267
|
+
otherPlants1 = utils_1.shuffle(otherPlants1, rng() + '').slice(1);
|
|
268
|
+
otherPlants2 = utils_1.shuffle(otherPlants2, rng() + '').slice(3);
|
|
269
|
+
}
|
|
270
|
+
const initialPowerPlantOptions = utils_1.shuffle(powerPlantsDeckLow.concat(plant13).concat(otherPlants1), rng() + '');
|
|
271
|
+
let initialPlantMarket = initialPowerPlantOptions.splice(0, 8);
|
|
272
|
+
initialPlantMarket = initialPlantMarket.sort((a, b) => a.number - b.number);
|
|
273
|
+
actualMarket = initialPlantMarket.splice(0, 4);
|
|
274
|
+
futureMarket = initialPlantMarket;
|
|
275
|
+
const topOfDeck = initialPowerPlantOptions.splice(0, 1);
|
|
276
|
+
powerPlantsDeck = initialPowerPlantOptions.concat(otherEcoPlants).concat(otherPlants2);
|
|
277
|
+
powerPlantsDeck = utils_1.shuffle(powerPlantsDeck, rng() + '');
|
|
278
|
+
powerPlantsDeck = topOfDeck.concat(otherInitialEcoPlants).concat(powerPlantsDeck).concat([step3]);
|
|
279
|
+
}
|
|
280
|
+
return { actualMarket, futureMarket, powerPlantsDeck };
|
|
281
|
+
},
|
|
282
|
+
mapSpecificRules: 'Put power plants 13, 18, 22 on top of the deck. Ecological power plants will never be put on the bottom of the deck.',
|
|
283
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { GameMap } from './../maps';
|
|
2
|
+
export declare enum Regions {
|
|
3
|
+
Green = "green",
|
|
4
|
+
Pink = "pink",
|
|
5
|
+
Red = "red",
|
|
6
|
+
Yellow = "yellow",
|
|
7
|
+
Purple = "purple",
|
|
8
|
+
Brown = "brown"
|
|
9
|
+
}
|
|
10
|
+
export declare enum Cities {
|
|
11
|
+
Murmansk = "Murmansk",
|
|
12
|
+
Arkhangelsk = "Arkhangelsk",
|
|
13
|
+
Syktyvkar = "Syktyvkar",
|
|
14
|
+
Kirov = "Kirov",
|
|
15
|
+
Kazan = "Kazan",
|
|
16
|
+
Cheboksary = "Cheboksary",
|
|
17
|
+
Ulyanovsk = "Ulyanovsk",
|
|
18
|
+
Tula = "Tula",
|
|
19
|
+
Kaliningrad = "Kaliningrad",
|
|
20
|
+
Ryazan = "Ryazan",
|
|
21
|
+
Nizhnynovgorod = "Nizhny Novgorod",
|
|
22
|
+
Moscow = "Moscow",
|
|
23
|
+
Stpetersburg = "St Petersburg",
|
|
24
|
+
Yaroslavl = "Yaroslavl",
|
|
25
|
+
Chita = "Chita",
|
|
26
|
+
Bratsk = "Bratsk",
|
|
27
|
+
Krasnoyarsk = "Krasnoyarsk",
|
|
28
|
+
Kemerovd = "Kemerovd",
|
|
29
|
+
Novokuznetsk = "Novokuznetsk",
|
|
30
|
+
Irkutsk = "Irkutsk",
|
|
31
|
+
Ulanude = "Ulan Ude",
|
|
32
|
+
Norilsk = "Norilsk",
|
|
33
|
+
Surgut = "Surgut",
|
|
34
|
+
Tyumen = "Tyumen",
|
|
35
|
+
Tomsk = "Tomsk",
|
|
36
|
+
Novosibirsk = "Novosibirsk",
|
|
37
|
+
Barnaul = "Barnaul",
|
|
38
|
+
Omsk = "Omsk",
|
|
39
|
+
Chelyabinsk = "Chelyabinsk",
|
|
40
|
+
Ufa = "Ufa",
|
|
41
|
+
Perm = "Perm",
|
|
42
|
+
Yekaterinburg = "Yekaterinburg",
|
|
43
|
+
Orenburg = "Orenburg",
|
|
44
|
+
Naberezhnyechelny = "Naberezhnye Chelny",
|
|
45
|
+
Samara = "Samara",
|
|
46
|
+
Astrakhan = "Astrakhan",
|
|
47
|
+
Makhachkala = "Makhachkala",
|
|
48
|
+
Saratov = "Saratov",
|
|
49
|
+
Volgograd = "Volgograd",
|
|
50
|
+
Krasnodar = "Krasnodar",
|
|
51
|
+
Rostov = "Rostov",
|
|
52
|
+
Voronezh = "Voronezh"
|
|
53
|
+
}
|
|
54
|
+
export declare const map: GameMap;
|