fix: real project README and save-file version validation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
claude (duplicate_chess)
2026-05-19 01:18:35 -04:00
parent ead4839df4
commit 5db04109a2
3 changed files with 32 additions and 42 deletions
+3
View File
@@ -21,5 +21,8 @@ export function deserialize(json: string): HistoryEntry[] {
if (data.variant !== 'duplicate-chess' || !Array.isArray(data.moves)) {
throw new Error('Not a duplicate-chess save file');
}
if (data.version !== 1) {
throw new Error('Unsupported save version');
}
return data.moves;
}