" reveal all the mines 0 → K 0 → J " the board is 10x26 For ( N, 1, 10, 1 ) For ( O, 1, 26, 1 ) If ( N, O ) = ⁻ 1 Then 1 + J → J Output ( N, O, "X" ) End End End Pause " replace board with blank 1 → W For ( N, 1, 10, 1 ) For ( O, 1, 26, 1 ) Output ( N, O, " " ) If ( N, O ) = 0 Then 0 → W 0 → E End End End I partially implemented the functionality that clears the surrounding when revealing a zero, however it doesn’t fully capture the zero lake as implementing such functionality would make the program run even slower than it already does. Once finished loading the board, you start the game with your cursor over a randomly selected 0. " U represents percent loaded (all variables are single characters) " correctly position based on number of digits in U If U 0 and I + S 0 and J + T < 27 Then If ( I + S, J + T ) = ⁻ 1 θ + 1 →θ End End End Else " case when not on wall For ( S, ⁻ 1, 1, 1 ) For ( T, ⁻ 1, 1, 1 ) If ( I + S, J + T ) = ⁻ 1 θ + 1 →θ End End End "save mine counts to E θ→ ( I, J ) End End End
0 Comments
Leave a Reply. |