remove not used code

This commit is contained in:
Vaclav Tvrdik
2024-07-11 13:15:12 +02:00
parent 240d0bc213
commit da7f36539f
2 changed files with 1 additions and 37 deletions

17
ms.js
View File

@@ -162,12 +162,6 @@ class Minesweeper {
gameContainer.innerHTML = content;
//update input fields
// VT commented out
// document.getElementById("new_rows").value = this.options["rows"];
// document.getElementById("new_cols").value = this.options["cols"];
// document.getElementById("new_mines").value = this.options["mines"];
//setup status message
document.getElementById("mine_count").textContent =
this.options["mines"] - (this.falseMines + this.minesFound);
@@ -320,6 +314,7 @@ class Cell {
//create a new game
function newGame(opts = {}) {
game = new Minesweeper(opts);
console.log(game.gridToString());
}
window.onload = function () {
@@ -327,11 +322,6 @@ window.onload = function () {
document.
getElementById("new_game_button").
addEventListener("click", function () {
// VT commented out
// const opts = {
// rows: parseInt(document.getElementById("new_rows").value, 10),
// cols: parseInt(document.getElementById("new_cols").value, 10),
// mines: parseInt(document.getElementById("new_mines").value, 10) };
const opts = {
rows: 8,
cols: 8,
@@ -387,11 +377,6 @@ window.onload = function () {
}
});
//attach click to cheat button
document.getElementById("cheat_button").addEventListener("click", function () {
console.log(game.gridToString());
});
//attach click to validate button
document.
getElementById("validate_button").