mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:50:43 +00:00
pad turns at the end on replay (#256)
This commit is contained in:
@@ -315,6 +315,14 @@ export function decompressGameRecord(gameRecord: GameRecord) {
|
||||
turns.push(turn);
|
||||
lastTurnNum = turn.turnNumber;
|
||||
}
|
||||
const turnLength = turns.length;
|
||||
for (let i = turnLength; i < gameRecord.num_turns; i++) {
|
||||
turns.push({
|
||||
gameID: gameRecord.id,
|
||||
turnNumber: i,
|
||||
intents: [],
|
||||
});
|
||||
}
|
||||
gameRecord.turns = turns;
|
||||
return gameRecord;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user