Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +2 -1
static/script.js
CHANGED
|
@@ -117,7 +117,7 @@ function createShopItem(coin, index) {
|
|
| 117 |
Cost: $${coin.price.toFixed(2)}<br>
|
| 118 |
Value: $${coin.value.toFixed(2)}<br>
|
| 119 |
Win rate: ${coin.winrate.toFixed(2)}<br>
|
| 120 |
-
${coin.
|
| 121 |
`;
|
| 122 |
|
| 123 |
shopCoin.appendChild(coinPrice);
|
|
@@ -181,4 +181,5 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 181 |
document.getElementById("generate-coin").onclick = generateCoin;
|
| 182 |
document.getElementById("submit-score").onclick = submitScore;
|
| 183 |
document.getElementById("play-again").onclick = resetGame;
|
|
|
|
| 184 |
});
|
|
|
|
| 117 |
Cost: $${coin.price.toFixed(2)}<br>
|
| 118 |
Value: $${coin.value.toFixed(2)}<br>
|
| 119 |
Win rate: ${coin.winrate.toFixed(2)}<br>
|
| 120 |
+
${coin.bonus !== 'none' ? `Bonus: ${coin.bonus}` : ''}
|
| 121 |
`;
|
| 122 |
|
| 123 |
shopCoin.appendChild(coinPrice);
|
|
|
|
| 181 |
document.getElementById("generate-coin").onclick = generateCoin;
|
| 182 |
document.getElementById("submit-score").onclick = submitScore;
|
| 183 |
document.getElementById("play-again").onclick = resetGame;
|
| 184 |
+
document.getElementById("coin").style.backgroundColor = coins[0].color;
|
| 185 |
});
|