implement minesweeper in terms of grid