mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-17 05:34:37 +00:00
packing tiles for more efficient transfer
This commit is contained in:
@@ -46,7 +46,8 @@ export class PlayerImpl implements MutablePlayer {
|
||||
|
||||
private relations = new Map<Player, number>()
|
||||
|
||||
constructor(private gs: GameImpl, private readonly playerInfo: PlayerInfo, startPopulation: number) {
|
||||
|
||||
constructor(private gs: GameImpl, private _smallID: number, private readonly playerInfo: PlayerInfo, startPopulation: number) {
|
||||
this._name = playerInfo.name;
|
||||
this._targetTroopRatio = 1
|
||||
this._troops = startPopulation * this._targetTroopRatio;
|
||||
@@ -61,6 +62,7 @@ export class PlayerImpl implements MutablePlayer {
|
||||
name: this.name(),
|
||||
displayName: this.displayName(),
|
||||
id: this.id(),
|
||||
smallID: this.smallID(),
|
||||
type: this.type(),
|
||||
isAlive: this.isAlive(),
|
||||
tilesOwned: this.numTilesOwned(),
|
||||
@@ -73,6 +75,10 @@ export class PlayerImpl implements MutablePlayer {
|
||||
}
|
||||
}
|
||||
|
||||
smallID(): number {
|
||||
return this._smallID
|
||||
}
|
||||
|
||||
name(): string {
|
||||
return this._name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user