data structure:
1. The layout is a two-dimensional array, each of which is equivalent to an object (including: whether there is a thunder, surround mine, red flag / question mark, left button event, right-click event, right double-click event)
2. Random distribution mine: Randomly attached to the object in the two-dimensional array (whether there is a thunder).
3. Add numbers: If array a [i] [j] has thunder, then
A [i-1] [J-1], A [I-1] [J], A [I-1] [J 1]
a [i] [j-1], a [i] [j 1]
A [i 1], A [i 1] [J], A [i 1] [j] in the surrounding mine plus 1, according to this class, from A [0] [0 ] To a [m] [n], the mine can be added. 4. The graphic count is automatically depicted with the timing.
5. Click the event to trigger simultaneous graphic display.
6. Result: Statistical score, if the score exceeds the highest score, entry "Heroes"
Program operation steps:
1. Bray
2. Add numbers
3. Graphic count
4. Mine
5. Click (left right) event, program count
6. Graphic hidden display
Not very clear, look back and then analyze.