diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/lib94/lib94.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/lib94/lib94.hpp b/include/lib94/lib94.hpp index 0766af7..71ec68e 100644 --- a/include/lib94/lib94.hpp +++ b/include/lib94/lib94.hpp @@ -63,6 +63,15 @@ namespace lib94 { std::vector<instruction> instructions; }; + //serialize a warrior in such a way that it can be read back by deserialize_warrior. + //does not consider name and author. + void serialize_warrior(const warrior *the_warrior, std::vector<uint8_t> &into); + + //deserialize a warrior that has been serialized by serialize_warrior. + //no error checking is performed. + //does not consider name and author. + warrior *deserialize_warrior(const uint8_t *from); + //this seeds the prng used to place warriors into the core at the start of a round //if this is never called, 0 is used as a seed and the placements are deterministic. void seed_prng(uint_fast64_t seed); |