mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-04 18:52:03 +00:00
src/core/game/PlayerImpl.ts
This commit is contained in:
@@ -762,7 +762,6 @@ export class PlayerImpl implements Player {
|
||||
case UnitType.MIRVWarhead:
|
||||
return targetTile;
|
||||
case UnitType.Port:
|
||||
if (validTiles === null) throw new Error("validTiles is required");
|
||||
return this.portSpawn(targetTile, validTiles);
|
||||
case UnitType.Warship:
|
||||
return this.warshipSpawn(targetTile);
|
||||
@@ -803,7 +802,7 @@ export class PlayerImpl implements Player {
|
||||
return spawns[0].tile();
|
||||
}
|
||||
|
||||
portSpawn(tile: TileRef, validTiles: TileRef[]): TileRef | false {
|
||||
portSpawn(tile: TileRef, validTiles: TileRef[] | null): TileRef | false {
|
||||
const spawns = Array.from(
|
||||
this.mg.bfs(
|
||||
tile,
|
||||
|
||||
Reference in New Issue
Block a user