Import/export current field #79
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan: Serialise the field, including all of its properties. Well, maybe some transient properties, but whatever. Just store a binary array of where the mines are, and then the flags, and which are uncovered. Or instead of a binary array, store the seed and the first click, and then "emulate" what would happen. Also store a version number so that old, incompatible seeds don't work. So maybe don't store a seed to make it more future-proof? Serialise it into JSON, maybe do some base64 or whatever, minor compression, probably not necessary though.
When loading the field, make sure that it is consistent: number of mines, squares, width x height, etc.