mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:00:43 +00:00
added Black Sea
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"name": "BlackSea",
|
||||
"width": 1500,
|
||||
"height": 1100,
|
||||
"nations": [
|
||||
{
|
||||
"coordinates": [
|
||||
122,
|
||||
647
|
||||
],
|
||||
"name": "Bulgaria",
|
||||
"strength": 1
|
||||
},
|
||||
{
|
||||
"coordinates": [
|
||||
513,
|
||||
929
|
||||
],
|
||||
"name": "Turkiye",
|
||||
"strength": 2
|
||||
},
|
||||
{
|
||||
"coordinates": [
|
||||
123,
|
||||
237
|
||||
],
|
||||
"name": "Romania",
|
||||
"strength": 1
|
||||
},
|
||||
{
|
||||
"coordinates": [
|
||||
300,
|
||||
188
|
||||
],
|
||||
"name": "Maldova",
|
||||
"strength": 1
|
||||
},
|
||||
{
|
||||
"coordinates": [
|
||||
737,
|
||||
120
|
||||
],
|
||||
"name": "Ukraine",
|
||||
"strength": 1
|
||||
},
|
||||
{
|
||||
"coordinates": [
|
||||
1180,
|
||||
354
|
||||
],
|
||||
"name": "Russia",
|
||||
"strength": 3
|
||||
},
|
||||
{
|
||||
"coordinates": [
|
||||
1362,
|
||||
722
|
||||
],
|
||||
"name": "Georgia",
|
||||
"strength": 1
|
||||
},
|
||||
{
|
||||
"coordinates": [
|
||||
1382,
|
||||
943
|
||||
],
|
||||
"name": "Armenia",
|
||||
"strength": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
File diff suppressed because one or more lines are too long
@@ -22,7 +22,8 @@ export enum GameMap {
|
||||
Europe = "Europe",
|
||||
Mena = "Mena",
|
||||
NorthAmerica = "North America",
|
||||
Oceania = "Oceania"
|
||||
Oceania = "Oceania",
|
||||
BlackSea = "Black Sea"
|
||||
}
|
||||
|
||||
export enum GameType {
|
||||
|
||||
@@ -28,7 +28,8 @@ const MAP_FILE_NAMES: Record<GameMap, string> = {
|
||||
[GameMap.Europe]: 'Europe',
|
||||
[GameMap.Mena]: 'Mena',
|
||||
[GameMap.NorthAmerica]: 'NorthAmerica',
|
||||
[GameMap.Oceania]: 'Oceania'
|
||||
[GameMap.Oceania]: 'Oceania',
|
||||
[GameMap.BlackSea]: 'BlackSea',
|
||||
};
|
||||
|
||||
class GameMapLoader {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { TerrainTile } from '../core/game/Game';
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
const mapName = "WorldMap"
|
||||
const mapName = "BlackSea"
|
||||
|
||||
interface Coord {
|
||||
x: number;
|
||||
@@ -204,8 +204,10 @@ function processOcean(map: Terrain[][]) {
|
||||
const queue: Coord[] = [];
|
||||
if (map[0][0].type == TerrainType.Water) {
|
||||
queue.push({ x: 0, y: 0 })
|
||||
} else {
|
||||
} else if (map[map.length - 1][map[0].length - 1].type == TerrainType.Water) {
|
||||
queue.push({ x: map.length - 1, y: map[0].length - 1 })
|
||||
} else {
|
||||
queue.push({ x: 0, y: map[0].length - 1 })
|
||||
}
|
||||
const visited = new Set<string>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user