Classic minesweeper game in HTML5 and Javascript