diff --git a/index.html b/index.html index 352882b..10cf925 100644 --- a/index.html +++ b/index.html @@ -179,5 +179,4 @@

- \ No newline at end of file diff --git a/js/validation.js b/js/validation.js index 8bb25d4..44dae07 100644 --- a/js/validation.js +++ b/js/validation.js @@ -1,6 +1,4 @@ document.addEventListener("DOMContentLoaded", () => { - const rowsInput = document.getElementById("rows"); - const columnsInput = document.getElementById("columns"); const playersInput = document.getElementById("players-count"); const startBtn = document.querySelector(".start-btn"); const validationMessage = document.getElementById("validation-message"); @@ -19,21 +17,19 @@ document.addEventListener("DOMContentLoaded", () => { }; const validateAllInputs = () => { - const invalidRows = !validateInput(rowsInput, 5, 30); - const invalidColumns = !validateInput(columnsInput, 5, 30); const invalidPlayers = !validateInput(playersInput, 2, 6); - if (invalidRows || invalidColumns || invalidPlayers) { + if (invalidPlayers) { startBtn.disabled = true; + startBtn.classList.add("disabled"); showValidationMessage(true); } else { startBtn.disabled = false; + startBtn.classList.remove("disabled"); showValidationMessage(false); } }; - rowsInput.addEventListener("input", validateAllInputs); - columnsInput.addEventListener("input", validateAllInputs); playersInput.addEventListener("input", validateAllInputs); startBtn.addEventListener("click", (event) => { @@ -43,5 +39,6 @@ document.addEventListener("DOMContentLoaded", () => { }); // Initial validation + validateAllInputs(); }); diff --git a/pages/game.html b/pages/game.html index 3f20291..0557df4 100644 --- a/pages/game.html +++ b/pages/game.html @@ -1,256 +1,245 @@ - - - - - - - - - - - - - - - - - - - - - Dots & Boxes Game - - - - - - - -
-
-
- -
-
- - - - - - - Back - -
+ + + + + + + + + + + + + + + + + + + + + + Dots & Boxes Game + + + + + + + +
+
+
+
-
- -
-

Select Avatar

-
-
- - +
+ + + + + + + + Back +
+
+ +
+

Select Avatar

+
+
+ + +
+
-
- -