completed minesweeper backend