Import/export current field #79

Open
opened 2020-08-06 18:19:17 +02:00 by FWDekker · 2 comments
Owner
No description provided.
FWDekker added this to the v1.0.0 milestone 2020-08-13 13:19:40 +02:00
FWDekker self-assigned this 2020-08-13 13:23:44 +02:00
Author
Owner

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.

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.
Author
Owner

When loading the field, make sure that it is consistent: number of mines, squares, width x height, etc.

When loading the field, make sure that it is consistent: number of mines, squares, width x height, etc.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tools/minesweeper#79
No description provided.