Open richelbilderbeek opened 2 years ago
Make this test come true:
#ifdef FIX_ISSUE_478
// Saving a game and loading it, must result in the same game
{
const game g;
const std::string filename = "test.txt";
save(g, filename); // To prevent a bloated/Winnebago class
const game h = load(filename);
assert(g == h);
}
#endif // FIX_ISSUE_478
@richelbilderbeek I think writing by hand all input and output operators is going to be quite tedious and could anyway lead to brittle architecture. What about using the json library I use in my more recent projects with just one template save and load function?
Hi @swom, I am quite late with responding I see. Sorry for having gotten too sloppy :-) .
I would argue against using another library, as this demands an action of the whole team. If we get it 'for free' using CMake, then I'd definitely be up for it! Till then, a simple CSV would suffice.
Depends on:
It is important to be able to save the game state, for example, in bug reports or maybe in testing, where we can load a game state.