Working Minesweeper engine implementation.