pad turns at the end on replay (#256)

This commit is contained in:
evanpelle
2025-03-15 13:38:01 -07:00
committed by GitHub
parent c0d6889e4d
commit 4fdc570921
+8
View File
@@ -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;
}