Minesweeper's JavaScript realisation