diff --git a/secret/mineSweeper/counter.js b/secret/mineSweeper/counter.js new file mode 100644 index 0000000..8e9f78a --- /dev/null +++ b/secret/mineSweeper/counter.js @@ -0,0 +1,14 @@ +'use strict' + +document.addEventListener('DOMContentLoaded', () => { + const bombsSlider = document.getElementById('bombs'); + const bombsValue = document.getElementById('bombsValue'); + + // Update the displayed number of bombs when the slider value changes + bombsSlider.addEventListener('input', () => { + bombsValue.textContent = bombsSlider.value; + }); + + // Initialize the displayed value on page load + bombsValue.textContent = bombsSlider.value; +}); diff --git a/secret/mineSweeper/index.html b/secret/mineSweeper/index.html index eabf508..22c9313 100644 --- a/secret/mineSweeper/index.html +++ b/secret/mineSweeper/index.html @@ -1,30 +1,44 @@ +
+ + +