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,135 @@
1
+ import { AvailableMoves } from './available-moves';
2
+ import { LogItem } from './log';
3
+ import { GameMap } from './maps';
4
+ import { Move } from './move';
5
+ export declare type MapName = 'USA' | 'Germany' | 'Brazil' | 'Spain & Portugal' | 'France' | 'Italy' | 'Quebec' | 'Middle East' | 'India' | 'China' | 'Benelux' | 'Russia' | 'Central Europe';
6
+ export declare type Variant = 'original' | 'recharged';
7
+ export interface GameOptions {
8
+ fastBid?: boolean;
9
+ map?: MapName;
10
+ variant?: Variant;
11
+ showMoney?: boolean;
12
+ useNewRechargedSetup?: boolean;
13
+ trackTotalSpent?: boolean;
14
+ randomizeMap?: boolean;
15
+ }
16
+ export declare enum ResourceType {
17
+ Coal = "coal",
18
+ Oil = "oil",
19
+ Garbage = "garbage",
20
+ Uranium = "uranium"
21
+ }
22
+ export declare enum PowerPlantType {
23
+ Coal = 0,
24
+ Oil = 1,
25
+ Garbage = 2,
26
+ Uranium = 3,
27
+ Hybrid = 4,
28
+ Wind = 5,
29
+ Nuclear = 6,
30
+ Step3 = 7
31
+ }
32
+ export interface PowerPlant {
33
+ number: number;
34
+ type: PowerPlantType;
35
+ cost: number;
36
+ citiesPowered: number;
37
+ storage?: number;
38
+ }
39
+ export interface CityPosition {
40
+ name: string;
41
+ position: number;
42
+ }
43
+ export interface Player {
44
+ id: number;
45
+ name?: string;
46
+ powerPlants: PowerPlant[];
47
+ coalCapacity: number;
48
+ coalLeft: number;
49
+ oilCapacity: number;
50
+ oilLeft: number;
51
+ garbageCapacity: number;
52
+ garbageLeft: number;
53
+ uraniumCapacity: number;
54
+ uraniumLeft: number;
55
+ hybridCapacity: number;
56
+ money: number;
57
+ housesLeft: number;
58
+ cities: CityPosition[];
59
+ powerPlantsNotUsed: number[];
60
+ availableMoves: AvailableMoves | null;
61
+ lastMove: Move | null;
62
+ isDropped: boolean;
63
+ bid: number;
64
+ isAI: boolean;
65
+ passed: boolean;
66
+ skipAuction: boolean;
67
+ citiesPowered: number;
68
+ targetCitiesPowered?: number;
69
+ resourcesUsed: ResourceType[];
70
+ totalIncome: number;
71
+ totalSpentCities: number;
72
+ totalSpentConnections: number;
73
+ totalSpentPlants: number;
74
+ totalSpentResources: number;
75
+ ranking?: number;
76
+ }
77
+ export declare enum Phase {
78
+ Order = "Order",
79
+ Auction = "Auction",
80
+ Resources = "Resources",
81
+ Building = "Building",
82
+ Bureaucracy = "Bureaucracy",
83
+ GameEnd = "Game End"
84
+ }
85
+ export interface GameState {
86
+ map: GameMap;
87
+ players: Player[];
88
+ playerOrder: number[];
89
+ currentPlayers: number[];
90
+ powerPlantsDeck: PowerPlant[];
91
+ coalSupply: number;
92
+ oilSupply: number;
93
+ garbageSupply: number;
94
+ uraniumSupply: number;
95
+ coalMarket: number;
96
+ oilMarket: number;
97
+ garbageMarket: number;
98
+ uraniumMarket: number;
99
+ coalResupply?: number[][];
100
+ oilResupply?: number[][];
101
+ garbageResupply?: number[][];
102
+ uraniumResupply?: number[][];
103
+ coalPrices?: number[];
104
+ oilPrices?: number[];
105
+ garbagePrices?: number[];
106
+ uraniumPrices?: number[];
107
+ actualMarket: PowerPlant[];
108
+ futureMarket: PowerPlant[];
109
+ chosenPowerPlant: PowerPlant | undefined;
110
+ chosenResource?: ResourceType | undefined;
111
+ currentBid: number | undefined;
112
+ auctioningPlayer: number | undefined;
113
+ step: number;
114
+ phase: Phase;
115
+ options: GameOptions;
116
+ log: LogItem[];
117
+ hiddenLog: LogItem[];
118
+ seed: string;
119
+ round: number;
120
+ auctionSkips: number;
121
+ citiesToStep2: number;
122
+ citiesToEndGame: number;
123
+ citiesBuiltInCurrentRound?: number;
124
+ resourceResupply: string[];
125
+ paymentTable: number[];
126
+ minimunBid: number;
127
+ plantDiscountActive: boolean;
128
+ discardSmallestPlant: boolean;
129
+ nextCardWeak: boolean;
130
+ cardsLeft: number;
131
+ card39Bought: boolean;
132
+ knownPowerPlantDeck: PowerPlant[];
133
+ knownPowerPlantDeckStep3: PowerPlant[];
134
+ powerPlantDeckAfterStep3: PowerPlant[] | undefined;
135
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Phase = exports.PowerPlantType = exports.ResourceType = void 0;
4
+ var ResourceType;
5
+ (function (ResourceType) {
6
+ ResourceType["Coal"] = "coal";
7
+ ResourceType["Oil"] = "oil";
8
+ ResourceType["Garbage"] = "garbage";
9
+ ResourceType["Uranium"] = "uranium";
10
+ })(ResourceType = exports.ResourceType || (exports.ResourceType = {}));
11
+ var PowerPlantType;
12
+ (function (PowerPlantType) {
13
+ PowerPlantType[PowerPlantType["Coal"] = 0] = "Coal";
14
+ PowerPlantType[PowerPlantType["Oil"] = 1] = "Oil";
15
+ PowerPlantType[PowerPlantType["Garbage"] = 2] = "Garbage";
16
+ PowerPlantType[PowerPlantType["Uranium"] = 3] = "Uranium";
17
+ PowerPlantType[PowerPlantType["Hybrid"] = 4] = "Hybrid";
18
+ PowerPlantType[PowerPlantType["Wind"] = 5] = "Wind";
19
+ PowerPlantType[PowerPlantType["Nuclear"] = 6] = "Nuclear";
20
+ PowerPlantType[PowerPlantType["Step3"] = 7] = "Step3";
21
+ })(PowerPlantType = exports.PowerPlantType || (exports.PowerPlantType = {}));
22
+ var Phase;
23
+ (function (Phase) {
24
+ Phase["Order"] = "Order";
25
+ Phase["Auction"] = "Auction";
26
+ Phase["Resources"] = "Resources";
27
+ Phase["Building"] = "Building";
28
+ Phase["Bureaucracy"] = "Bureaucracy";
29
+ Phase["GameEnd"] = "Game End";
30
+ })(Phase = exports.Phase || (exports.Phase = {}));
@@ -0,0 +1,14 @@
1
+ import { Move } from './move';
2
+ export declare type LogEvent = {
3
+ type: 'event';
4
+ event: string;
5
+ pretty?: string;
6
+ };
7
+ export declare type LogMove = {
8
+ type: 'move';
9
+ player: number;
10
+ move: Move;
11
+ simple: string;
12
+ pretty: string;
13
+ };
14
+ export declare type LogItem = LogEvent | LogMove;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,55 @@
1
+ import { GameMap } from './../maps';
2
+ export declare enum Regions {
3
+ Purple = "purple",
4
+ Green = "green",
5
+ Red = "red",
6
+ Yellow = "yellow",
7
+ Cyan = "cyan",
8
+ Brown = "brown"
9
+ }
10
+ export declare enum Cities {
11
+ Seattle = "Seattle",
12
+ Portland = "Portland",
13
+ Boise = "Boise",
14
+ Billings = "Billings",
15
+ Cheyenne = "Cheyenne",
16
+ Denver = "Denver",
17
+ Omaha = "Omaha",
18
+ SanFrancisco = "San Francisco",
19
+ LosAngeles = "Los Angeles",
20
+ SanDiego = "San Diego",
21
+ LasVegas = "Las Vegas",
22
+ SaltLakeCity = "Salt Lake City",
23
+ Phoenix = "Phoenix",
24
+ SantaFe = "Santa Fe",
25
+ KansasCity = "Kansas City",
26
+ OklahomaCity = "Oklahoma City",
27
+ Dallas = "Dallas",
28
+ Houston = "Houston",
29
+ Memphis = "Memphis",
30
+ Birmingham = "Birmingham",
31
+ NewOrleans = "New Orleans",
32
+ Fargo = "Fargo",
33
+ Duluth = "Duluth",
34
+ Minneapolis = "Minneapolis",
35
+ Chicago = "Chicago",
36
+ StLouis = "St. Louis",
37
+ Cincinnati = "Cincinnati",
38
+ Knoxvile = "Knoxvile",
39
+ Detroit = "Detroit",
40
+ Buffalo = "Buffalo",
41
+ Pittsburgh = "Pittsburgh",
42
+ Boston = "Boston",
43
+ NewYork = "New York",
44
+ Philadelphia = "Philadelphia",
45
+ Washington = "Washington",
46
+ Norfolk = "Norfolk",
47
+ Raleigh = "Raleigh",
48
+ Atlanta = "Atlanta",
49
+ Savannah = "Savannah",
50
+ Jacksonvile = "Jacksonvile",
51
+ Tampa = "Tampa",
52
+ Miami = "Miami"
53
+ }
54
+ export declare const map: GameMap;
55
+ export declare const mapRecharged: GameMap;
@@ -0,0 +1,411 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapRecharged = exports.map = exports.Cities = exports.Regions = void 0;
4
+ var Regions;
5
+ (function (Regions) {
6
+ Regions["Purple"] = "purple";
7
+ Regions["Green"] = "green";
8
+ Regions["Red"] = "red";
9
+ Regions["Yellow"] = "yellow";
10
+ Regions["Cyan"] = "cyan";
11
+ Regions["Brown"] = "brown";
12
+ })(Regions = exports.Regions || (exports.Regions = {}));
13
+ var Cities;
14
+ (function (Cities) {
15
+ Cities["Seattle"] = "Seattle";
16
+ Cities["Portland"] = "Portland";
17
+ Cities["Boise"] = "Boise";
18
+ Cities["Billings"] = "Billings";
19
+ Cities["Cheyenne"] = "Cheyenne";
20
+ Cities["Denver"] = "Denver";
21
+ Cities["Omaha"] = "Omaha";
22
+ Cities["SanFrancisco"] = "San Francisco";
23
+ Cities["LosAngeles"] = "Los Angeles";
24
+ Cities["SanDiego"] = "San Diego";
25
+ Cities["LasVegas"] = "Las Vegas";
26
+ Cities["SaltLakeCity"] = "Salt Lake City";
27
+ Cities["Phoenix"] = "Phoenix";
28
+ Cities["SantaFe"] = "Santa Fe";
29
+ Cities["KansasCity"] = "Kansas City";
30
+ Cities["OklahomaCity"] = "Oklahoma City";
31
+ Cities["Dallas"] = "Dallas";
32
+ Cities["Houston"] = "Houston";
33
+ Cities["Memphis"] = "Memphis";
34
+ Cities["Birmingham"] = "Birmingham";
35
+ Cities["NewOrleans"] = "New Orleans";
36
+ Cities["Fargo"] = "Fargo";
37
+ Cities["Duluth"] = "Duluth";
38
+ Cities["Minneapolis"] = "Minneapolis";
39
+ Cities["Chicago"] = "Chicago";
40
+ Cities["StLouis"] = "St. Louis";
41
+ Cities["Cincinnati"] = "Cincinnati";
42
+ Cities["Knoxvile"] = "Knoxvile";
43
+ Cities["Detroit"] = "Detroit";
44
+ Cities["Buffalo"] = "Buffalo";
45
+ Cities["Pittsburgh"] = "Pittsburgh";
46
+ Cities["Boston"] = "Boston";
47
+ Cities["NewYork"] = "New York";
48
+ Cities["Philadelphia"] = "Philadelphia";
49
+ Cities["Washington"] = "Washington";
50
+ Cities["Norfolk"] = "Norfolk";
51
+ Cities["Raleigh"] = "Raleigh";
52
+ Cities["Atlanta"] = "Atlanta";
53
+ Cities["Savannah"] = "Savannah";
54
+ Cities["Jacksonvile"] = "Jacksonvile";
55
+ Cities["Tampa"] = "Tampa";
56
+ Cities["Miami"] = "Miami";
57
+ })(Cities = exports.Cities || (exports.Cities = {}));
58
+ exports.map = {
59
+ name: 'USA',
60
+ cities: [
61
+ { name: Cities.Seattle, region: Regions.Purple, x: 74, y: 99 },
62
+ { name: Cities.Portland, region: Regions.Purple, x: 45, y: 167 },
63
+ { name: Cities.Boise, region: Regions.Purple, x: 180, y: 220 },
64
+ { name: Cities.Billings, region: Regions.Purple, x: 345, y: 180 },
65
+ { name: Cities.Cheyenne, region: Regions.Purple, x: 410, y: 280 },
66
+ { name: Cities.Denver, region: Regions.Purple, x: 400, y: 333 },
67
+ { name: Cities.Omaha, region: Regions.Purple, x: 566, y: 293 },
68
+ { name: Cities.SanFrancisco, region: Regions.Cyan, x: 48, y: 371 },
69
+ { name: Cities.LosAngeles, region: Regions.Cyan, x: 116, y: 460 },
70
+ { name: Cities.SanDiego, region: Regions.Cyan, x: 157, y: 507 },
71
+ { name: Cities.LasVegas, region: Regions.Cyan, x: 200, y: 410 },
72
+ { name: Cities.SaltLakeCity, region: Regions.Cyan, x: 266, y: 311 },
73
+ { name: Cities.Phoenix, region: Regions.Cyan, x: 260, y: 486 },
74
+ { name: Cities.SantaFe, region: Regions.Cyan, x: 371, y: 435 },
75
+ { name: Cities.KansasCity, region: Regions.Red, x: 587, y: 356 },
76
+ { name: Cities.OklahomaCity, region: Regions.Red, x: 550, y: 437 },
77
+ { name: Cities.Dallas, region: Regions.Red, x: 560, y: 504 },
78
+ { name: Cities.Houston, region: Regions.Red, x: 569, y: 571 },
79
+ { name: Cities.Memphis, region: Regions.Red, x: 678, y: 449 },
80
+ { name: Cities.Birmingham, region: Regions.Red, x: 739, y: 486 },
81
+ { name: Cities.NewOrleans, region: Regions.Red, x: 674, y: 570 },
82
+ { name: Cities.Fargo, region: Regions.Yellow, x: 551, y: 152 },
83
+ { name: Cities.Duluth, region: Regions.Yellow, x: 637, y: 133 },
84
+ { name: Cities.Minneapolis, region: Regions.Yellow, x: 621, y: 190 },
85
+ { name: Cities.Chicago, region: Regions.Yellow, x: 716, y: 281 },
86
+ { name: Cities.StLouis, region: Regions.Yellow, x: 678, y: 362 },
87
+ { name: Cities.Cincinnati, region: Regions.Yellow, x: 795, y: 348 },
88
+ { name: Cities.Knoxvile, region: Regions.Yellow, x: 796, y: 422 },
89
+ { name: Cities.Detroit, region: Regions.Brown, x: 803, y: 262 },
90
+ { name: Cities.Buffalo, region: Regions.Brown, x: 913, y: 251 },
91
+ { name: Cities.Pittsburgh, region: Regions.Brown, x: 884, y: 316 },
92
+ { name: Cities.Boston, region: Regions.Brown, x: 1052, y: 252 },
93
+ { name: Cities.NewYork, region: Regions.Brown, x: 1010, y: 290 },
94
+ { name: Cities.Philadelphia, region: Regions.Brown, x: 985, y: 330 },
95
+ { name: Cities.Washington, region: Regions.Brown, x: 934, y: 357 },
96
+ { name: Cities.Norfolk, region: Regions.Green, x: 969, y: 405 },
97
+ { name: Cities.Raleigh, region: Regions.Green, x: 915, y: 437 },
98
+ { name: Cities.Atlanta, region: Regions.Green, x: 801, y: 487 },
99
+ { name: Cities.Savannah, region: Regions.Green, x: 867, y: 507 },
100
+ { name: Cities.Jacksonvile, region: Regions.Green, x: 861, y: 559 },
101
+ { name: Cities.Tampa, region: Regions.Green, x: 819, y: 621 },
102
+ { name: Cities.Miami, region: Regions.Green, x: 883, y: 670 },
103
+ ],
104
+ connections: [
105
+ { nodes: [Cities.Seattle, Cities.Portland], cost: 3 },
106
+ { nodes: [Cities.Seattle, Cities.Boise], cost: 12 },
107
+ { nodes: [Cities.Seattle, Cities.Billings], cost: 9 },
108
+ { nodes: [Cities.Portland, Cities.Boise], cost: 13 },
109
+ { nodes: [Cities.Portland, Cities.SanFrancisco], cost: 24 },
110
+ { nodes: [Cities.Boise, Cities.Billings], cost: 12 },
111
+ { nodes: [Cities.Boise, Cities.Cheyenne], cost: 24 },
112
+ { nodes: [Cities.Boise, Cities.SanFrancisco], cost: 23 },
113
+ { nodes: [Cities.Boise, Cities.SaltLakeCity], cost: 8 },
114
+ { nodes: [Cities.Billings, Cities.Cheyenne], cost: 9 },
115
+ { nodes: [Cities.Billings, Cities.Fargo], cost: 17 },
116
+ { nodes: [Cities.Billings, Cities.Minneapolis], cost: 18 },
117
+ { nodes: [Cities.Cheyenne, Cities.Denver], cost: 0 },
118
+ { nodes: [Cities.Cheyenne, Cities.Omaha], cost: 14 },
119
+ { nodes: [Cities.Cheyenne, Cities.Minneapolis], cost: 18 },
120
+ { nodes: [Cities.Denver, Cities.SaltLakeCity], cost: 21 },
121
+ { nodes: [Cities.Denver, Cities.SantaFe], cost: 13 },
122
+ { nodes: [Cities.Denver, Cities.KansasCity], cost: 16 },
123
+ { nodes: [Cities.Omaha, Cities.KansasCity], cost: 5 },
124
+ { nodes: [Cities.Omaha, Cities.Minneapolis], cost: 8 },
125
+ { nodes: [Cities.Omaha, Cities.Chicago], cost: 13 },
126
+ { nodes: [Cities.SanFrancisco, Cities.LosAngeles], cost: 9 },
127
+ { nodes: [Cities.SanFrancisco, Cities.LasVegas], cost: 14 },
128
+ { nodes: [Cities.SanFrancisco, Cities.SaltLakeCity], cost: 27 },
129
+ { nodes: [Cities.LosAngeles, Cities.SanDiego], cost: 3 },
130
+ { nodes: [Cities.LosAngeles, Cities.LasVegas], cost: 9 },
131
+ { nodes: [Cities.SanDiego, Cities.LasVegas], cost: 9 },
132
+ { nodes: [Cities.SanDiego, Cities.Phoenix], cost: 14 },
133
+ { nodes: [Cities.LasVegas, Cities.SaltLakeCity], cost: 18 },
134
+ { nodes: [Cities.LasVegas, Cities.Phoenix], cost: 15 },
135
+ { nodes: [Cities.LasVegas, Cities.SantaFe], cost: 27 },
136
+ { nodes: [Cities.SaltLakeCity, Cities.SantaFe], cost: 28 },
137
+ { nodes: [Cities.Phoenix, Cities.SantaFe], cost: 18 },
138
+ { nodes: [Cities.SantaFe, Cities.KansasCity], cost: 16 },
139
+ { nodes: [Cities.SantaFe, Cities.OklahomaCity], cost: 15 },
140
+ { nodes: [Cities.SantaFe, Cities.Dallas], cost: 16 },
141
+ { nodes: [Cities.SantaFe, Cities.Houston], cost: 21 },
142
+ { nodes: [Cities.KansasCity, Cities.OklahomaCity], cost: 8 },
143
+ { nodes: [Cities.KansasCity, Cities.Memphis], cost: 12 },
144
+ { nodes: [Cities.KansasCity, Cities.Chicago], cost: 8 },
145
+ { nodes: [Cities.KansasCity, Cities.StLouis], cost: 6 },
146
+ { nodes: [Cities.OklahomaCity, Cities.Dallas], cost: 3 },
147
+ { nodes: [Cities.OklahomaCity, Cities.Memphis], cost: 14 },
148
+ { nodes: [Cities.Dallas, Cities.Houston], cost: 5 },
149
+ { nodes: [Cities.Dallas, Cities.Memphis], cost: 12 },
150
+ { nodes: [Cities.Dallas, Cities.NewOrleans], cost: 12 },
151
+ { nodes: [Cities.Houston, Cities.NewOrleans], cost: 8 },
152
+ { nodes: [Cities.Memphis, Cities.Birmingham], cost: 6 },
153
+ { nodes: [Cities.Memphis, Cities.NewOrleans], cost: 7 },
154
+ { nodes: [Cities.Memphis, Cities.StLouis], cost: 7 },
155
+ { nodes: [Cities.Birmingham, Cities.NewOrleans], cost: 11 },
156
+ { nodes: [Cities.Birmingham, Cities.Atlanta], cost: 3 },
157
+ { nodes: [Cities.Birmingham, Cities.Jacksonvile], cost: 9 },
158
+ { nodes: [Cities.NewOrleans, Cities.Jacksonvile], cost: 16 },
159
+ { nodes: [Cities.Fargo, Cities.Duluth], cost: 6 },
160
+ { nodes: [Cities.Fargo, Cities.Minneapolis], cost: 6 },
161
+ { nodes: [Cities.Duluth, Cities.Minneapolis], cost: 5 },
162
+ { nodes: [Cities.Duluth, Cities.Chicago], cost: 12 },
163
+ { nodes: [Cities.Duluth, Cities.Detroit], cost: 15 },
164
+ { nodes: [Cities.Minneapolis, Cities.Chicago], cost: 8 },
165
+ { nodes: [Cities.Chicago, Cities.StLouis], cost: 10 },
166
+ { nodes: [Cities.Chicago, Cities.Cincinnati], cost: 7 },
167
+ { nodes: [Cities.Chicago, Cities.Detroit], cost: 7 },
168
+ { nodes: [Cities.StLouis, Cities.Cincinnati], cost: 12 },
169
+ { nodes: [Cities.StLouis, Cities.Atlanta], cost: 12 },
170
+ { nodes: [Cities.Cincinnati, Cities.Knoxvile], cost: 6 },
171
+ { nodes: [Cities.Cincinnati, Cities.Detroit], cost: 4 },
172
+ { nodes: [Cities.Cincinnati, Cities.Pittsburgh], cost: 7 },
173
+ { nodes: [Cities.Cincinnati, Cities.Raleigh], cost: 15 },
174
+ { nodes: [Cities.Knoxvile, Cities.Atlanta], cost: 5 },
175
+ { nodes: [Cities.Detroit, Cities.Buffalo], cost: 7 },
176
+ { nodes: [Cities.Detroit, Cities.Pittsburgh], cost: 6 },
177
+ { nodes: [Cities.Buffalo, Cities.Pittsburgh], cost: 7 },
178
+ { nodes: [Cities.Buffalo, Cities.NewYork], cost: 8 },
179
+ { nodes: [Cities.Pittsburgh, Cities.Washington], cost: 6 },
180
+ { nodes: [Cities.Pittsburgh, Cities.Raleigh], cost: 7 },
181
+ { nodes: [Cities.Boston, Cities.NewYork], cost: 3 },
182
+ { nodes: [Cities.NewYork, Cities.Philadelphia], cost: 0 },
183
+ { nodes: [Cities.Philadelphia, Cities.Washington], cost: 3 },
184
+ { nodes: [Cities.Washington, Cities.Norfolk], cost: 5 },
185
+ { nodes: [Cities.Norfolk, Cities.Raleigh], cost: 3 },
186
+ { nodes: [Cities.Raleigh, Cities.Atlanta], cost: 7 },
187
+ { nodes: [Cities.Raleigh, Cities.Savannah], cost: 7 },
188
+ { nodes: [Cities.Atlanta, Cities.Savannah], cost: 7 },
189
+ { nodes: [Cities.Savannah, Cities.Jacksonvile], cost: 0 },
190
+ { nodes: [Cities.Jacksonvile, Cities.Tampa], cost: 4 },
191
+ { nodes: [Cities.Tampa, Cities.Miami], cost: 4 },
192
+ ],
193
+ layout: 'Landscape',
194
+ polygons: [
195
+ {
196
+ region: Regions.Brown,
197
+ points: [
198
+ [930, 423],
199
+ [1082, 331],
200
+ [1075, 231],
201
+ [716, 249],
202
+ [758, 303],
203
+ [897, 406],
204
+ ],
205
+ },
206
+ {
207
+ region: Regions.Green,
208
+ points: [
209
+ [898, 405],
210
+ [762, 499],
211
+ [758, 643],
212
+ [887, 744],
213
+ [938, 688],
214
+ [889, 618],
215
+ [1014, 432],
216
+ [985, 387],
217
+ [929, 420],
218
+ ],
219
+ },
220
+ {
221
+ region: Regions.Yellow,
222
+ points: [
223
+ [895, 403],
224
+ [760, 499],
225
+ [630, 393],
226
+ [607, 345],
227
+ [608, 275],
228
+ [439, 162],
229
+ [654, 114],
230
+ [771, 245],
231
+ [716, 247],
232
+ [758, 301],
233
+ ],
234
+ },
235
+ {
236
+ region: Regions.Red,
237
+ points: [
238
+ [606, 344],
239
+ [476, 371],
240
+ [445, 597],
241
+ [546, 664],
242
+ [758, 641],
243
+ [760, 497],
244
+ [629, 391],
245
+ ],
246
+ },
247
+ {
248
+ region: Regions.Purple,
249
+ points: [
250
+ [606, 342],
251
+ [476, 369],
252
+ [347, 395],
253
+ [313, 301],
254
+ [18, 287],
255
+ [18, 165],
256
+ [76, 74],
257
+ [438, 160],
258
+ [607, 275],
259
+ ],
260
+ },
261
+ {
262
+ region: Regions.Cyan,
263
+ points: [
264
+ [18, 285],
265
+ [20, 429],
266
+ [142, 583],
267
+ [445, 594],
268
+ [476, 368],
269
+ [346, 392],
270
+ [312, 300],
271
+ ],
272
+ },
273
+ ],
274
+ };
275
+ exports.mapRecharged = {
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
+ };