mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-04 15:52:41 +00:00
combine Game & MutableGame
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { PriorityQueue } from "@datastructures-js/priority-queue";
|
||||
import { Cell, Execution, MutableGame, Player, PlayerID, PlayerType, TerrainType, TerraNullius } from "../game/Game";
|
||||
import { Cell, Execution, Game, Player, PlayerID, PlayerType, TerrainType, TerraNullius } from "../game/Game";
|
||||
import { PseudoRandom } from "../PseudoRandom";
|
||||
import { MessageType } from '../game/Game';
|
||||
import { renderNumber } from "../../client/Utils";
|
||||
@@ -23,7 +23,7 @@ export class AttackExecution implements Execution {
|
||||
private _owner: Player
|
||||
private target: Player | TerraNullius
|
||||
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
|
||||
private border = new Set<TileRef>()
|
||||
|
||||
@@ -43,7 +43,7 @@ export class AttackExecution implements Execution {
|
||||
return false
|
||||
}
|
||||
|
||||
init(mg: MutableGame, ticks: number) {
|
||||
init(mg: Game, ticks: number) {
|
||||
if (!this.active) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cell, Execution, MutableGame, Player, MutableUnit, PlayerID, TerrainType, Unit, UnitType } from "../game/Game";
|
||||
import { Cell, Execution, Game, Player, MutableUnit, PlayerID, TerrainType, Unit, UnitType } from "../game/Game";
|
||||
import { PathFinder } from "../pathfinding/PathFinding";
|
||||
import { PathFindResultType } from "../pathfinding/AStar";
|
||||
import { PseudoRandom } from "../PseudoRandom";
|
||||
@@ -13,7 +13,7 @@ export class BattleshipExecution implements Execution {
|
||||
private _owner: Player
|
||||
private active = true
|
||||
private battleship: MutableUnit = null
|
||||
private mg: MutableGame = null
|
||||
private mg: Game = null
|
||||
|
||||
private pathfinder: PathFinder
|
||||
|
||||
@@ -32,7 +32,7 @@ export class BattleshipExecution implements Execution {
|
||||
) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.pathfinder = PathFinder.Mini(mg, 5000, false)
|
||||
this._owner = mg.player(this.playerID)
|
||||
this.mg = mg
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cell, Execution, MutableGame, Player, PlayerType, TerraNullius } from "../game/Game"
|
||||
import { Cell, Execution, Game, Player, PlayerType, TerraNullius } from "../game/Game"
|
||||
import { PseudoRandom } from "../PseudoRandom"
|
||||
import { simpleHash } from "../Util";
|
||||
import { AttackExecution } from "./AttackExecution";
|
||||
@@ -8,7 +8,7 @@ export class BotExecution implements Execution {
|
||||
private active = true
|
||||
private random: PseudoRandom;
|
||||
private attackRate: number
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
private neighborsTerraNullius = true
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export class BotExecution implements Execution {
|
||||
return false
|
||||
}
|
||||
|
||||
init(mg: MutableGame, ticks: number) {
|
||||
init(mg: Game, ticks: number) {
|
||||
this.mg = mg
|
||||
// this.neighborsTerra = this.bot.neighbors().filter(n => n == this.gs.terraNullius()).length > 0
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { consolex } from "../Consolex";
|
||||
import { Execution, MutableGame, Player, MutableUnit, PlayerID, UnitType } from "../game/Game";
|
||||
import { Execution, Game, Player, MutableUnit, PlayerID, UnitType } from "../game/Game";
|
||||
import { TileRef } from "../game/GameMap";
|
||||
|
||||
export class CityExecution implements Execution {
|
||||
|
||||
private player: Player
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
private city: MutableUnit
|
||||
private active: boolean = true
|
||||
|
||||
constructor(private ownerId: PlayerID, private tile: TileRef) { }
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.mg = mg
|
||||
this.player = mg.player(this.ownerId)
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { consolex } from "../Consolex";
|
||||
import { Cell, DefenseBonus, Execution, MutableGame, Player, MutableUnit, PlayerID, UnitType } from "../game/Game";
|
||||
import { Cell, DefenseBonus, Execution, Game, Player, MutableUnit, PlayerID, UnitType } from "../game/Game";
|
||||
import { manhattanDistFN, TileRef } from "../game/GameMap";
|
||||
|
||||
export class DefensePostExecution implements Execution {
|
||||
|
||||
private player: Player
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
private post: MutableUnit
|
||||
private active: boolean = true
|
||||
|
||||
@@ -13,7 +13,7 @@ export class DefensePostExecution implements Execution {
|
||||
|
||||
constructor(private ownerId: PlayerID, private tile: TileRef) { }
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.mg = mg
|
||||
this.player = mg.player(this.ownerId)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cell, Execution, MutableGame, Player, MutableUnit, PlayerID, TerrainType, UnitType } from "../game/Game";
|
||||
import { Cell, Execution, Game, Player, MutableUnit, PlayerID, TerrainType, UnitType } from "../game/Game";
|
||||
import { PathFinder } from "../pathfinding/PathFinding";
|
||||
import { PathFindResultType } from "../pathfinding/AStar";
|
||||
import { PseudoRandom } from "../PseudoRandom";
|
||||
@@ -12,7 +12,7 @@ export class DestroyerExecution implements Execution {
|
||||
private _owner: Player
|
||||
private active = true
|
||||
private destroyer: MutableUnit = null
|
||||
private mg: MutableGame = null
|
||||
private mg: Game = null
|
||||
|
||||
private target: MutableUnit = null
|
||||
private pathfinder: PathFinder
|
||||
@@ -28,7 +28,7 @@ export class DestroyerExecution implements Execution {
|
||||
) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.pathfinder = PathFinder.Mini(mg, 5000, false)
|
||||
this._owner = mg.player(this.playerID)
|
||||
this.mg = mg
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { consolex } from "../Consolex";
|
||||
import { Execution, MutableGame, Player, PlayerID } from "../game/Game";
|
||||
import { Execution, Game, Player, PlayerID } from "../game/Game";
|
||||
|
||||
export class DonateExecution implements Execution {
|
||||
|
||||
@@ -15,7 +15,7 @@ export class DonateExecution implements Execution {
|
||||
) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.sender = mg.player(this.senderID)
|
||||
this.recipient = mg.player(this.recipientID)
|
||||
if (this.troops == null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { consolex } from "../Consolex";
|
||||
import { AllPlayers, Execution, MutableGame, Player, PlayerID, PlayerType, UnitType } from "../game/Game";
|
||||
import { AllPlayers, Execution, Game, Player, PlayerID, PlayerType, UnitType } from "../game/Game";
|
||||
|
||||
export class EmojiExecution implements Execution {
|
||||
|
||||
@@ -15,7 +15,7 @@ export class EmojiExecution implements Execution {
|
||||
) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.requestor = mg.player(this.senderID)
|
||||
this.recipient = this.recipientID == AllPlayers ? AllPlayers : mg.player(this.recipientID)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cell, Execution, MutableGame, Game, Player, PlayerInfo, TerraNullius, PlayerType, Alliance, UnitType } from "../game/Game";
|
||||
import { Cell, Execution, Game, Player, PlayerInfo, TerraNullius, PlayerType, Alliance, UnitType } from "../game/Game";
|
||||
import { AttackIntent, BoatAttackIntentSchema, GameID, Intent, Turn } from "../Schemas";
|
||||
import { AttackExecution } from "./AttackExecution";
|
||||
import { SpawnExecution } from "./SpawnExecution";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllianceRequest, Cell, Difficulty, Execution, MutableGame, Player, PlayerInfo, PlayerType, Relation, TerrainType, TerraNullius, UnitType } from "../game/Game"
|
||||
import { AllianceRequest, Cell, Difficulty, Execution, Game, Player, PlayerInfo, PlayerType, Relation, TerrainType, TerraNullius, UnitType } from "../game/Game"
|
||||
import { PseudoRandom } from "../PseudoRandom"
|
||||
import { AttackExecution } from "./AttackExecution";
|
||||
import { TransportShipExecution } from "./TransportShipExecution";
|
||||
@@ -23,7 +23,7 @@ export class FakeHumanExecution implements Execution {
|
||||
|
||||
private active = true
|
||||
private random: PseudoRandom;
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
private player: Player = null
|
||||
|
||||
private enemy: Player | null = null
|
||||
@@ -36,7 +36,7 @@ export class FakeHumanExecution implements Execution {
|
||||
this.random = new PseudoRandom(simpleHash(playerInfo.id) + simpleHash(gameID))
|
||||
}
|
||||
|
||||
init(mg: MutableGame, ticks: number) {
|
||||
init(mg: Game, ticks: number) {
|
||||
this.mg = mg
|
||||
if (this.random.chance(10)) {
|
||||
// this.isTraitor = true
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { consolex } from "../Consolex";
|
||||
import { Cell, Execution, MutableGame, Player, MutableUnit, PlayerID, UnitType } from "../game/Game";
|
||||
import { Cell, Execution, Game, Player, MutableUnit, PlayerID, UnitType } from "../game/Game";
|
||||
import { TileRef } from "../game/GameMap";
|
||||
|
||||
export class MissileSiloExecution implements Execution {
|
||||
|
||||
private active = true
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
private player: Player
|
||||
private silo: MutableUnit
|
||||
|
||||
@@ -15,7 +15,7 @@ export class MissileSiloExecution implements Execution {
|
||||
) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.mg = mg
|
||||
this.player = mg.player(this._owner)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { nextTick } from "process";
|
||||
import { Cell, Execution, MutableGame, Player, PlayerID, MutableUnit, UnitType, TerraNullius } from "../game/Game";
|
||||
import { Cell, Execution, Game, Player, PlayerID, MutableUnit, UnitType, TerraNullius } from "../game/Game";
|
||||
import { PathFinder } from "../pathfinding/PathFinding";
|
||||
import { PathFindResultType } from "../pathfinding/AStar";
|
||||
import { PseudoRandom } from "../PseudoRandom";
|
||||
@@ -12,7 +12,7 @@ export class NukeExecution implements Execution {
|
||||
|
||||
private active = true
|
||||
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
|
||||
private nuke: MutableUnit
|
||||
|
||||
@@ -24,7 +24,7 @@ export class NukeExecution implements Execution {
|
||||
) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.mg = mg
|
||||
this.pathFinder = PathFinder.Mini(mg, 10_000, true)
|
||||
this.player = mg.player(this.senderID)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Config } from "../configuration/Config"
|
||||
import { Execution, MutableGame, Player, PlayerID, TerraNullius, UnitType } from "../game/Game"
|
||||
import { Execution, Game, Player, PlayerID, TerraNullius, UnitType } from "../game/Game"
|
||||
import { calculateBoundingBox, getMode, inscribed, simpleHash } from "../Util"
|
||||
import { GameImpl } from "../game/GameImpl"
|
||||
import { consolex } from "../Consolex"
|
||||
@@ -12,7 +12,7 @@ export class PlayerExecution implements Execution {
|
||||
private player: Player
|
||||
private config: Config
|
||||
private lastCalc = 0
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
private active = true
|
||||
|
||||
constructor(private playerID: PlayerID) {
|
||||
@@ -22,7 +22,7 @@ export class PlayerExecution implements Execution {
|
||||
return false
|
||||
}
|
||||
|
||||
init(mg: MutableGame, ticks: number) {
|
||||
init(mg: Game, ticks: number) {
|
||||
this.mg = mg
|
||||
this.config = mg.config()
|
||||
this.player = mg.player(this.playerID)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllPlayers, Cell, Execution, MutableGame, Player, MutableUnit, PlayerID, TerrainType, UnitType } from "../game/Game";
|
||||
import { AllPlayers, Cell, Execution, Game, Player, MutableUnit, PlayerID, TerrainType, UnitType } from "../game/Game";
|
||||
import { PathFinder } from "../pathfinding/PathFinding";
|
||||
import { PathFindResultType } from "../pathfinding/AStar";
|
||||
import { PseudoRandom } from "../PseudoRandom";
|
||||
@@ -10,7 +10,7 @@ import { manhattanDistFN, TileRef } from "../game/GameMap";
|
||||
export class PortExecution implements Execution {
|
||||
|
||||
private active = true
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
private port: MutableUnit
|
||||
private random: PseudoRandom
|
||||
private portPaths = new Map<MutableUnit, TileRef[]>()
|
||||
@@ -22,7 +22,7 @@ export class PortExecution implements Execution {
|
||||
) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.mg = mg
|
||||
this.random = new PseudoRandom(mg.ticks())
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { consolex } from "../Consolex";
|
||||
import { Execution, MutableGame, Player, PlayerID } from "../game/Game";
|
||||
import { Execution, Game, Player, PlayerID } from "../game/Game";
|
||||
|
||||
export class SetTargetTroopRatioExecution implements Execution {
|
||||
|
||||
@@ -10,7 +10,7 @@ export class SetTargetTroopRatioExecution implements Execution {
|
||||
constructor(private playerID: PlayerID, private targetTroopsRatio: number) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.player = mg.player(this.playerID)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Execution, MutableGame, Player, MutableUnit, Unit, UnitType } from "../game/Game";
|
||||
import { Execution, Game, Player, MutableUnit, Unit, UnitType } from "../game/Game";
|
||||
import { PathFinder } from "../pathfinding/PathFinding";
|
||||
import { PathFindResultType } from "../pathfinding/AStar";
|
||||
import { consolex } from "../Consolex";
|
||||
@@ -14,7 +14,7 @@ export class ShellExecution implements Execution {
|
||||
|
||||
}
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.pathFinder = PathFinder.Mini(mg, 2000, true, 10)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cell, Execution, MutableGame, Player, PlayerInfo, PlayerType } from "../game/Game"
|
||||
import { Cell, Execution, Game, Player, PlayerInfo, PlayerType } from "../game/Game"
|
||||
import { TileRef } from "../game/GameMap"
|
||||
import { BotExecution } from "./BotExecution"
|
||||
import { PlayerExecution } from "./PlayerExecution"
|
||||
@@ -7,14 +7,14 @@ import { getSpawnTiles } from "./Util"
|
||||
export class SpawnExecution implements Execution {
|
||||
|
||||
active: boolean = true
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
|
||||
constructor(
|
||||
private playerInfo: PlayerInfo,
|
||||
private tile: TileRef
|
||||
) { }
|
||||
|
||||
init(mg: MutableGame, ticks: number) {
|
||||
init(mg: Game, ticks: number) {
|
||||
this.mg = mg
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Execution, MutableGame, Player, PlayerID } from "../game/Game";
|
||||
import { Execution, Game, Player, PlayerID } from "../game/Game";
|
||||
|
||||
export class TargetPlayerExecution implements Execution {
|
||||
|
||||
@@ -10,7 +10,7 @@ export class TargetPlayerExecution implements Execution {
|
||||
constructor(private requestorID: PlayerID, private targetID: PlayerID) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.requestor = mg.player(this.requestorID)
|
||||
this.target = mg.player(this.targetID)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { MessageType } from '../game/Game';
|
||||
import { renderNumber } from "../../client/Utils";
|
||||
import { AllPlayers, Cell, Execution, MutableGame, MutableUnit, Player, PlayerID, UnitType } from "../game/Game";
|
||||
import { AllPlayers, Cell, Execution, Game, MutableUnit, Player, PlayerID, UnitType } from "../game/Game";
|
||||
import { PathFinder } from "../pathfinding/PathFinding";
|
||||
import { PathFindResultType } from "../pathfinding/AStar";
|
||||
import { distSortUnit } from "../Util";
|
||||
@@ -10,7 +10,7 @@ import { TileRef } from '../game/GameMap';
|
||||
export class TradeShipExecution implements Execution {
|
||||
|
||||
private active = true
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
private origOwner: Player
|
||||
private tradeShip: MutableUnit
|
||||
private index = 0
|
||||
@@ -26,7 +26,7 @@ export class TradeShipExecution implements Execution {
|
||||
) { }
|
||||
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.mg = mg
|
||||
this.origOwner = mg.player(this._owner)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Unit, Cell, Execution, MutableUnit, MutableGame, Player, PlayerID, TerraNullius, UnitType, TerrainType } from "../game/Game";
|
||||
import { Unit, Cell, Execution, MutableUnit, Game, Player, PlayerID, TerraNullius, UnitType, TerrainType } from "../game/Game";
|
||||
import { AttackExecution } from "./AttackExecution";
|
||||
import { MessageType } from '../game/Game';
|
||||
import { PathFinder } from "../pathfinding/PathFinding";
|
||||
@@ -16,7 +16,7 @@ export class TransportShipExecution implements Execution {
|
||||
|
||||
private active = true
|
||||
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
private attacker: Player
|
||||
private target: Player | TerraNullius
|
||||
|
||||
@@ -41,7 +41,7 @@ export class TransportShipExecution implements Execution {
|
||||
return false
|
||||
}
|
||||
|
||||
init(mg: MutableGame, ticks: number) {
|
||||
init(mg: Game, ticks: number) {
|
||||
this.lastMove = ticks
|
||||
this.mg = mg
|
||||
this.pathFinder = PathFinder.Mini(mg, 10_000, false, 2)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EventBus, GameEvent } from "../EventBus"
|
||||
import { Execution, MutableGame, Player, PlayerID } from "../game/Game"
|
||||
import { Execution, Game, Player, PlayerID } from "../game/Game"
|
||||
|
||||
export class WinEvent implements GameEvent {
|
||||
constructor(public readonly winner: Player) { }
|
||||
@@ -9,12 +9,12 @@ export class WinCheckExecution implements Execution {
|
||||
|
||||
private active = true
|
||||
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
init(mg: MutableGame, ticks: number) {
|
||||
init(mg: Game, ticks: number) {
|
||||
this.mg = mg
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { consolex } from "../../Consolex";
|
||||
import {AllianceRequest, Execution, MutableGame, Player, PlayerID} from "../../game/Game";
|
||||
import {AllianceRequest, Execution, Game, Player, PlayerID} from "../../game/Game";
|
||||
|
||||
export class AllianceRequestExecution implements Execution {
|
||||
private active = true
|
||||
private mg: MutableGame = null
|
||||
private mg: Game = null
|
||||
private requestor: Player;
|
||||
private recipient: Player
|
||||
|
||||
constructor(private requestorID: PlayerID, private recipientID: PlayerID) { }
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.mg = mg
|
||||
this.requestor = mg.player(this.requestorID)
|
||||
this.recipient = mg.player(this.recipientID)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { consolex } from "../../Consolex";
|
||||
import { AllianceRequest, Execution, MutableGame, Player, PlayerID } from "../../game/Game";
|
||||
import { AllianceRequest, Execution, Game, Player, PlayerID } from "../../game/Game";
|
||||
|
||||
export class AllianceRequestReplyExecution implements Execution {
|
||||
private active = true
|
||||
private mg: MutableGame = null
|
||||
private mg: Game = null
|
||||
private requestor: Player;
|
||||
private recipient: Player
|
||||
|
||||
constructor(private requestorID: PlayerID, private recipientID: PlayerID, private accept: boolean) { }
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.mg = mg
|
||||
this.requestor = mg.player(this.requestorID)
|
||||
this.recipient = mg.player(this.recipientID)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { consolex } from "../../Consolex";
|
||||
import { AllianceRequest, Execution, MutableGame, Player, PlayerID } from "../../game/Game";
|
||||
import { AllianceRequest, Execution, Game, Player, PlayerID } from "../../game/Game";
|
||||
|
||||
export class BreakAllianceExecution implements Execution {
|
||||
private active = true
|
||||
private requestor: Player;
|
||||
private recipient: Player
|
||||
private mg: MutableGame
|
||||
private mg: Game
|
||||
|
||||
constructor(private requestorID: PlayerID, private recipientID: PlayerID) { }
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
init(mg: Game, ticks: number): void {
|
||||
this.requestor = mg.player(this.requestorID)
|
||||
this.recipient = mg.player(this.recipientID)
|
||||
this.mg = mg
|
||||
|
||||
Reference in New Issue
Block a user