diff --git a/@sammo/game_logic/src/General.ts b/@sammo/game_logic/src/General.ts index a06a379..884ac72 100644 --- a/@sammo/game_logic/src/General.ts +++ b/@sammo/game_logic/src/General.ts @@ -155,4 +155,21 @@ export class General extends LazyEntityUpdater { } + public compareTurntime(other: General): number { + if(this._raw.turntime < other._raw.turntime){ + return -1; + } + if(this._raw.turntime > other._raw.turntime){ + return 1; + } + + if(this._raw.id < other._raw.id){ + return -1; + } + if(this._raw.id > other._raw.id){ + return 1; + } + return 0; + } + } \ No newline at end of file