BeforeSurrender beta
Interface of @v12-engine/engine
ts
export interface BeforeSurrenderA player is about to give up (see surrender): call it off with a reason, as a game that does not let them before a time
Members
cancel
ts
cancel(reason?: MessageRef): void;Stops it. The reason is what the player is told, where this hook tells them (reason)
cancelled
ts
cancelled: boolean;Whether a handler has called it off; set by cancel()
player
ts
readonly player: PlayerId;The player about to give up
reason
ts
reason?: MessageRef;What the player is told of why they cannot give up