User prompt
Hangisayının katıdır cümlesi yazan ve üstündeki rakam kısmını bir assets yap
User prompt
54 sayısı hangi sayının katıdır kısmını bir dikdörgen olarak assets yap
User prompt
Biraz daha yukarı al
User prompt
2. Ekrandaki ortadaki büyük yazan rakamın üstüne al
User prompt
Tebrikler yazısını biraz üste al
User prompt
Sayısı Hangi Sayının Katıdır? Yaz sayıyı bul yerine
User prompt
Yeniden başla butonunu sil
User prompt
Yeniden başla butonunun üstündeki butun kodlamayı sil
User prompt
Yenideb başla butonuna bastiğimde puansayısını 0 la
User prompt
Yeniden başla butonuna basılınca oyun baştan başlasın
User prompt
Yeniden başla butonuna basılırsa puansayisi sıfırlansın
User prompt
Puan sayısı başta 0 olsun ve ekranda her tebrikler yazdığında tebrikler denilene kadar 2. Ekrana kaç kere dokunulduysa o sayıyı 100 den çıkarıp puansayisi na eklesin
User prompt
Puansayisi neden artmıyor
User prompt
Puan kısmı artmıyor
User prompt
2. Ekrandaki puan sayısı ekrana her tıkladığımda 1 artsın
User prompt
Please fix the bug: 'Uncaught ReferenceError: puansayisi is not defined' in or related to this line: 'puansayisi++;' Line Number: 679
User prompt
Puansayisi 2. Ekranda ekrana her dokunmamda bir artsın
User prompt
Please fix the bug: 'Uncaught ReferenceError: puansayisi is not defined' in or related to this line: 'puansayisi++;' Line Number: 678
User prompt
Puan sayısı ekrandaki tıklama sayısını saysın
User prompt
Anasayfa yazısının altına Puan yaz : bir rakam olucak o rakamın ismide puansayisi olsun
User prompt
Please fix the bug: 'Uncaught ReferenceError: tapCountText is not defined' in or related to this line: 'if (tapCountText) {' Line Number: 432
User prompt
Kodlarınıda temizle
User prompt
Puan kısmını sil tamamen
User prompt
Puan kısmındaki rakam her tebrikler yazdığında o kadar artsın
User prompt
2. Ekranda puan kısmı kalmaya devam etmeli
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 // Black background }); /**** * Game Code ****/ // --- GLOBALS --- var countingDirection = 1; // 1: up, -1: down var startNumber = 0; var targetNumber = 10; var currentNumber = 0; var gameStarted = false; // --- LANGUAGE SUPPORT --- var LANGUAGES = [{ code: "en", label: "English" }, { code: "tr", label: "Türkçe" }]; var lang = "tr"; // default language // Localization dictionary var L10N = { tr: { increase: "Artarak", decrease: "Azalarak", selectTarget: "Hedef Seç", selectDirection: "Yön Seç", win: "Tebrikler!", tapToCount: "Ekrana tıkla", numberReading: function numberReading(n) { return getNumberReadingTR(n); } }, en: { increase: "Increasing", decrease: "Decreasing", selectTarget: "Select Target", selectDirection: "Select Direction", win: "Congratulations!", tapToCount: "Tap to count", numberReading: function numberReading(n) { return getNumberReadingEN(n); } } }; // UI elements var numberText = null; var numberReadingText = null; var infoText = null; var optionButtons = []; var directionButtons = []; var selectedTarget = null; var selectedDirection = null; var langButtons = []; var selectText = null; // Make selectText global for cleanup // --- UI HELPERS --- // Create a button as a colored box with text, returns a Container function createButton(label, x, y, width, height, color, onTap) { var btn = new Container(); var box = btn.attachAsset('buttonBox', { width: width, height: height, color: color, anchorX: 0.5, anchorY: 0.5 }); var txt = new Text2(label, { size: 80, fill: 0xFFFFFF }); txt.anchor.set(0.5, 0.5); txt.x = 0; txt.y = 0; btn.addChild(txt); btn.x = x; btn.y = y; btn.interactive = true; btn.down = function (x, y, obj) { if (onTap) { onTap(); } }; return btn; } // --- GAME SETUP --- // Helper to check if a number is prime function isPrime(n) { if (n < 2) return false; for (var i = 2; i * i <= n; i++) { if (n % i === 0) return false; } return true; } // Show a random two-digit number (10-99) above 'Sayıyı bul' var randomNumber; do { randomNumber = Math.floor(Math.random() * 90) + 10; } while (isPrime(randomNumber)); var randomNumberText = new Text2("" + randomNumber, { size: 120, fill: 0xFFFFFF }); randomNumberText.anchor.set(0.5, 1); randomNumberText.x = 2048 / 2; // Move the bottom section higher up (e.g. 350px from bottom instead of 120px) randomNumberText.y = 2732 - 350; game.addChild(randomNumberText); // Add 'Sayiyi bul' text just below the random number var findNumberText = new Text2("Sayıyı bul", { size: 80, fill: 0xFFFFFF }); findNumberText.anchor.set(0.5, 0); findNumberText.x = 2048 / 2; findNumberText.y = randomNumberText.y + 20; game.addChild(findNumberText); // Add a restart button just below the 'Sayıyı bul' text var restartBtnW = 420; var restartBtnH = 140; var restartBtnY = findNumberText.y + findNumberText.height + 30; // Use a smaller font size for the button text to ensure it fits function createRestartButton(label, x, y, width, height, color, onTap) { var btn = new Container(); var box = btn.attachAsset('buttonBox', { width: width, height: height, color: color, anchorX: 0.5, anchorY: 0.5 }); // Use a smaller font size and tighter fit for the restart button var txt = new Text2(label, { size: 54, // Reduced from 64 to 54 to make the text smaller inside the button fill: 0xFFFFFF }); txt.anchor.set(0.5, 0.5); txt.x = 0; txt.y = 0; btn.addChild(txt); btn.x = x; btn.y = y; btn.interactive = true; btn.down = function (x, y, obj) { if (onTap) { onTap(); } }; return btn; } var restartButton = createRestartButton(lang === "en" ? "Restart" : "Yeniden Başla", 2048 / 2, restartBtnY + restartBtnH / 2, restartBtnW, restartBtnH, 0x4a90e2, function () { LK.getSound('click').play(); // Reset all global variables and UI state countingDirection = 1; startNumber = 0; targetNumber = 10; currentNumber = 0; gameStarted = false; selectedTarget = null; selectedDirection = null; // Refresh the random number and update its text (always two-digit) do { randomNumber = Math.floor(Math.random() * 90) + 10; } while (isPrime(randomNumber)); if (randomNumberText) { randomNumberText.setText("" + randomNumber); } // Clean up UI elements if any remain if (numberText) { numberText.destroy(); numberText = null; } if (numberReadingText) { numberReadingText.destroy(); numberReadingText = null; } if (infoText) { infoText.destroy(); infoText = null; } for (var i = 0; i < optionButtons.length; i++) { if (optionButtons[i]) optionButtons[i].destroy(); } optionButtons = []; for (var i = 0; i < directionButtons.length; i++) { if (directionButtons[i]) directionButtons[i].destroy(); } directionButtons = []; if (typeof backButton !== "undefined" && backButton) { backButton.destroy(); backButton = null; } game._congratsShown = false; showMenu(); }); restartButton.children[0].tint = 0xffffff; game.addChild(restartButton); // Show the pre-game menu: select target number and direction function showMenu() { gameStarted = false; selectedTarget = null; selectedDirection = null; // Remove previous UI if any if (numberText) { numberText.destroy(); numberText = null; } if (numberReadingText) { numberReadingText.destroy(); numberReadingText = null; } if (infoText) { infoText.destroy(); infoText = null; } for (var i = 0; i < optionButtons.length; i++) { optionButtons[i].destroy(); } optionButtons = []; for (var i = 0; i < directionButtons.length; i++) { if (directionButtons[i]) { directionButtons[i].destroy(); } } directionButtons = []; for (var i = 0; i < langButtons.length; i++) { langButtons[i].destroy(); } langButtons = []; // Remove infoText usage, but keep for cleanup infoText = null; // Remove back button if it exists (should not be visible in menu) if (typeof backButton !== "undefined" && backButton) { backButton.destroy(); backButton = null; } // --- LANGUAGE BUTTONS --- var langBtnW = 320, langBtnH = 100, langBtnGap = 40; var langBtnStartX = (2048 - (LANGUAGES.length * langBtnW + (LANGUAGES.length - 1) * langBtnGap)) / 2 + langBtnW / 2; var langBtnY = 120; for (var i = 0; i < LANGUAGES.length; i++) { (function (idx) { var l = LANGUAGES[idx]; var btn = createButton(l.label, langBtnStartX + idx * (langBtnW + langBtnGap), langBtnY, langBtnW, langBtnH, 0x888888, function () { lang = l.code; showMenu(); }); // Highlight selected language btn.children[0].tint = lang === l.code ? 0xff0000 : 0xffffff; langButtons.push(btn); game.addChild(btn); })(i); } // --- HEADER RECTANGLE --- var headerHeight = 320; // Increased height for a more vertically extended header var headerY = 420; // Moved header further down var headerAssetId = lang === "en" ? "centerCircle1" : "centerCircle"; var headerRect = game.attachAsset(headerAssetId, { width: 720, // 10% smaller than 800 height: headerHeight, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: headerY }); // So it gets cleaned up with the rest of the menu // Target number options (1-25) as a 5x5 grid var targets = []; for (var i = 1; i <= 25; i++) { targets.push(i); } var btnW = 220 * 1.1, // 10% larger btnH = 220 * 1.1; // 10% larger, keep square var gapX = 40; var gapY = 40; var gridCols = 5; var gridRows = 5; // Calculate total grid width and height var gridTotalWidth = gridCols * btnW + (gridCols - 1) * gapX; var gridTotalHeight = gridRows * btnH + (gridRows - 1) * gapY; // Center grid on screen var gridStartX = (2048 - gridTotalWidth) / 2 + btnW / 2; var gridStartY = (2732 - gridTotalHeight) / 2 + btnH / 2; for (var i = 0; i < targets.length; i++) { (function (idx) { var t = targets[idx]; var col = idx % gridCols; var row = Math.floor(idx / gridCols); var x = gridStartX + col * (btnW + gapX); var y = gridStartY + row * (btnH + gapY); var btn = createButton("" + t, x, y, btnW, btnH, 0x4a90e2, function () { selectTarget(t, idx); }); // If this target was previously selected, keep it red if (selectedTarget !== null && selectedTarget === idx) { btn.children[0].tint = 0xff0000; } optionButtons.push(btn); game.addChild(btn); })(i); } // (Removed 'Saymak istediğimiz sayıyı seçelim' text below the grid) // No direction buttons on the first page } // When a target number is selected function selectTarget(t, idx) { LK.getSound('click').play(); targetNumber = t; selectedTarget = idx; // Highlight selected for (var i = 0; i < optionButtons.length; i++) { // Make selected target button red, others white optionButtons[i].children[0].tint = i === idx ? 0xff0000 : 0xffffff; } // Animate selected button: jump up and down once var btn = optionButtons[idx]; tween.stop(btn, { y: true }); var originalY = btn.y; tween(btn, { y: originalY - 80 }, { duration: 240, easing: tween.cubicOut, onFinish: function onFinish() { tween(btn, { y: originalY }, { duration: 360, easing: tween.bounceOut }); } }); // Enable direction buttons after a target is selected for (var i = 0; i < directionButtons.length; i++) { directionButtons[i].directionActive = true; directionButtons[i].alpha = 1; } // Go to 2nd page (gameplay) immediately when a target is tapped startGame(); } // When a direction is selected function selectDirection(dir, idx) { LK.getSound('click').play(); countingDirection = dir; selectedDirection = idx; // Highlight selected for (var i = 0; i < directionButtons.length; i++) { // Make selected direction button red, others white directionButtons[i].children[0].tint = i === idx ? 0xff0000 : 0xffffff; // Animate selected direction button with jump effect if (i === idx) { tween.stop(directionButtons[i], { y: true }); var originalY = directionButtons[i].y; tween(directionButtons[i], { y: originalY - 80 }, { duration: 320, easing: tween.cubicOut, onFinish: function (btn, oy) { return function () { tween(btn, { y: oy }, { duration: 420, easing: tween.bounceOut }); }; }(directionButtons[i], originalY) }); } } // If target already selected, start game after 1 second if (selectedTarget !== null) { LK.setTimeout(function () { startGame(); }, 1000); } } // --- GAMEPLAY --- function startGame() { // Remove menu UI if (infoText) { infoText.destroy(); infoText = null; } for (var i = 0; i < optionButtons.length; i++) { optionButtons[i].destroy(); } optionButtons = []; for (var i = 0; i < directionButtons.length; i++) { directionButtons[i].destroy(); } directionButtons = []; // (tapCountText cleanup removed - not used anymore) // Remove "Saymak istediğimiz sayıyı seçelim" text if it exists if (typeof selectText !== "undefined" && selectText) { selectText.destroy(); selectText = null; } // Always start from 0, regardless of direction startNumber = 0; currentNumber = startNumber; // Show current number // Calculate size to cover 50% of the screen height (2732 * 0.5 = 1366px) // Text2 size is font size, so we estimate a bit smaller to fit: try 1200px numberText = new Text2("" + currentNumber, { size: 1200, fill: 0xFFFFFF }); numberText.anchor.set(0.5, 0.5); numberText.x = 2048 / 2; numberText.y = 2732 / 2; game.addChild(numberText); // --- GAMEPLAY --- if (numberReadingText) { numberReadingText.destroy(); numberReadingText = null; } // Dynamically fit numberReadingText to always fit on screen var readingString = L10N[lang].numberReading(currentNumber); var maxWidth = 2048 * 0.9; // 90% of screen width var maxHeight = 220; // Max font size var minFontSize = 80; var fontSize = maxHeight; var testText = null; do { if (testText) testText.destroy(); testText = new Text2(readingString, { size: fontSize, fill: 0xFFFFFF }); testText.anchor.set(0.5, 0); } while ((testText.width > maxWidth || testText.height > 300) && fontSize-- > minFontSize); if (testText) testText.destroy(); numberReadingText = new Text2(readingString, { size: fontSize, fill: 0xFFFFFF }); numberReadingText.anchor.set(0.5, 0); numberReadingText.x = 2048 / 2; // Move the number reading text higher up (was: numberText.y + numberText.height / 2 + 40) numberReadingText.y = numberText.y + numberText.height / 2 - 120; game.addChild(numberReadingText); gameStarted = true; // --- Add 'İleri' and 'Geri' overlays --- var ileriLabel = lang === "en" ? "Forward" : "İleri"; var ileriText = new Text2(ileriLabel, { size: 120, fill: 0xffffff }); ileriText.anchor.set(0.5, 0.5); ileriText.x = 2048 * 0.75; ileriText.y = 2732 / 2; game.addChild(ileriText); var geriLabel = lang === "en" ? "Back" : "Geri"; var geriText = new Text2(geriLabel, { size: 180, fill: 0xffffff }); geriText.anchor.set(0.5, 0.5); geriText.x = 2048 * 0.25; geriText.y = 2732 / 2; game.addChild(geriText); // Store for later removal game._ileriText = ileriText; game._geriText = geriText; // --- DIRECTION BUTTONS REMOVED FROM GAMEPLAY --- // No direction buttons in gameplay directionButtons = []; // --- BACK BUTTON IN GAMEPLAY --- if (typeof backButton !== "undefined" && backButton) { backButton.destroy(); backButton = null; } var backButtonLabel = lang === "en" ? "Back" : "Anasayfa"; var langBtnW = 320, langBtnH = 100; // match language button size // Create the back button using the same font size as 'Yeniden Başla' (54) // Define puansayisi if not already defined if (typeof puansayisi === "undefined") { var puansayisi = 0; } // Back button (Anasayfa) var backButton = new Container(); var backBox = backButton.attachAsset('buttonBox', { width: langBtnW, height: langBtnH, color: 0x888888, anchorX: 0.5, anchorY: 0.5 }); var backTxt = new Text2(backButtonLabel, { size: 54, // Match 'Yeniden Başla' font size fill: 0xFFFFFF }); backTxt.anchor.set(0.5, 0.5); backTxt.x = 0; backTxt.y = 0; backButton.addChild(backTxt); backButton.x = 2048 - 100 - langBtnW / 2; backButton.y = 100 + langBtnH / 2; backButton.interactive = true; backButton.down = function (x, y, obj) { // Defensive: prevent double tap if (!gameStarted) return; gameStarted = false; // Clean up gameplay UI if (numberText) { numberText.destroy(); numberText = null; } if (numberReadingText) { numberReadingText.destroy(); numberReadingText = null; } for (var i = 0; i < directionButtons.length; i++) { if (directionButtons[i]) directionButtons[i].destroy(); } directionButtons = []; if (typeof backButton !== "undefined" && backButton) { backButton.destroy(); backButton = null; } if (puanText) { puanText.destroy(); puanText = null; } showMenu(); }; backButton.children[0].tint = 0xffffff; game.addChild(backButton); // Add 'Puan: <puansayisi>' text below the Anasayfa button if (typeof puanText !== "undefined" && puanText) { puanText.destroy(); } var puanText = new Text2("Puan: " + puansayisi, { size: 80, fill: 0xffffff }); puanText.anchor.set(0.5, 0); puanText.x = backButton.x; puanText.y = backButton.y + langBtnH / 2 + 16; game.addChild(puanText); } // --- Number Reading Helper (Turkish) --- function getNumberReadingTR(n) { // Only works for 0-250, but covers all gameplay needs var birler = ["", "BİR", "İKİ", "ÜÇ", "DÖRT", "BEŞ", "ALTI", "YEDİ", "SEKİZ", "DOKUZ"]; var onlar = ["", "ON", "YİRMİ", "OTUZ", "KIRK", "ELLİ", "ALTMIŞ", "YETMİŞ", "SEKSEN", "DOKSAN"]; var yuzler = ["", "YÜZ", "İKİYÜZ"]; n = Math.floor(n); if (n < 0) { return ""; } if (n === 0) { return "SIFIR"; } if (n > 250) { return "" + n; } // fallback var y = Math.floor(n / 100); var o = Math.floor(n % 100 / 10); var b = n % 10; var parts = []; if (y > 0) { if (y === 1) { parts.push("YÜZ"); } else { parts.push(birler[y] + " YÜZ"); } } if (o > 0) { parts.push(onlar[o]); } if (b > 0) { parts.push(birler[b]); } return parts.join(" "); } // --- Number Reading Helper (English) --- function getNumberReadingEN(n) { // Only works for 0-250, covers all gameplay needs var ones = ["", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE"]; var tens = ["", "TEN", "TWENTY", "THIRTY", "FORTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY"]; var hundreds = ["", "ONE HUNDRED", "TWO HUNDRED"]; n = Math.floor(n); if (n < 0) { return ""; } if (n === 0) { return "ZERO"; } if (n > 250) { return "" + n; } // fallback var y = Math.floor(n / 100); var o = Math.floor(n % 100 / 10); var b = n % 10; var parts = []; if (y > 0) { if (y === 1 && o === 0 && b === 0) { parts.push("ONE HUNDRED"); } else { parts.push(ones[y] + " HUNDRED"); } } if (o > 0) { parts.push(tens[o]); } if (b > 0) { parts.push(ones[b]); } return parts.join(" "); } // --- GAME INTERACTION --- // On tap/click anywhere, increment or decrement number game.down = function (x, y, obj) { if (!gameStarted) { return; } // Remove 'İleri' and 'Geri' overlays on first tap if (game._ileriText) { game._ileriText.destroy(); game._ileriText = null; } if (game._geriText) { game._geriText.destroy(); game._geriText = null; } LK.getSound('click').play(); // --- PUAN SAYISI: Increase tap count and update puanText only in gameplay (2nd screen) --- if (gameStarted) { puansayisi++; if (typeof puanText !== "undefined" && puanText) { puanText.setText("Puan: " + puansayisi); } } // Increment if tapped on right half, decrement if tapped on left half if (x > 2048 / 2) { currentNumber += targetNumber; } else { currentNumber -= targetNumber; if (currentNumber < 0) { currentNumber = 0; } } // Animate numberText (scale up and back) only if numberText exists if (numberText) { tween(numberText, { scaleX: 1.2, scaleY: 1.2 }, { duration: 80, easing: tween.easeOut, onFinish: function onFinish() { if (numberText) { tween(numberText, { scaleX: 1, scaleY: 1 }, { duration: 80, easing: tween.easeIn }); } } }); } // Animate selected target button (jump effect) on every tap if (selectedTarget !== null && Array.isArray(optionButtons) && optionButtons[selectedTarget] && typeof optionButtons[selectedTarget].y !== "undefined") { var btn = optionButtons[selectedTarget]; tween.stop(btn, { y: true }); var originalY = btn.y; tween(btn, { y: originalY - 80 }, { duration: 240, easing: tween.cubicOut, onFinish: function onFinish() { tween(btn, { y: originalY }, { duration: 360, easing: tween.bounceOut }); } }); } // (Handled above with tapCount logic) numberText.setText("" + currentNumber); // Update number reading text if (numberReadingText) { // Dynamically fit numberReadingText to always fit on screen after increment/decrement var readingString = L10N[lang].numberReading(currentNumber); var maxWidth = 2048 * 0.9; var maxHeight = 220; var minFontSize = 80; var fontSize = maxHeight; var testText = null; do { if (testText) testText.destroy(); testText = new Text2(readingString, { size: fontSize, fill: 0xFFFFFF }); testText.anchor.set(0.5, 0); } while ((testText.width > maxWidth || testText.height > 300) && fontSize-- > minFontSize); if (testText) testText.destroy(); numberReadingText.setStyle({ size: fontSize }); numberReadingText.setText(readingString); } if (currentNumber === randomNumber) { // Show 'Tebrikler!' (Congratulations!) in the center of the screen var congratsText = new Text2(L10N[lang].win, { size: 220, fill: 0x00ff00 }); congratsText.anchor.set(0.5, 0.5); congratsText.x = 2048 / 2; congratsText.y = 2732 / 2; game.addChild(congratsText); // --- SCORE INCREASE BY RANDOM NUMBER EACH TIME TEBRIKLER IS SHOWN --- if (typeof totalScore === "undefined") { totalScore = 0; } totalScore += randomNumber; // Optionally, fade out after 2 seconds, but do NOT reset game automatically tween(congratsText, { alpha: 0 }, { duration: 1800, delay: 1200, onFinish: function onFinish() { congratsText.destroy(); // Do not destroy kalanText here, keep it visible // Do not call showMenu(); user must press back to return } }); // Refresh the random number and update its text after congrats (always two-digit) do { randomNumber = Math.floor(Math.random() * 90) + 10; } while (isPrime(randomNumber)); if (randomNumberText) { randomNumberText.setText("" + randomNumber); } } }; // --- GAME RESET --- // When game is reset, show menu again game.on('reset', function () { // Reset all global variables and UI state countingDirection = 1; startNumber = 0; targetNumber = 10; currentNumber = 0; gameStarted = false; selectedTarget = null; selectedDirection = null; // Reset all selections selectedTarget = null; selectedDirection = null; // Clean up UI elements if any remain if (numberText) { numberText.destroy(); numberText = null; } if (numberReadingText) { numberReadingText.destroy(); numberReadingText = null; } if (infoText) { infoText.destroy(); infoText = null; } for (var i = 0; i < optionButtons.length; i++) { if (optionButtons[i]) { optionButtons[i].destroy(); } } optionButtons = []; for (var i = 0; i < directionButtons.length; i++) { if (directionButtons[i]) { directionButtons[i].destroy(); } } directionButtons = []; game._congratsShown = false; showMenu(); }); // --- INITIALIZE --- showMenu(); // Play the start sound only once at the start of the game LK.getSound('startbeep').play(); ; // Play background music (loops by default) LK.playMusic('bgmusic');
===================================================================
--- original.js
+++ change.js
@@ -13,9 +13,8 @@
/****
* Game Code
****/
// --- GLOBALS ---
-var puansayisi = 0;
var countingDirection = 1; // 1: up, -1: down
var startNumber = 0;
var targetNumber = 10;
var currentNumber = 0;
@@ -647,12 +646,14 @@
game._geriText.destroy();
game._geriText = null;
}
LK.getSound('click').play();
- // --- PUAN SAYISI: Increase tap count and update puanText ---
- puansayisi++;
- if (typeof puanText !== "undefined" && puanText) {
- puanText.setText("Puan: " + puansayisi);
+ // --- PUAN SAYISI: Increase tap count and update puanText only in gameplay (2nd screen) ---
+ if (gameStarted) {
+ puansayisi++;
+ if (typeof puanText !== "undefined" && puanText) {
+ puanText.setText("Puan: " + puansayisi);
+ }
}
// Increment if tapped on right half, decrement if tapped on left half
if (x > 2048 / 2) {
currentNumber += targetNumber;