Solver for mine-sniffer, a variant of minesweeper