Minesweeper implementation in Swift