User prompt
seviyeyi geçtiğimizde seviyeyi geçtin diye bir yazı çıksın ve altındada sonraki seviye yazsın sonraki seviye yazısına tıkladığımızda sonraki seviyeye geçelim bide Kelime bulmaca oyununda oyuncu harfleri tek tek dokunarak değil, parmağını ekranda sürükleyerek bağlamalı. Telefon desenini çizer gibi, harfler sürüklenerek birleşsin ve kelime oluşsun.” ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'Uncaught TypeError: LK.getMusicVolume is not a function' in or related to this line: 'LK.playMusic('backgroundMusic', {' Line Number: 1234
User prompt
kelime bulma sistemini bir yuvarlak şeklinde yap ve harfleri sanki telefon deseni çiziyormuşuz gibi tutup sürükleyelim ve kelimeyi bulalım ve ayrıca oyuna bir arkaplan müziği ekle ayarlar kısmı olsun ve müzikğin sesini ayarlayabilelim ↪💡 Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1
User prompt
menüdeki herşey yani kısaca oyundaki her şey ingilizce olsun
User prompt
I want you to generate valid English words inside a longer word. Only use existing English dictionary words, not random syllables or letter combinations. Each word must have a real meaning in English. Do not invent new words and Do not repeat the same word in different levels
User prompt
oyunda 1000 seviye olsun ve her 300 bölümde zorluk seviyesi değişsin arada bir oyuncunun karşısına zor bölümlerde çıksın ve oyun hakkındaki herşey menüdeki hakkında kısmına yazılsın ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
kelime yanlış bilindiğinde kırmızı bir efekt kelimenin üzerinde olsun ve kelime sağa sola 2 saniye hareket etsin doğru bilindiğinde de yeşil bir efekt gelsin ve sağa sola yine 2 saniye hareket etsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
türkçe dil seçeneğini oyundan kaldır ve artık her kelime başına 5 coin kazanalım ve menüye bir hakkında kısmı ekle buraya oyunun hakkındakileri yaz nasıl oynandığına dair ki oyuncu oyunun nasıl oynandığını bilsin ve her 50 seviyede bir arkaplan ekle genellikle futuristik yerlerin fotoğrafı gibi olsun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
ingilizce dilini seçtiğimizde oyundaki bütün herşey ingilizce olsun bide türkçeyi seçtiğimizde kelimeleri türkçe alfabesiyle yaz ingilizceyi seçtiğimizde ingilizceyi kullan kelimeyi bulurken bir harfe bastığımızda onu sırayla 1,2,3 kelimenin üst tarafına koysun bir harfe bastğımızda onu ilk sıraya koysun ipucu kullandığımızda kelimenin içindeki harfin doğru yazılışındaki bir harfi üst taraftaki kutucuğa koysun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
menüdeyken başlata bastığımda kelime bulma yeri gelmiyor bunu düzelt ayrıca menüye dil seçenekleri kısmı ekle ve ordan türkçe veya ingilizceyi seçelim yani oyunu iki dildede oynaya bilelim
User prompt
bir ana sayfa yapalım başlat butonu olsun ve oyuncuyu kaldğı yerden geri başlatsın ayrıca her bir kelime bildiğin 10 para kazansın ve o paralarıda ipucu almak için kullansın ipucu almak için ayrı bir yer yap ve bir ipucu 50 para olsun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
en kolay seviye en uzun kelime orta seviyede uzun kelimenin içinde 1 kelime ve uzun kelim zor seviyedede uzun kelime ve uzun kelimenin içindeki 3 kelime uzun kelimenin içindeki kelimeleride türk dil kurumuna göre yap
User prompt
kullanılan kelimenin kendisi girilincede doğru sayılsın ve ayrıca kelimenin heceleri değil keliminenin içinden çıkabilecek kelimelerin hepsini girince doğru olup sonraki seviyeye geçilmesi lazım
User prompt
seviye bir bittikten sonra ve göndere basınca seviye 2 ye geçsin
User prompt
harflerin yerleri karıık olsun ve her seviyede 5 kelime olsun ben sana oyun içinde kullanacağın kelimeler bu kodun içerisinde # -*- coding: utf-8 -*- import requests from HTMLParser import HTMLParser import re class PageNumParser(HTMLParser): def handle_data(self, data): if "sayfanın" in data: getContent(int(re.search(r'\d+', data).group())) class wordParser(HTMLParser): def handle_starttag(self, tag, attrs): if tag == "a" and len(attrs) == 1: for attr in attrs: word = re.search(r"kelime=(.*)&cesit", attr[1]) print word.group(1) def getContent(totalPageCount): currentPage = 0 while totalPageCount > currentPage/60: pageURL = "http://tdk.gov.tr/index.php?option=com_yazimkilavuzu&view=yazimkilavuzu&kelime1=z&kategori1=yazim_listeli&ayn1=bas&konts=" + str(currentPage) response = requests.get(pageURL, headers={'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}, timeout=15) wordParser.feed(response.content.split('')[1].split(" ")[0]) currentPage = currentPage + 60 pageNumParser = PageNumParser() wordParser = wordParser() pageURL = "http://tdk.gov.tr/index.php?option=com_yazimkilavuzu&view=yazimkilavuzu&kelime1=z&kategori1=yazim_listeli&ayn1=bas&konts=0" response = requests.get(pageURL, headers={'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}, timeout=15) pageNumParser.feed(response.content.split('')[1].split("")[0])
User prompt
kelimeyi doğru bildiğimizde sonraki seviyeye geçelim ve oyunda 150 seviye olsun
User prompt
oyun tüm ekranı kaplasın ve yapacağımız kelimeyi söylemesin
Code edit (1 edits merged)
Please save this source code
User prompt
Kelime Avı - Harf Ustası
Initial prompt
bir kelime bulma oyunu yapalım harflerle kelime bulalım ismi en uzun kelimenin içinden diğer kelimeleri bulalım ve oyundaki kelimeleri Türk Dil Kurumundan seç ve bu oyunda sonsuz level olsun oyun hiç bitmesin oyuncu zorlandığı zaman bir harf çıkarabilmek için bir ipucu kutusu olsun ama 2 hakkı olsun her 50 levelde bir 1 ipucu kutusu hediyesi verilsin
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var LetterTile = Container.expand(function (letter, index) {
var self = Container.call(this);
var background = self.attachAsset('letterTile', {
anchorX: 0.5,
anchorY: 0.5
});
var letterText = new Text2(letter.toUpperCase(), {
size: 50,
fill: 0x333333
});
letterText.anchor.set(0.5, 0.5);
self.addChild(letterText);
self.letter = letter;
self.index = index;
self.isSelected = false;
self.background = background;
self.letterText = letterText;
self.setSelected = function (selected) {
self.isSelected = selected;
if (selected) {
self.background.tint = 0x4CAF50;
} else {
self.background.tint = 0xffffff;
}
};
self.down = function (x, y, obj) {
if (!self.isSelected) {
selectedLetters.push(self);
self.setSelected(true);
updateCurrentWord();
LK.getSound('buttonClick').play();
}
};
return self;
});
var WordItem = Container.expand(function (word, points) {
var self = Container.call(this);
var background = self.attachAsset('wordBackground', {
anchorX: 0,
anchorY: 0.5
});
background.alpha = 0.8;
var wordText = new Text2(word.toUpperCase(), {
size: 36,
fill: 0x333333
});
wordText.anchor.set(0, 0.5);
wordText.x = 15;
self.addChild(wordText);
var pointText = new Text2('+' + points, {
size: 30,
fill: 0x4CAF50
});
pointText.anchor.set(1, 0.5);
pointText.x = 580;
self.addChild(pointText);
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xffffff
});
/****
* Game Code
****/
// Game data and word lists - 150 levels total
var wordLists = [
// Level 1-10: Basic words
{
word: "OKUYUN",
words: ["OKU", "YUN", "YON", "KONU", "OYUN"]
}, {
word: "YAZLIK",
words: ["YAZ", "LIK", "YAZIK", "YALIK", "KAYA"]
}, {
word: "DENEME",
words: ["DEN", "ENE", "DENE", "NEDEN", "MEDE"]
}, {
word: "KALITE",
words: ["KALE", "TEK", "ATE", "LITE", "LAKE"]
}, {
word: "MUTLAK",
words: ["MUT", "TAK", "MUTLU", "TALUM", "KAMU"]
}, {
word: "MEYDAN",
words: ["MEY", "DAN", "YANDE", "MEYDA", "AYDE"]
}, {
word: "KALABA",
words: ["KALA", "BAL", "KALAB", "ABALA", "BAKA"]
}, {
word: "SEVDIGI",
words: ["SEV", "DIG", "SEVGI", "GIDSE", "VISE"]
}, {
word: "DUYULAN",
words: ["DUY", "YUL", "DUYU", "YULAN", "UYAN"]
}, {
word: "GENISLIK",
words: ["GEN", "LIK", "GENIS", "SIGLE", "KILE"]
},
// Level 11-20: Medium words
{
word: "MASALAR",
words: ["MAS", "ALA", "MASA", "SALAR", "RASAL"]
}, {
word: "KITAPLAR",
words: ["KIT", "TAP", "KITAP", "PALAR", "PLAKA"]
}, {
word: "EVLERDE",
words: ["EV", "LER", "EVLER", "VERDE", "LEVER"]
}, {
word: "SEHIRLER",
words: ["SEH", "HIR", "SEHIR", "LEREH", "RILES"]
}, {
word: "OYUNCAK",
words: ["OY", "YUN", "OYUN", "UNCAK", "CUNA"]
}, {
word: "KAHVALT",
words: ["KAH", "VAL", "KAHVE", "VALT", "HAVAL"]
}, {
word: "GELECEK",
words: ["GEL", "LEE", "GELE", "LECEK", "KELE"]
}, {
word: "ZAMANLA",
words: ["ZAM", "MAN", "ZAMAN", "MANLA", "ALMAN"]
}, {
word: "DUNYADA",
words: ["DUN", "NYA", "DUNYA", "YADA", "UYAN"]
}, {
word: "HAYATTA",
words: ["HAY", "YAT", "HAYAT", "ATTA", "TAHY"]
},
// Level 21-30: Harder words
{
word: "DOSTLUK",
words: ["DOS", "OST", "DOST", "TLUK", "TUSK"]
}, {
word: "KARDESLIK",
words: ["KAR", "DES", "KARDES", "ESLIK", "RILES"]
}, {
word: "OKULLAR",
words: ["OK", "KUL", "OKUL", "ULLAR", "KURAL"]
}, {
word: "OGRETMEN",
words: ["OGR", "RET", "OGRET", "RETMEN", "TERMEN"]
}, {
word: "DERSLERI",
words: ["DER", "ERS", "DERS", "SLERI", "RISED"]
}, {
word: "KITABIM",
words: ["KIT", "TAB", "KITAB", "ABIM", "MIKA"]
}, {
word: "OYUNLAR",
words: ["OY", "YUN", "OYUN", "UNLAR", "ROYAL"]
}, {
word: "ARKADAS",
words: ["ARK", "KAD", "ARKA", "ADAS", "RASKA"]
}, {
word: "AILELER",
words: ["AIL", "ILE", "AILE", "LELER", "REEL"]
}, {
word: "EVIMIZ",
words: ["EV", "VIM", "EVIM", "IMIZ", "ZEMI"]
},
// Continue with more levels...
// Level 31-40
{
word: "MERHABA",
words: ["MER", "ERH", "MERH", "HABA", "ARME"]
}, {
word: "GUNAYDIN",
words: ["GUN", "AYD", "GUNA", "AYDIN", "YUNAN"]
}, {
word: "IYIAKSAM",
words: ["IYI", "YIA", "IYIA", "AKSAM", "MASIK"]
}, {
word: "HOSGELDIN",
words: ["HOS", "OSG", "HOSG", "GELDIN", "SINGH"]
}, {
word: "TESEKKUR",
words: ["TES", "ESE", "TESE", "EKKUR", "TURES"]
}, {
word: "KUSURA",
words: ["KUS", "USU", "KUSU", "SURA", "RUSK"]
}, {
word: "AFEDERSIN",
words: ["AFE", "FED", "AFED", "DERSIN", "FADER"]
}, {
word: "PARDON",
words: ["PAR", "ARD", "PARD", "RDON", "DROP"]
}, {
word: "GORUS",
words: ["GOR", "ORU", "GORU", "ORUS", "SOUR"]
}, {
word: "HABER",
words: ["HAB", "ABE", "HABE", "ABER", "BEAR"]
},
// Level 41-50
{
word: "ISTANBUL",
words: ["IST", "STA", "ISTA", "ANBUL", "TABLA"]
}, {
word: "ANKARA",
words: ["ANK", "NKA", "ANKA", "KARA", "ARAN"]
}, {
word: "IZMIR",
words: ["IZ", "ZMI", "IZMI", "ZMIR", "RIMI"]
}, {
word: "BURSA",
words: ["BUR", "URS", "BURS", "URSA", "SURA"]
}, {
word: "ANTALYA",
words: ["ANT", "NTA", "ANTA", "TALYA", "ANTAL"]
}, {
word: "ADANA",
words: ["ADA", "DAN", "ADAN", "DANA", "NADA"]
}, {
word: "KONYA",
words: ["KON", "ONY", "KONY", "ONYA", "YANK"]
}, {
word: "GAZIANTEP",
words: ["GAZ", "AZI", "GAZI", "ANTEP", "PENTA"]
}, {
word: "KAYSERI",
words: ["KAY", "AYS", "KAYS", "SERI", "RISKA"]
}, {
word: "TRABZON",
words: ["TRA", "RAB", "TRAB", "ABZON", "BARON"]
}];
// Generate remaining levels (51-150) programmatically
for (var i = 50; i < 150; i++) {
var levelWords = [{
word: "PROGRAM" + (i - 49),
words: ["PRO", "ROG", "PROG", "GRAM", "ROMA"]
}];
// Add variety based on level
if (i % 10 === 0) {
wordLists.push({
word: "COMPUTER",
words: ["COM", "PUT", "COMP", "UTER", "TEMPO"]
});
} else if (i % 7 === 0) {
wordLists.push({
word: "TELEFON",
words: ["TEL", "LEF", "TELE", "EFON", "FONLE"]
});
} else if (i % 5 === 0) {
wordLists.push({
word: "INTERNET",
words: ["INT", "TER", "INTE", "ERNET", "ENTER"]
});
} else if (i % 3 === 0) {
wordLists.push({
word: "BILGISAYAR",
words: ["BIL", "LGI", "BILG", "ISAYAR", "SALIB"]
});
} else {
wordLists.push({
word: "SISTEM" + (i - 49),
words: ["SIS", "IST", "SIST", "STEM", "TESTE"]
});
}
}
// Game state
var currentLevel = storage.currentLevel || 0;
var totalScore = storage.totalScore || 0;
var hintCount = storage.hintCount || 2;
var currentWordData = wordLists[currentLevel % wordLists.length];
var foundWords = [];
var selectedLetters = [];
var currentWord = "";
var letterTiles = [];
var foundWordItems = [];
// UI Elements - Scaled for full screen
var levelText = new Text2('SEVIYE ' + (currentLevel + 1), {
size: 54,
fill: 0x333333
});
levelText.anchor.set(0.5, 0);
levelText.x = 1024;
levelText.y = 150;
game.addChild(levelText);
var currentWordDisplay = new Text2('', {
size: 48,
fill: 0x666666
});
currentWordDisplay.anchor.set(0.5, 0.5);
currentWordDisplay.x = 1024;
currentWordDisplay.y = 650;
game.addChild(currentWordDisplay);
var scoreText = new Text2('SKOR: ' + totalScore, {
size: 42,
fill: 0x333333
});
scoreText.anchor.set(1, 0);
scoreText.x = 2000;
scoreText.y = 50;
game.addChild(scoreText);
var hintText = new Text2('İPUCU: ' + hintCount, {
size: 36,
fill: 0xFF9800
});
hintText.anchor.set(0, 0);
hintText.x = 150;
hintText.y = 50;
game.addChild(hintText);
// Progress bar - Larger and repositioned
var progressBg = game.addChild(LK.getAsset('progressBg', {
anchorX: 0.5,
anchorY: 0,
x: 1024,
y: 250,
scaleX: 2,
scaleY: 1.5
}));
var progressFill = game.addChild(LK.getAsset('progressBar', {
anchorX: 0,
anchorY: 0,
x: 624,
y: 250,
scaleX: 0,
scaleY: 1.5
}));
// Submit button - Larger
var submitButton = game.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 750,
scaleX: 1.5,
scaleY: 1.5
}));
var submitText = new Text2('GÖNDER', {
size: 36,
fill: 0xFFFFFF
});
submitText.anchor.set(0.5, 0.5);
submitText.x = 1024;
submitText.y = 750;
game.addChild(submitText);
submitButton.down = function (x, y, obj) {
submitWord();
};
// Clear button - Larger and repositioned
var clearButton = game.addChild(LK.getAsset('buttonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 624,
y: 750,
scaleX: 1.5,
scaleY: 1.5
}));
var clearText = new Text2('TEMİZLE', {
size: 36,
fill: 0xFFFFFF
});
clearText.anchor.set(0.5, 0.5);
clearText.x = 624;
clearText.y = 750;
game.addChild(clearText);
clearButton.down = function (x, y, obj) {
clearSelection();
};
// Hint button - Larger and repositioned
var hintButton = game.addChild(LK.getAsset('hintButtonBg', {
anchorX: 0.5,
anchorY: 0.5,
x: 1424,
y: 750,
scaleX: 1.5,
scaleY: 1.5
}));
var hintButtonText = new Text2('İPUCU', {
size: 30,
fill: 0xFFFFFF
});
hintButtonText.anchor.set(0.5, 0.5);
hintButtonText.x = 1424;
hintButtonText.y = 750;
game.addChild(hintButtonText);
hintButton.down = function (x, y, obj) {
useHint();
};
// Found words container - Repositioned for full screen
var foundWordsContainer = new Container();
foundWordsContainer.x = 100;
foundWordsContainer.y = 900;
game.addChild(foundWordsContainer);
// Initialize letter tiles
function initializeLetterTiles() {
// Clear existing tiles
for (var i = 0; i < letterTiles.length; i++) {
letterTiles[i].destroy();
}
letterTiles = [];
var letters = currentWordData.word.split('');
// Shuffle the letters randomly
var shuffledLetters = [];
for (var i = 0; i < letters.length; i++) {
shuffledLetters.push(letters[i]);
}
// Fisher-Yates shuffle algorithm
for (var i = shuffledLetters.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = shuffledLetters[i];
shuffledLetters[i] = shuffledLetters[j];
shuffledLetters[j] = temp;
}
var tileSpacing = 120;
var startX = 1024 - shuffledLetters.length * tileSpacing / 2;
for (var i = 0; i < shuffledLetters.length; i++) {
var tile = new LetterTile(shuffledLetters[i], i);
tile.x = startX + i * tileSpacing;
tile.y = 500;
tile.scaleX = 1.5;
tile.scaleY = 1.5;
letterTiles.push(tile);
game.addChild(tile);
}
}
// Update current word display
function updateCurrentWord() {
currentWord = '';
for (var i = 0; i < selectedLetters.length; i++) {
currentWord += selectedLetters[i].letter;
}
currentWordDisplay.setText(currentWord.toUpperCase());
}
// Clear letter selection
function clearSelection() {
for (var i = 0; i < selectedLetters.length; i++) {
selectedLetters[i].setSelected(false);
}
selectedLetters = [];
currentWord = '';
currentWordDisplay.setText('');
LK.getSound('buttonClick').play();
}
// Submit word
function submitWord() {
if (currentWord.length < 3) {
LK.effects.flashObject(currentWordDisplay, 0xff0000, 500);
return;
}
var wordLower = currentWord.toLowerCase();
var isValidWord = false;
// Check if word exists in current level's word list OR is the main word itself
for (var i = 0; i < currentWordData.words.length; i++) {
if (currentWordData.words[i].toLowerCase() === wordLower) {
isValidWord = true;
break;
}
}
// Also check if it's the main word itself
if (currentWordData.word.toLowerCase() === wordLower) {
isValidWord = true;
}
// Check if word already found
var alreadyFound = false;
for (var i = 0; i < foundWords.length; i++) {
if (foundWords[i].toLowerCase() === wordLower) {
alreadyFound = true;
break;
}
}
if (isValidWord && !alreadyFound) {
// Word found!
var points = currentWord.length * 10;
foundWords.push(currentWord);
totalScore += points;
// Add word to found words display
var wordItem = new WordItem(currentWord, points);
wordItem.y = (foundWords.length - 1) * 90;
foundWordsContainer.addChild(wordItem);
// Update UI
scoreText.setText('SKOR: ' + totalScore);
LK.setScore(totalScore);
// Calculate total possible words (including main word)
var totalPossibleWords = currentWordData.words.length + 1;
// Update progress
var progress = foundWords.length / totalPossibleWords;
progressFill.scaleX = progress;
// Play sound and flash green
LK.getSound('wordFound').play();
LK.effects.flashObject(currentWordDisplay, 0x4CAF50, 500);
// Complete level only when ALL words are found (including main word)
if (foundWords.length >= totalPossibleWords) {
completeLevel();
}
clearSelection();
} else if (alreadyFound) {
LK.effects.flashObject(currentWordDisplay, 0xFFEB3B, 500);
clearSelection();
} else {
LK.effects.flashObject(currentWordDisplay, 0xff0000, 500);
clearSelection();
}
}
// Use hint
function useHint() {
if (hintCount <= 0) {
LK.effects.flashObject(hintText, 0xff0000, 500);
return;
}
// Find an unfound word
var unfoundWords = [];
// Check all words in the level
for (var i = 0; i < currentWordData.words.length; i++) {
var word = currentWordData.words[i];
var found = false;
for (var j = 0; j < foundWords.length; j++) {
if (foundWords[j].toLowerCase() === word.toLowerCase()) {
found = true;
break;
}
}
if (!found) {
unfoundWords.push(word);
}
}
// Also check if main word is unfound
var mainWordFound = false;
for (var j = 0; j < foundWords.length; j++) {
if (foundWords[j].toLowerCase() === currentWordData.word.toLowerCase()) {
mainWordFound = true;
break;
}
}
if (!mainWordFound) {
unfoundWords.push(currentWordData.word);
}
if (unfoundWords.length > 0) {
var randomWord = unfoundWords[Math.floor(Math.random() * unfoundWords.length)];
var hintLetter = randomWord.charAt(0).toUpperCase();
// Show hint
var hintDisplay = new Text2('İPUCU: ' + hintLetter + '...', {
size: 48,
fill: 0xFF9800
});
hintDisplay.anchor.set(0.5, 0.5);
hintDisplay.x = 1024;
hintDisplay.y = 850;
hintDisplay.alpha = 0;
game.addChild(hintDisplay);
tween(hintDisplay, {
alpha: 1
}, {
duration: 300
});
tween(hintDisplay, {
alpha: 0
}, {
duration: 2000,
onFinish: function onFinish() {
hintDisplay.destroy();
}
});
hintCount--;
hintText.setText('İPUCU: ' + hintCount);
storage.hintCount = hintCount;
LK.getSound('buttonClick').play();
}
}
// Complete level
function completeLevel() {
currentLevel++;
// Check if game completed (150 levels)
if (currentLevel >= 150) {
// Show completion message
var completionText = new Text2('TEBRİKLER! TÜM SEVİYELERİ TAMAMLADINIZ!', {
size: 48,
fill: 0x4CAF50
});
completionText.anchor.set(0.5, 0.5);
completionText.x = 1024;
completionText.y = 1366;
game.addChild(completionText);
LK.showYouWin();
return;
}
// Bonus hint every 50 levels
if (currentLevel % 50 === 0) {
hintCount++;
var bonusText = new Text2('+1 İPUCU BONUS!', {
size: 54,
fill: 0x4CAF50
});
bonusText.anchor.set(0.5, 0.5);
bonusText.x = 1024;
bonusText.y = 2000;
bonusText.alpha = 0;
game.addChild(bonusText);
tween(bonusText, {
alpha: 1,
y: 1600
}, {
duration: 500
});
tween(bonusText, {
alpha: 0
}, {
duration: 2000,
onFinish: function onFinish() {
bonusText.destroy();
}
});
}
// Save progress
storage.currentLevel = currentLevel;
storage.totalScore = totalScore;
storage.hintCount = hintCount;
LK.getSound('levelComplete').play();
LK.effects.flashScreen(0x4CAF50, 1000);
// Wait a bit then load next level
LK.setTimeout(function () {
loadNextLevel();
}, 1500);
}
// Load next level
function loadNextLevel() {
currentWordData = wordLists[currentLevel % wordLists.length];
foundWords = [];
selectedLetters = [];
currentWord = '';
// Clear found words display
for (var i = 0; i < foundWordItems.length; i++) {
foundWordItems[i].destroy();
}
foundWordItems = [];
// Clear found words container
for (var i = foundWordsContainer.children.length - 1; i >= 0; i--) {
foundWordsContainer.children[i].destroy();
}
// Update UI
levelText.setText('SEVIYE ' + (currentLevel + 1));
currentWordDisplay.setText('');
hintText.setText('İPUCU: ' + hintCount);
progressFill.scaleX = 0;
// Reinitialize letter tiles
initializeLetterTiles();
}
// Initialize first level
initializeLetterTiles();
game.update = function () {
// Game runs continuously
}; ===================================================================
--- original.js
+++ change.js
@@ -455,15 +455,19 @@
return;
}
var wordLower = currentWord.toLowerCase();
var isValidWord = false;
- // Check if word exists in current level's word list
+ // Check if word exists in current level's word list OR is the main word itself
for (var i = 0; i < currentWordData.words.length; i++) {
if (currentWordData.words[i].toLowerCase() === wordLower) {
isValidWord = true;
break;
}
}
+ // Also check if it's the main word itself
+ if (currentWordData.word.toLowerCase() === wordLower) {
+ isValidWord = true;
+ }
// Check if word already found
var alreadyFound = false;
for (var i = 0; i < foundWords.length; i++) {
if (foundWords[i].toLowerCase() === wordLower) {
@@ -482,16 +486,20 @@
foundWordsContainer.addChild(wordItem);
// Update UI
scoreText.setText('SKOR: ' + totalScore);
LK.setScore(totalScore);
+ // Calculate total possible words (including main word)
+ var totalPossibleWords = currentWordData.words.length + 1;
// Update progress
- var progress = foundWords.length / currentWordData.words.length;
+ var progress = foundWords.length / totalPossibleWords;
progressFill.scaleX = progress;
// Play sound and flash green
LK.getSound('wordFound').play();
LK.effects.flashObject(currentWordDisplay, 0x4CAF50, 500);
- // Complete level after finding any word
- completeLevel();
+ // Complete level only when ALL words are found (including main word)
+ if (foundWords.length >= totalPossibleWords) {
+ completeLevel();
+ }
clearSelection();
} else if (alreadyFound) {
LK.effects.flashObject(currentWordDisplay, 0xFFEB3B, 500);
clearSelection();
@@ -507,8 +515,9 @@
return;
}
// Find an unfound word
var unfoundWords = [];
+ // Check all words in the level
for (var i = 0; i < currentWordData.words.length; i++) {
var word = currentWordData.words[i];
var found = false;
for (var j = 0; j < foundWords.length; j++) {
@@ -520,8 +529,19 @@
if (!found) {
unfoundWords.push(word);
}
}
+ // Also check if main word is unfound
+ var mainWordFound = false;
+ for (var j = 0; j < foundWords.length; j++) {
+ if (foundWords[j].toLowerCase() === currentWordData.word.toLowerCase()) {
+ mainWordFound = true;
+ break;
+ }
+ }
+ if (!mainWordFound) {
+ unfoundWords.push(currentWordData.word);
+ }
if (unfoundWords.length > 0) {
var randomWord = unfoundWords[Math.floor(Math.random() * unfoundWords.length)];
var hintLetter = randomWord.charAt(0).toUpperCase();
// Show hint
In the middle part, there are mountains, in the upper left corner, the sun, a river flowing from the mountain, and a house beside the river. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde hint yazan yeşil bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde buy hint yazan sarı bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde about yazan gri bir düğme. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde submit yazan turuncu bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
bir ayarlar simgesi ve kenarlarını benim için düzelt. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde start yazan yeşil bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde menu yazan kırmızı bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzerinde clear yazan bir buton. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
üzeinde Back yazan kırmızı bir buton . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat