Javascript minesweeper