Closed waynenilsen closed 9 years ago
Thank you for your contribution! I was thinking about to implement this, but in original minesweeper neighbors will be opened only when number cell have same number of marked neighbors.
I will check and merge this when will come home.
about on_edge
: maybe will be better to do comething like:
fn get_neighbour_inds
which return slice of u32
numbers, or
fn bypass_neighbour
which takes closure and passes to it valid inds
Merged :+1: Thank you!
The game "clicks" on unrevealed, unmarked neighbors for you. This makes solving minesweeper puzzles much faster.
This is a little bit "fast and dirty" but I wanted to get something done and it was neat to actually change the behavior of a game (that there is no way I could have created from scratch). One refactor that I think would be useful would be to add functions to check for a board position on an edge. Maybe adding an enum and a function to field such as
fn on_edge(e: Edge, i : u32) -> bool
and the enumEdge { Top, Bottom, Left, Right, }