mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-28 17:24:18 +00:00
25 lines
557 B
TypeScript
25 lines
557 B
TypeScript
import {MutableAllianceRequest, Player} from "./Game";
|
|
import {GameImpl} from "./GameImpl";
|
|
|
|
|
|
export class AllianceRequestImpl implements MutableAllianceRequest {
|
|
|
|
constructor(private requestor_, private recipient_, private tickCreated: number, private game: GameImpl) { }
|
|
|
|
requestor(): Player {
|
|
return this.requestor_;
|
|
}
|
|
|
|
recipient(): Player {
|
|
return this.recipient_;
|
|
}
|
|
|
|
accept(): void {
|
|
this.game.acceptAllianceRequest(this)
|
|
}
|
|
reject(): void {
|
|
this.game.rejectAllianceRequest(this)
|
|
}
|
|
|
|
}
|