Skip to content

Commit

Permalink
Add gambling.js script to index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
RobloxEnderman committed Apr 23, 2024
1 parent a4998ff commit 2b9a8c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<title>Clicker Game</title>
<link rel="stylesheet" href="styles.css">
<script src="save.js"></script>
<script src="gambling.js"></script>
</head>
<body>
<link rel="icon" type="image/x-icon" href="favicon.ico">
Expand Down Expand Up @@ -60,7 +61,7 @@ <h1 id="counter" class="counter">0</h1>
showMessage("Insufficient funds!");
}
});

function updateCounter() {
count += clickValue;
counterEl.textContent = count;
Expand All @@ -75,8 +76,8 @@ <h1 id="counter" class="counter">0</h1>
}

function confirmReset() {
const answer = prompt("WARNING: THIS WILL DELETE YOUR SAVE FILE AND START OVER!!To confirm the reset, what is the result of 10 + 5?");
if (answer === "15") {
const answer = prompt("WARNING: THIS WILL DELETE YOUR SAVE FILE AND START OVER!!To confirm the reset, what is the result of 100 + 5?");
if (answer === "105") {
resetGame();
} else {
showMessage("Incorrect answer. Reset not confirmed.");
Expand Down

0 comments on commit 2b9a8c0

Please sign in to comment.