diff --git a/ms.html b/ms.html index e800e88..1a7d13b 100644 --- a/ms.html +++ b/ms.html @@ -19,11 +19,6 @@
- -
Mines Remaining:
@@ -39,22 +34,6 @@
- -
- diff --git a/ms.js b/ms.js index dda6f07..3a86f98 100644 --- a/ms.js +++ b/ms.js @@ -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").