Core split 1/6: save/load into game_save.py, validator into save_validate.py

SaveMixin carries save_state, the transactional candidate restore and the
slots; save_validate.py holds the pure document validator and comparison
helpers; limits.py the bounds shared by simulation, save and validator.
Verbatim moves, no behaviour change; Game re-exports the names tests use.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
db9979andClaude Fable 5.1 committed 2026-09-27 00:55:52 +02:00
1 parent a73baaef41
commit e062bb2c3a
4 files changed
+3589 -3464

No files matched your search

+24 -3464
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+16
View File
@@ -0,0 +1,16 @@
"""Hard bounds shared by the simulation, the save document and its validator.
They live outside ``game.py`` so the persistence mixin (``game_save``) and
the game itself import them from one place without a circular import.
"""
MAX_AIR_PICTURE_TRACKS = 512
MAX_TRACK_DISPLAY_ID_LEN = 16
MAX_OPZ_TRACK_LABELS = 1024
MAX_SAVED_ENTITIES = 512
MAX_ENEMY_TORPEDOES = 128
MAX_DECOYS = 128
# Save-document bounds for pending and live missiles/torpedoes.
MAX_SAVED_ASMS = 512
MAX_SAVED_PLAYER_TORPEDOES = 128
MAX_SAVED_ESSMS = 128
File diff suppressed because it is too large. Load diff