I propose the following format:
So you can see that the format would be pretty simple. It should be quite easy to write programs to parse a format like this, and to write boards into it. A program that lets you view a minesweeper game by stepping through the clicks (forward and back) should be pretty simple too. And I think anyone with intimate knowledge of the video formats would be able to write a program to convert a video into this format, for easy viewing and distribution.
Code: Select all
4 bytes: height (1 byte), width (1 byte), number of mines (2 bytes) in the board. 2-byte blocks: row and column for each mine, arranged in "reading" (top-left most) order. (Optional for easier reading) spacer: three FF bytes, since this wouldn't ever occur naturally. 3-byte blocks: move data. row and column of the square (1 byte each) and then for the move, something like this: - x0 for button press, x1 for button release, x2 for button click - 1x for left click, 2x for right click, 3x for left click chord (right button is held), 4x for right click chord (left button is held), 52 for a complete chord (both buttons pressed and released together)