minesweeper in JavaScript