mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-25 20:55:24 +00:00
nukes destroy boats
This commit is contained in:
@@ -233,6 +233,7 @@ export interface Game {
|
||||
nations(): Nation[]
|
||||
config(): Config
|
||||
displayMessage(message: string, type: MessageType, playerID: PlayerID | null): void
|
||||
boats(): Boat[]
|
||||
}
|
||||
|
||||
export interface MutableGame extends Game {
|
||||
@@ -241,6 +242,7 @@ export interface MutableGame extends Game {
|
||||
players(): MutablePlayer[]
|
||||
addPlayer(playerInfo: PlayerInfo, troops: number): MutablePlayer
|
||||
executions(): Execution[]
|
||||
boats(): MutableBoat[]
|
||||
}
|
||||
|
||||
export class TileEvent implements GameEvent {
|
||||
|
||||
@@ -10,6 +10,7 @@ import {AllianceRequestImpl} from "./AllianceRequestImpl";
|
||||
import {AllianceImpl} from "./AllianceImpl";
|
||||
import {ClientID} from "../Schemas";
|
||||
import {DisplayMessageEvent, MessageType} from "../../client/graphics/layers/EventsDisplay";
|
||||
import {BoatImpl} from "./BoatImpl";
|
||||
|
||||
export function createGame(terrainMap: TerrainMap, eventBus: EventBus, config: Config): Game {
|
||||
return new GameImpl(terrainMap, eventBus, config)
|
||||
@@ -57,6 +58,9 @@ export class GameImpl implements MutableGame {
|
||||
n.strength
|
||||
))
|
||||
}
|
||||
boats(): BoatImpl[] {
|
||||
return Array.from(this._players.values()).flatMap(p => p._boats)
|
||||
}
|
||||
nations(): Nation[] {
|
||||
return this.nations_
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user