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.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -0
  3. package/dist/index.d.ts +6 -0
  4. package/dist/index.js +17 -0
  5. package/dist/src/available-moves.d.ts +24 -0
  6. package/dist/src/available-moves.js +363 -0
  7. package/dist/src/engine.d.ts +20 -0
  8. package/dist/src/engine.js +1937 -0
  9. package/dist/src/gamestate.d.ts +135 -0
  10. package/dist/src/gamestate.js +30 -0
  11. package/dist/src/log.d.ts +14 -0
  12. package/dist/src/log.js +2 -0
  13. package/dist/src/maps/america.d.ts +55 -0
  14. package/dist/src/maps/america.js +411 -0
  15. package/dist/src/maps/australia.d.ts +46 -0
  16. package/dist/src/maps/australia.js +138 -0
  17. package/dist/src/maps/badenwurttemberg.d.ts +46 -0
  18. package/dist/src/maps/badenwurttemberg.js +163 -0
  19. package/dist/src/maps/benelux.d.ts +46 -0
  20. package/dist/src/maps/benelux.js +210 -0
  21. package/dist/src/maps/brazil.d.ts +54 -0
  22. package/dist/src/maps/brazil.js +292 -0
  23. package/dist/src/maps/centraleurope.d.ts +54 -0
  24. package/dist/src/maps/centraleurope.js +236 -0
  25. package/dist/src/maps/china.d.ts +54 -0
  26. package/dist/src/maps/china.js +262 -0
  27. package/dist/src/maps/france.d.ts +54 -0
  28. package/dist/src/maps/france.js +290 -0
  29. package/dist/src/maps/germany.d.ts +57 -0
  30. package/dist/src/maps/germany.js +328 -0
  31. package/dist/src/maps/indian.d.ts +54 -0
  32. package/dist/src/maps/indian.js +283 -0
  33. package/dist/src/maps/italy.d.ts +54 -0
  34. package/dist/src/maps/italy.js +190 -0
  35. package/dist/src/maps/japan.d.ts +46 -0
  36. package/dist/src/maps/japan.js +144 -0
  37. package/dist/src/maps/korea.d.ts +54 -0
  38. package/dist/src/maps/korea.js +186 -0
  39. package/dist/src/maps/middleeast.d.ts +54 -0
  40. package/dist/src/maps/middleeast.js +225 -0
  41. package/dist/src/maps/northerneurope.d.ts +54 -0
  42. package/dist/src/maps/northerneurope.js +197 -0
  43. package/dist/src/maps/quebec.d.ts +54 -0
  44. package/dist/src/maps/quebec.js +283 -0
  45. package/dist/src/maps/russia.d.ts +54 -0
  46. package/dist/src/maps/russia.js +286 -0
  47. package/dist/src/maps/southafrica.d.ts +46 -0
  48. package/dist/src/maps/southafrica.js +152 -0
  49. package/dist/src/maps/spainportugal.d.ts +54 -0
  50. package/dist/src/maps/spainportugal.js +289 -0
  51. package/dist/src/maps/ukireland.d.ts +52 -0
  52. package/dist/src/maps/ukireland.js +176 -0
  53. package/dist/src/maps.d.ts +50 -0
  54. package/dist/src/maps.js +61 -0
  55. package/dist/src/move.d.ts +63 -0
  56. package/dist/src/move.js +15 -0
  57. package/dist/src/powerPlants.d.ts +4 -0
  58. package/dist/src/powerPlants.js +60 -0
  59. package/dist/src/prices.d.ts +7 -0
  60. package/dist/src/prices.js +10 -0
  61. package/dist/src/randomizeMap.d.ts +3 -0
  62. package/dist/src/randomizeMap.js +244 -0
  63. package/dist/src/utils.d.ts +2 -0
  64. package/dist/src/utils.js +24 -0
  65. package/dist/wrapper.d.ts +30 -0
  66. package/dist/wrapper.js +127 -0
  67. package/index.ts +6 -0
  68. package/package.json +51 -0
  69. package/src/available-moves.ts +450 -0
  70. package/src/engine.spec.ts +163 -0
  71. package/src/engine.ts +2270 -0
  72. package/src/fixtures/GermanyRecharged.json +6627 -0
  73. package/src/fixtures/USAOriginal.json +5216 -0
  74. package/src/fixtures/supply.json +5792 -0
  75. package/src/fixtures/undo.json +4102 -0
  76. package/src/gamestate.ts +164 -0
  77. package/src/log.ts +17 -0
  78. package/src/maps/america.ts +411 -0
  79. package/src/maps/australia.ts +137 -0
  80. package/src/maps/badenwurttemberg.ts +162 -0
  81. package/src/maps/benelux.ts +210 -0
  82. package/src/maps/brazil.ts +306 -0
  83. package/src/maps/centraleurope.ts +235 -0
  84. package/src/maps/china.ts +268 -0
  85. package/src/maps/france.ts +295 -0
  86. package/src/maps/germany.ts +328 -0
  87. package/src/maps/indian.ts +289 -0
  88. package/src/maps/italy.ts +189 -0
  89. package/src/maps/japan.ts +143 -0
  90. package/src/maps/korea.ts +185 -0
  91. package/src/maps/middleeast.ts +225 -0
  92. package/src/maps/northerneurope.ts +196 -0
  93. package/src/maps/quebec.ts +304 -0
  94. package/src/maps/russia.ts +292 -0
  95. package/src/maps/southafrica.ts +151 -0
  96. package/src/maps/spainportugal.ts +295 -0
  97. package/src/maps/ukireland.ts +175 -0
  98. package/src/maps.ts +123 -0
  99. package/src/move.ts +83 -0
  100. package/src/powerPlants.ts +59 -0
  101. package/src/prices.ts +10 -0
  102. package/src/randomizeMap.ts +288 -0
  103. package/src/rankings.spec.ts +18 -0
  104. package/src/utils.spec.ts +13 -0
  105. package/src/utils.ts +23 -0
  106. package/tsconfig.json +17 -0
  107. package/wrapper.ts +126 -0
@@ -0,0 +1,164 @@
1
+ import { AvailableMoves } from './available-moves';
2
+ import { LogItem } from './log';
3
+ import { GameMap } from './maps';
4
+ import { Move } from './move';
5
+
6
+ export type MapName =
7
+ | 'USA'
8
+ | 'Germany'
9
+ | 'Brazil'
10
+ | 'Spain & Portugal'
11
+ | 'France'
12
+ | 'Italy'
13
+ | 'Quebec'
14
+ | 'Middle East'
15
+ | 'India'
16
+ | 'China'
17
+ | 'Benelux'
18
+ | 'Russia'
19
+ | 'Central Europe';
20
+ // | 'Australia'
21
+ // | 'Baden-Württemberg'
22
+ // | 'Japan'
23
+ // | 'Korea'
24
+ // | 'Northern Europe'
25
+ // | 'South Africa'
26
+ // | 'UK & Ireland'
27
+ export type Variant = 'original' | 'recharged';
28
+
29
+ export interface GameOptions {
30
+ fastBid?: boolean;
31
+ map?: MapName;
32
+ variant?: Variant;
33
+ showMoney?: boolean;
34
+ useNewRechargedSetup?: boolean;
35
+ trackTotalSpent?: boolean;
36
+ randomizeMap?: boolean;
37
+ }
38
+
39
+ export enum ResourceType {
40
+ Coal = 'coal',
41
+ Oil = 'oil',
42
+ Garbage = 'garbage',
43
+ Uranium = 'uranium',
44
+ }
45
+
46
+ export enum PowerPlantType {
47
+ Coal,
48
+ Oil,
49
+ Garbage,
50
+ Uranium,
51
+ Hybrid,
52
+ Wind,
53
+ Nuclear,
54
+ Step3,
55
+ }
56
+
57
+ export interface PowerPlant {
58
+ number: number;
59
+ type: PowerPlantType;
60
+ cost: number;
61
+ citiesPowered: number;
62
+ storage?: number;
63
+ }
64
+
65
+ export interface CityPosition {
66
+ name: string;
67
+ position: number;
68
+ }
69
+
70
+ export interface Player {
71
+ id: number;
72
+ name?: string;
73
+ powerPlants: PowerPlant[];
74
+ coalCapacity: number;
75
+ coalLeft: number;
76
+ oilCapacity: number;
77
+ oilLeft: number;
78
+ garbageCapacity: number;
79
+ garbageLeft: number;
80
+ uraniumCapacity: number;
81
+ uraniumLeft: number;
82
+ hybridCapacity: number;
83
+ money: number;
84
+ housesLeft: number;
85
+ cities: CityPosition[];
86
+ powerPlantsNotUsed: number[];
87
+ availableMoves: AvailableMoves | null;
88
+ lastMove: Move | null;
89
+ isDropped: boolean;
90
+ bid: number;
91
+ isAI: boolean;
92
+ passed: boolean;
93
+ skipAuction: boolean;
94
+ citiesPowered: number;
95
+ targetCitiesPowered?: number;
96
+ resourcesUsed: ResourceType[];
97
+ totalIncome: number;
98
+ totalSpentCities: number;
99
+ totalSpentConnections: number;
100
+ totalSpentPlants: number;
101
+ totalSpentResources: number;
102
+ ranking?: number;
103
+ }
104
+
105
+ export enum Phase {
106
+ Order = 'Order',
107
+ Auction = 'Auction',
108
+ Resources = 'Resources',
109
+ Building = 'Building',
110
+ Bureaucracy = 'Bureaucracy',
111
+ GameEnd = 'Game End',
112
+ }
113
+
114
+ export interface GameState {
115
+ map: GameMap;
116
+ players: Player[];
117
+ playerOrder: number[];
118
+ currentPlayers: number[];
119
+ powerPlantsDeck: PowerPlant[];
120
+ coalSupply: number;
121
+ oilSupply: number;
122
+ garbageSupply: number;
123
+ uraniumSupply: number;
124
+ coalMarket: number;
125
+ oilMarket: number;
126
+ garbageMarket: number;
127
+ uraniumMarket: number;
128
+ coalResupply?: number[][];
129
+ oilResupply?: number[][];
130
+ garbageResupply?: number[][];
131
+ uraniumResupply?: number[][];
132
+ coalPrices?: number[];
133
+ oilPrices?: number[];
134
+ garbagePrices?: number[];
135
+ uraniumPrices?: number[];
136
+ actualMarket: PowerPlant[];
137
+ futureMarket: PowerPlant[];
138
+ chosenPowerPlant: PowerPlant | undefined;
139
+ chosenResource?: ResourceType | undefined; // Used for India map, where only one resource can be bought at a time.
140
+ currentBid: number | undefined;
141
+ auctioningPlayer: number | undefined;
142
+ step: number;
143
+ phase: Phase;
144
+ options: GameOptions;
145
+ log: LogItem[];
146
+ hiddenLog: LogItem[];
147
+ seed: string;
148
+ round: number;
149
+ auctionSkips: number;
150
+ citiesToStep2: number;
151
+ citiesToEndGame: number;
152
+ citiesBuiltInCurrentRound?: number; // In India, if the players build too many cities in a single round, a power outage will occur.
153
+ resourceResupply: string[];
154
+ paymentTable: number[];
155
+ minimunBid: number;
156
+ plantDiscountActive: boolean;
157
+ discardSmallestPlant: boolean; // For Benelux map, there are times when we remove the smallest plant.
158
+ nextCardWeak: boolean;
159
+ cardsLeft: number;
160
+ card39Bought: boolean;
161
+ knownPowerPlantDeck: PowerPlant[];
162
+ knownPowerPlantDeckStep3: PowerPlant[];
163
+ powerPlantDeckAfterStep3: PowerPlant[] | undefined;
164
+ }
package/src/log.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { Move } from './move';
2
+
3
+ export type LogEvent = {
4
+ type: 'event';
5
+ event: string;
6
+ pretty?: string;
7
+ };
8
+
9
+ export type LogMove = {
10
+ type: 'move';
11
+ player: number;
12
+ move: Move;
13
+ simple: string;
14
+ pretty: string;
15
+ };
16
+
17
+ export type LogItem = LogEvent | LogMove;
@@ -0,0 +1,411 @@
1
+ import { GameMap } from './../maps';
2
+
3
+ export enum Regions {
4
+ Purple = 'purple',
5
+ Green = 'green',
6
+ Red = 'red',
7
+ Yellow = 'yellow',
8
+ Cyan = 'cyan',
9
+ Brown = 'brown',
10
+ }
11
+
12
+ export enum Cities {
13
+ Seattle = 'Seattle',
14
+ Portland = 'Portland',
15
+ Boise = 'Boise',
16
+ Billings = 'Billings',
17
+ Cheyenne = 'Cheyenne',
18
+ Denver = 'Denver',
19
+ Omaha = 'Omaha',
20
+ SanFrancisco = 'San Francisco',
21
+ LosAngeles = 'Los Angeles',
22
+ SanDiego = 'San Diego',
23
+ LasVegas = 'Las Vegas',
24
+ SaltLakeCity = 'Salt Lake City',
25
+ Phoenix = 'Phoenix',
26
+ SantaFe = 'Santa Fe',
27
+ KansasCity = 'Kansas City',
28
+ OklahomaCity = 'Oklahoma City',
29
+ Dallas = 'Dallas',
30
+ Houston = 'Houston',
31
+ Memphis = 'Memphis',
32
+ Birmingham = 'Birmingham',
33
+ NewOrleans = 'New Orleans',
34
+ Fargo = 'Fargo',
35
+ Duluth = 'Duluth',
36
+ Minneapolis = 'Minneapolis',
37
+ Chicago = 'Chicago',
38
+ StLouis = 'St. Louis',
39
+ Cincinnati = 'Cincinnati',
40
+ Knoxvile = 'Knoxvile',
41
+ Detroit = 'Detroit',
42
+ Buffalo = 'Buffalo',
43
+ Pittsburgh = 'Pittsburgh',
44
+ Boston = 'Boston',
45
+ NewYork = 'New York',
46
+ Philadelphia = 'Philadelphia',
47
+ Washington = 'Washington',
48
+ Norfolk = 'Norfolk',
49
+ Raleigh = 'Raleigh',
50
+ Atlanta = 'Atlanta',
51
+ Savannah = 'Savannah',
52
+ Jacksonvile = 'Jacksonvile',
53
+ Tampa = 'Tampa',
54
+ Miami = 'Miami',
55
+ }
56
+
57
+ export const map: GameMap = {
58
+ name: 'USA',
59
+ cities: [
60
+ { name: Cities.Seattle, region: Regions.Purple, x: 74, y: 99 },
61
+ { name: Cities.Portland, region: Regions.Purple, x: 45, y: 167 },
62
+ { name: Cities.Boise, region: Regions.Purple, x: 180, y: 220 },
63
+ { name: Cities.Billings, region: Regions.Purple, x: 345, y: 180 },
64
+ { name: Cities.Cheyenne, region: Regions.Purple, x: 410, y: 280 },
65
+ { name: Cities.Denver, region: Regions.Purple, x: 400, y: 333 },
66
+ { name: Cities.Omaha, region: Regions.Purple, x: 566, y: 293 },
67
+ { name: Cities.SanFrancisco, region: Regions.Cyan, x: 48, y: 371 },
68
+ { name: Cities.LosAngeles, region: Regions.Cyan, x: 116, y: 460 },
69
+ { name: Cities.SanDiego, region: Regions.Cyan, x: 157, y: 507 },
70
+ { name: Cities.LasVegas, region: Regions.Cyan, x: 200, y: 410 },
71
+ { name: Cities.SaltLakeCity, region: Regions.Cyan, x: 266, y: 311 },
72
+ { name: Cities.Phoenix, region: Regions.Cyan, x: 260, y: 486 },
73
+ { name: Cities.SantaFe, region: Regions.Cyan, x: 371, y: 435 },
74
+ { name: Cities.KansasCity, region: Regions.Red, x: 587, y: 356 },
75
+ { name: Cities.OklahomaCity, region: Regions.Red, x: 550, y: 437 },
76
+ { name: Cities.Dallas, region: Regions.Red, x: 560, y: 504 },
77
+ { name: Cities.Houston, region: Regions.Red, x: 569, y: 571 },
78
+ { name: Cities.Memphis, region: Regions.Red, x: 678, y: 449 },
79
+ { name: Cities.Birmingham, region: Regions.Red, x: 739, y: 486 },
80
+ { name: Cities.NewOrleans, region: Regions.Red, x: 674, y: 570 },
81
+ { name: Cities.Fargo, region: Regions.Yellow, x: 551, y: 152 },
82
+ { name: Cities.Duluth, region: Regions.Yellow, x: 637, y: 133 },
83
+ { name: Cities.Minneapolis, region: Regions.Yellow, x: 621, y: 190 },
84
+ { name: Cities.Chicago, region: Regions.Yellow, x: 716, y: 281 },
85
+ { name: Cities.StLouis, region: Regions.Yellow, x: 678, y: 362 },
86
+ { name: Cities.Cincinnati, region: Regions.Yellow, x: 795, y: 348 },
87
+ { name: Cities.Knoxvile, region: Regions.Yellow, x: 796, y: 422 },
88
+ { name: Cities.Detroit, region: Regions.Brown, x: 803, y: 262 },
89
+ { name: Cities.Buffalo, region: Regions.Brown, x: 913, y: 251 },
90
+ { name: Cities.Pittsburgh, region: Regions.Brown, x: 884, y: 316 },
91
+ { name: Cities.Boston, region: Regions.Brown, x: 1052, y: 252 },
92
+ { name: Cities.NewYork, region: Regions.Brown, x: 1010, y: 290 },
93
+ { name: Cities.Philadelphia, region: Regions.Brown, x: 985, y: 330 },
94
+ { name: Cities.Washington, region: Regions.Brown, x: 934, y: 357 },
95
+ { name: Cities.Norfolk, region: Regions.Green, x: 969, y: 405 },
96
+ { name: Cities.Raleigh, region: Regions.Green, x: 915, y: 437 },
97
+ { name: Cities.Atlanta, region: Regions.Green, x: 801, y: 487 },
98
+ { name: Cities.Savannah, region: Regions.Green, x: 867, y: 507 },
99
+ { name: Cities.Jacksonvile, region: Regions.Green, x: 861, y: 559 },
100
+ { name: Cities.Tampa, region: Regions.Green, x: 819, y: 621 },
101
+ { name: Cities.Miami, region: Regions.Green, x: 883, y: 670 },
102
+ ],
103
+ connections: [
104
+ { nodes: [Cities.Seattle, Cities.Portland], cost: 3 },
105
+ { nodes: [Cities.Seattle, Cities.Boise], cost: 12 },
106
+ { nodes: [Cities.Seattle, Cities.Billings], cost: 9 },
107
+ { nodes: [Cities.Portland, Cities.Boise], cost: 13 },
108
+ { nodes: [Cities.Portland, Cities.SanFrancisco], cost: 24 },
109
+ { nodes: [Cities.Boise, Cities.Billings], cost: 12 },
110
+ { nodes: [Cities.Boise, Cities.Cheyenne], cost: 24 },
111
+ { nodes: [Cities.Boise, Cities.SanFrancisco], cost: 23 },
112
+ { nodes: [Cities.Boise, Cities.SaltLakeCity], cost: 8 },
113
+ { nodes: [Cities.Billings, Cities.Cheyenne], cost: 9 },
114
+ { nodes: [Cities.Billings, Cities.Fargo], cost: 17 },
115
+ { nodes: [Cities.Billings, Cities.Minneapolis], cost: 18 },
116
+ { nodes: [Cities.Cheyenne, Cities.Denver], cost: 0 },
117
+ { nodes: [Cities.Cheyenne, Cities.Omaha], cost: 14 },
118
+ { nodes: [Cities.Cheyenne, Cities.Minneapolis], cost: 18 },
119
+ { nodes: [Cities.Denver, Cities.SaltLakeCity], cost: 21 },
120
+ { nodes: [Cities.Denver, Cities.SantaFe], cost: 13 },
121
+ { nodes: [Cities.Denver, Cities.KansasCity], cost: 16 },
122
+ { nodes: [Cities.Omaha, Cities.KansasCity], cost: 5 },
123
+ { nodes: [Cities.Omaha, Cities.Minneapolis], cost: 8 },
124
+ { nodes: [Cities.Omaha, Cities.Chicago], cost: 13 },
125
+ { nodes: [Cities.SanFrancisco, Cities.LosAngeles], cost: 9 },
126
+ { nodes: [Cities.SanFrancisco, Cities.LasVegas], cost: 14 },
127
+ { nodes: [Cities.SanFrancisco, Cities.SaltLakeCity], cost: 27 },
128
+ { nodes: [Cities.LosAngeles, Cities.SanDiego], cost: 3 },
129
+ { nodes: [Cities.LosAngeles, Cities.LasVegas], cost: 9 },
130
+ { nodes: [Cities.SanDiego, Cities.LasVegas], cost: 9 },
131
+ { nodes: [Cities.SanDiego, Cities.Phoenix], cost: 14 },
132
+ { nodes: [Cities.LasVegas, Cities.SaltLakeCity], cost: 18 },
133
+ { nodes: [Cities.LasVegas, Cities.Phoenix], cost: 15 },
134
+ { nodes: [Cities.LasVegas, Cities.SantaFe], cost: 27 },
135
+ { nodes: [Cities.SaltLakeCity, Cities.SantaFe], cost: 28 },
136
+ { nodes: [Cities.Phoenix, Cities.SantaFe], cost: 18 },
137
+ { nodes: [Cities.SantaFe, Cities.KansasCity], cost: 16 },
138
+ { nodes: [Cities.SantaFe, Cities.OklahomaCity], cost: 15 },
139
+ { nodes: [Cities.SantaFe, Cities.Dallas], cost: 16 },
140
+ { nodes: [Cities.SantaFe, Cities.Houston], cost: 21 },
141
+ { nodes: [Cities.KansasCity, Cities.OklahomaCity], cost: 8 },
142
+ { nodes: [Cities.KansasCity, Cities.Memphis], cost: 12 },
143
+ { nodes: [Cities.KansasCity, Cities.Chicago], cost: 8 },
144
+ { nodes: [Cities.KansasCity, Cities.StLouis], cost: 6 },
145
+ { nodes: [Cities.OklahomaCity, Cities.Dallas], cost: 3 },
146
+ { nodes: [Cities.OklahomaCity, Cities.Memphis], cost: 14 },
147
+ { nodes: [Cities.Dallas, Cities.Houston], cost: 5 },
148
+ { nodes: [Cities.Dallas, Cities.Memphis], cost: 12 },
149
+ { nodes: [Cities.Dallas, Cities.NewOrleans], cost: 12 },
150
+ { nodes: [Cities.Houston, Cities.NewOrleans], cost: 8 },
151
+ { nodes: [Cities.Memphis, Cities.Birmingham], cost: 6 },
152
+ { nodes: [Cities.Memphis, Cities.NewOrleans], cost: 7 },
153
+ { nodes: [Cities.Memphis, Cities.StLouis], cost: 7 },
154
+ { nodes: [Cities.Birmingham, Cities.NewOrleans], cost: 11 },
155
+ { nodes: [Cities.Birmingham, Cities.Atlanta], cost: 3 },
156
+ { nodes: [Cities.Birmingham, Cities.Jacksonvile], cost: 9 },
157
+ { nodes: [Cities.NewOrleans, Cities.Jacksonvile], cost: 16 },
158
+ { nodes: [Cities.Fargo, Cities.Duluth], cost: 6 },
159
+ { nodes: [Cities.Fargo, Cities.Minneapolis], cost: 6 },
160
+ { nodes: [Cities.Duluth, Cities.Minneapolis], cost: 5 },
161
+ { nodes: [Cities.Duluth, Cities.Chicago], cost: 12 },
162
+ { nodes: [Cities.Duluth, Cities.Detroit], cost: 15 },
163
+ { nodes: [Cities.Minneapolis, Cities.Chicago], cost: 8 },
164
+ { nodes: [Cities.Chicago, Cities.StLouis], cost: 10 },
165
+ { nodes: [Cities.Chicago, Cities.Cincinnati], cost: 7 },
166
+ { nodes: [Cities.Chicago, Cities.Detroit], cost: 7 },
167
+ { nodes: [Cities.StLouis, Cities.Cincinnati], cost: 12 },
168
+ { nodes: [Cities.StLouis, Cities.Atlanta], cost: 12 },
169
+ { nodes: [Cities.Cincinnati, Cities.Knoxvile], cost: 6 },
170
+ { nodes: [Cities.Cincinnati, Cities.Detroit], cost: 4 },
171
+ { nodes: [Cities.Cincinnati, Cities.Pittsburgh], cost: 7 },
172
+ { nodes: [Cities.Cincinnati, Cities.Raleigh], cost: 15 },
173
+ { nodes: [Cities.Knoxvile, Cities.Atlanta], cost: 5 },
174
+ { nodes: [Cities.Detroit, Cities.Buffalo], cost: 7 },
175
+ { nodes: [Cities.Detroit, Cities.Pittsburgh], cost: 6 },
176
+ { nodes: [Cities.Buffalo, Cities.Pittsburgh], cost: 7 },
177
+ { nodes: [Cities.Buffalo, Cities.NewYork], cost: 8 },
178
+ { nodes: [Cities.Pittsburgh, Cities.Washington], cost: 6 },
179
+ { nodes: [Cities.Pittsburgh, Cities.Raleigh], cost: 7 },
180
+ { nodes: [Cities.Boston, Cities.NewYork], cost: 3 },
181
+ { nodes: [Cities.NewYork, Cities.Philadelphia], cost: 0 },
182
+ { nodes: [Cities.Philadelphia, Cities.Washington], cost: 3 },
183
+ { nodes: [Cities.Washington, Cities.Norfolk], cost: 5 },
184
+ { nodes: [Cities.Norfolk, Cities.Raleigh], cost: 3 },
185
+ { nodes: [Cities.Raleigh, Cities.Atlanta], cost: 7 },
186
+ { nodes: [Cities.Raleigh, Cities.Savannah], cost: 7 },
187
+ { nodes: [Cities.Atlanta, Cities.Savannah], cost: 7 },
188
+ { nodes: [Cities.Savannah, Cities.Jacksonvile], cost: 0 },
189
+ { nodes: [Cities.Jacksonvile, Cities.Tampa], cost: 4 },
190
+ { nodes: [Cities.Tampa, Cities.Miami], cost: 4 },
191
+ ],
192
+ layout: 'Landscape',
193
+ polygons: [
194
+ {
195
+ region: Regions.Brown,
196
+ points: [
197
+ [930, 423],
198
+ [1082, 331],
199
+ [1075, 231],
200
+ [716, 249],
201
+ [758, 303],
202
+ [897, 406],
203
+ ],
204
+ },
205
+ {
206
+ region: Regions.Green,
207
+ points: [
208
+ [898, 405],
209
+ [762, 499],
210
+ [758, 643],
211
+ [887, 744],
212
+ [938, 688],
213
+ [889, 618],
214
+ [1014, 432],
215
+ [985, 387],
216
+ [929, 420],
217
+ ],
218
+ },
219
+ {
220
+ region: Regions.Yellow,
221
+ points: [
222
+ [895, 403],
223
+ [760, 499],
224
+ [630, 393],
225
+ [607, 345],
226
+ [608, 275],
227
+ [439, 162],
228
+ [654, 114],
229
+ [771, 245],
230
+ [716, 247],
231
+ [758, 301],
232
+ ],
233
+ },
234
+ {
235
+ region: Regions.Red,
236
+ points: [
237
+ [606, 344],
238
+ [476, 371],
239
+ [445, 597],
240
+ [546, 664],
241
+ [758, 641],
242
+ [760, 497],
243
+ [629, 391],
244
+ ],
245
+ },
246
+ {
247
+ region: Regions.Purple,
248
+ points: [
249
+ [606, 342],
250
+ [476, 369],
251
+ [347, 395],
252
+ [313, 301],
253
+ [18, 287],
254
+ [18, 165],
255
+ [76, 74],
256
+ [438, 160],
257
+ [607, 275],
258
+ ],
259
+ },
260
+ {
261
+ region: Regions.Cyan,
262
+ points: [
263
+ [18, 285],
264
+ [20, 429],
265
+ [142, 583],
266
+ [445, 594],
267
+ [476, 368],
268
+ [346, 392],
269
+ [312, 300],
270
+ ],
271
+ },
272
+ ],
273
+ };
274
+
275
+ export const mapRecharged: GameMap = {
276
+ name: 'USA',
277
+ cities: [
278
+ { name: Cities.Seattle, region: Regions.Purple, x: 74, y: 99 },
279
+ { name: Cities.Portland, region: Regions.Purple, x: 45, y: 167 },
280
+ { name: Cities.Boise, region: Regions.Purple, x: 180, y: 220 },
281
+ { name: Cities.Billings, region: Regions.Purple, x: 345, y: 180 },
282
+ { name: Cities.Cheyenne, region: Regions.Purple, x: 410, y: 280 },
283
+ { name: Cities.Denver, region: Regions.Purple, x: 400, y: 333 },
284
+ { name: Cities.Omaha, region: Regions.Purple, x: 566, y: 293 },
285
+ { name: Cities.SanFrancisco, region: Regions.Cyan, x: 48, y: 371 },
286
+ { name: Cities.LosAngeles, region: Regions.Cyan, x: 116, y: 460 },
287
+ { name: Cities.SanDiego, region: Regions.Cyan, x: 157, y: 507 },
288
+ { name: Cities.LasVegas, region: Regions.Cyan, x: 200, y: 410 },
289
+ { name: Cities.SaltLakeCity, region: Regions.Cyan, x: 266, y: 311 },
290
+ { name: Cities.Phoenix, region: Regions.Cyan, x: 260, y: 486 },
291
+ { name: Cities.SantaFe, region: Regions.Cyan, x: 371, y: 435 },
292
+ { name: Cities.KansasCity, region: Regions.Red, x: 587, y: 356 },
293
+ { name: Cities.OklahomaCity, region: Regions.Red, x: 550, y: 437 },
294
+ { name: Cities.Dallas, region: Regions.Red, x: 560, y: 504 },
295
+ { name: Cities.Houston, region: Regions.Red, x: 569, y: 571 },
296
+ { name: Cities.Memphis, region: Regions.Red, x: 678, y: 449 },
297
+ { name: Cities.Birmingham, region: Regions.Red, x: 739, y: 486 },
298
+ { name: Cities.NewOrleans, region: Regions.Red, x: 674, y: 570 },
299
+ { name: Cities.Fargo, region: Regions.Yellow, x: 551, y: 152 },
300
+ { name: Cities.Duluth, region: Regions.Yellow, x: 637, y: 133 },
301
+ { name: Cities.Minneapolis, region: Regions.Yellow, x: 621, y: 190 },
302
+ { name: Cities.Chicago, region: Regions.Yellow, x: 716, y: 281 },
303
+ { name: Cities.StLouis, region: Regions.Yellow, x: 678, y: 362 },
304
+ { name: Cities.Cincinnati, region: Regions.Yellow, x: 795, y: 348 },
305
+ { name: Cities.Knoxvile, region: Regions.Yellow, x: 796, y: 422 },
306
+ { name: Cities.Detroit, region: Regions.Brown, x: 803, y: 262 },
307
+ { name: Cities.Buffalo, region: Regions.Brown, x: 913, y: 251 },
308
+ { name: Cities.Pittsburgh, region: Regions.Brown, x: 884, y: 316 },
309
+ { name: Cities.Boston, region: Regions.Brown, x: 1052, y: 252 },
310
+ { name: Cities.NewYork, region: Regions.Brown, x: 1010, y: 290 },
311
+ { name: Cities.Philadelphia, region: Regions.Brown, x: 985, y: 330 },
312
+ { name: Cities.Washington, region: Regions.Brown, x: 934, y: 357 },
313
+ { name: Cities.Norfolk, region: Regions.Green, x: 969, y: 405 },
314
+ { name: Cities.Raleigh, region: Regions.Green, x: 915, y: 437 },
315
+ { name: Cities.Atlanta, region: Regions.Green, x: 801, y: 487 },
316
+ { name: Cities.Savannah, region: Regions.Green, x: 867, y: 507 },
317
+ { name: Cities.Jacksonvile, region: Regions.Green, x: 861, y: 559 },
318
+ { name: Cities.Tampa, region: Regions.Green, x: 819, y: 621 },
319
+ { name: Cities.Miami, region: Regions.Green, x: 883, y: 670 },
320
+ ],
321
+ connections: [
322
+ { nodes: [Cities.Seattle, Cities.Portland], cost: 3 },
323
+ { nodes: [Cities.Seattle, Cities.Boise], cost: 12 },
324
+ { nodes: [Cities.Seattle, Cities.Billings], cost: 9 },
325
+ { nodes: [Cities.Portland, Cities.Boise], cost: 13 },
326
+ { nodes: [Cities.Portland, Cities.SanFrancisco], cost: 24 },
327
+ { nodes: [Cities.Boise, Cities.Billings], cost: 12 },
328
+ { nodes: [Cities.Boise, Cities.SanFrancisco], cost: 23 },
329
+ { nodes: [Cities.Boise, Cities.SaltLakeCity], cost: 8 },
330
+ { nodes: [Cities.Billings, Cities.Cheyenne], cost: 9 },
331
+ { nodes: [Cities.Billings, Cities.Fargo], cost: 17 },
332
+ { nodes: [Cities.Billings, Cities.Minneapolis], cost: 18 },
333
+ { nodes: [Cities.Cheyenne, Cities.Denver], cost: 0 },
334
+ { nodes: [Cities.Cheyenne, Cities.Omaha], cost: 14 },
335
+ { nodes: [Cities.Cheyenne, Cities.Minneapolis], cost: 18 },
336
+ { nodes: [Cities.Denver, Cities.SaltLakeCity], cost: 21 },
337
+ { nodes: [Cities.Denver, Cities.SantaFe], cost: 13 },
338
+ { nodes: [Cities.Denver, Cities.KansasCity], cost: 16 },
339
+ { nodes: [Cities.Omaha, Cities.KansasCity], cost: 5 },
340
+ { nodes: [Cities.Omaha, Cities.Minneapolis], cost: 8 },
341
+ { nodes: [Cities.Omaha, Cities.Chicago], cost: 12 },
342
+ { nodes: [Cities.SanFrancisco, Cities.LosAngeles], cost: 9 },
343
+ { nodes: [Cities.SanFrancisco, Cities.LasVegas], cost: 14 },
344
+ { nodes: [Cities.SanFrancisco, Cities.SaltLakeCity], cost: 27 },
345
+ { nodes: [Cities.LosAngeles, Cities.SanDiego], cost: 3 },
346
+ { nodes: [Cities.LosAngeles, Cities.LasVegas], cost: 9 },
347
+ { nodes: [Cities.SanDiego, Cities.LasVegas], cost: 9 },
348
+ { nodes: [Cities.SanDiego, Cities.Phoenix], cost: 14 },
349
+ { nodes: [Cities.LasVegas, Cities.SaltLakeCity], cost: 18 },
350
+ { nodes: [Cities.LasVegas, Cities.Phoenix], cost: 15 },
351
+ { nodes: [Cities.LasVegas, Cities.SantaFe], cost: 27 },
352
+ { nodes: [Cities.SaltLakeCity, Cities.SantaFe], cost: 28 },
353
+ { nodes: [Cities.Phoenix, Cities.SantaFe], cost: 18 },
354
+ { nodes: [Cities.SantaFe, Cities.KansasCity], cost: 16 },
355
+ { nodes: [Cities.SantaFe, Cities.OklahomaCity], cost: 15 },
356
+ { nodes: [Cities.SantaFe, Cities.Dallas], cost: 16 },
357
+ { nodes: [Cities.SantaFe, Cities.Houston], cost: 20 },
358
+ { nodes: [Cities.KansasCity, Cities.OklahomaCity], cost: 8 },
359
+ { nodes: [Cities.KansasCity, Cities.Memphis], cost: 12 },
360
+ { nodes: [Cities.KansasCity, Cities.Chicago], cost: 8 },
361
+ { nodes: [Cities.KansasCity, Cities.StLouis], cost: 6 },
362
+ { nodes: [Cities.OklahomaCity, Cities.Dallas], cost: 3 },
363
+ { nodes: [Cities.OklahomaCity, Cities.Memphis], cost: 14 },
364
+ { nodes: [Cities.Dallas, Cities.Houston], cost: 5 },
365
+ { nodes: [Cities.Dallas, Cities.Memphis], cost: 12 },
366
+ { nodes: [Cities.Dallas, Cities.NewOrleans], cost: 12 },
367
+ { nodes: [Cities.Houston, Cities.NewOrleans], cost: 8 },
368
+ { nodes: [Cities.Memphis, Cities.Birmingham], cost: 6 },
369
+ { nodes: [Cities.Memphis, Cities.NewOrleans], cost: 7 },
370
+ { nodes: [Cities.Memphis, Cities.StLouis], cost: 7 },
371
+ { nodes: [Cities.Birmingham, Cities.NewOrleans], cost: 11 },
372
+ { nodes: [Cities.Birmingham, Cities.Atlanta], cost: 3 },
373
+ { nodes: [Cities.Birmingham, Cities.Jacksonvile], cost: 9 },
374
+ { nodes: [Cities.NewOrleans, Cities.Jacksonvile], cost: 16 },
375
+ { nodes: [Cities.Fargo, Cities.Duluth], cost: 6 },
376
+ { nodes: [Cities.Fargo, Cities.Minneapolis], cost: 6 },
377
+ { nodes: [Cities.Duluth, Cities.Minneapolis], cost: 5 },
378
+ { nodes: [Cities.Duluth, Cities.Chicago], cost: 12 },
379
+ { nodes: [Cities.Duluth, Cities.Detroit], cost: 15 },
380
+ { nodes: [Cities.Minneapolis, Cities.Chicago], cost: 8 },
381
+ { nodes: [Cities.Chicago, Cities.StLouis], cost: 10 },
382
+ { nodes: [Cities.Chicago, Cities.Cincinnati], cost: 7 },
383
+ { nodes: [Cities.Chicago, Cities.Detroit], cost: 7 },
384
+ { nodes: [Cities.StLouis, Cities.Cincinnati], cost: 12 },
385
+ { nodes: [Cities.StLouis, Cities.Atlanta], cost: 12 },
386
+ { nodes: [Cities.Cincinnati, Cities.Knoxvile], cost: 6 },
387
+ { nodes: [Cities.Cincinnati, Cities.Detroit], cost: 4 },
388
+ { nodes: [Cities.Cincinnati, Cities.Pittsburgh], cost: 7 },
389
+ { nodes: [Cities.Knoxvile, Cities.Atlanta], cost: 5 },
390
+ { nodes: [Cities.Knoxvile, Cities.Raleigh], cost: 11 },
391
+ { nodes: [Cities.Detroit, Cities.Buffalo], cost: 7 },
392
+ { nodes: [Cities.Detroit, Cities.Pittsburgh], cost: 6 },
393
+ { nodes: [Cities.Buffalo, Cities.Pittsburgh], cost: 7 },
394
+ { nodes: [Cities.Buffalo, Cities.NewYork], cost: 8 },
395
+ { nodes: [Cities.Pittsburgh, Cities.Washington], cost: 6 },
396
+ { nodes: [Cities.Pittsburgh, Cities.Raleigh], cost: 7 },
397
+ { nodes: [Cities.Boston, Cities.NewYork], cost: 3 },
398
+ { nodes: [Cities.NewYork, Cities.Philadelphia], cost: 0 },
399
+ { nodes: [Cities.Philadelphia, Cities.Washington], cost: 3 },
400
+ { nodes: [Cities.Washington, Cities.Norfolk], cost: 5 },
401
+ { nodes: [Cities.Norfolk, Cities.Raleigh], cost: 3 },
402
+ { nodes: [Cities.Raleigh, Cities.Atlanta], cost: 7 },
403
+ { nodes: [Cities.Raleigh, Cities.Savannah], cost: 7 },
404
+ { nodes: [Cities.Atlanta, Cities.Savannah], cost: 7 },
405
+ { nodes: [Cities.Savannah, Cities.Jacksonvile], cost: 0 },
406
+ { nodes: [Cities.Jacksonvile, Cities.Tampa], cost: 4 },
407
+ { nodes: [Cities.Tampa, Cities.Miami], cost: 4 },
408
+ ],
409
+ layout: 'Landscape',
410
+ mapSpecificRules: 'You can buy coal from the supply for $8.',
411
+ };