From 40b70501e9505b731938a1c2b9ecab34f72cf8b0 Mon Sep 17 00:00:00 2001
From: spbRusty <42145047+spbRusty@users.noreply.github.com>
Date: Mon, 26 Aug 2024 09:19:46 +0300
Subject: [PATCH] Update script.js
---
script.js | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/script.js b/script.js
index 6a1a9c9..720a3d8 100644
--- a/script.js
+++ b/script.js
@@ -1,5 +1,3 @@
-window.Telegram.WebApp.ready();
-
function showError(message) {
const errorModal = document.createElement('div');
errorModal.className = 'error-modal';
@@ -15,11 +13,11 @@ function showError(message) {
}
function callDonat() {
- if (window.Telegram && window.Telegram.WebApp) {
- window.Telegram.WebApp.sendData('/help');
- } else {
- showError('Telegram Web App API не доступен');
- }
+ //if (window.Telegram && window.Telegram.WebApp) {
+ Telegram.WebApp.sendData('/help');
+ //} else {
+ // showError('Telegram Web App API не доступен');
+ //}
}
let playerScore = 0;
@@ -50,7 +48,7 @@ function determineWinner(playerChoice, computerChoice) {
function updateScoreboard() {
const scoreboard = document.getElementById('result-message');
- scoreboard.innerHTML = `Счёт11:
Вы - ${playerScore}, Компьютер - ${computerScore}
Раунд ${roundsPlayed + 1}`;
+ scoreboard.innerHTML = `Счёт12:
Вы - ${playerScore}, Компьютер - ${computerScore}
Раунд ${roundsPlayed + 1}`;
}
function checkGameWinner() {