#pragma once #include struct Sim; // The whole simulation as bytes, to hand a player joining a game already running. The game state is plain data that // lays out the same on every platform (no pointers or heap inside the structs; see Attack and FixedList), so most of it // goes as it sits in memory, and the few lists as a count and their items. It starts with a layout signature (the sizes // of everything), so a build that lays things out differently refuses it rather than loading garbage. The menu and // everything else this screen alone sees isn't part of it, nor is the bots' map of the world, rebuilt on loading. std::string state_save(Sim& sim); bool state_load(Sim& sim, const std::string& bytes);