Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading '256')' in this line: 'if (cards[card1[0]][card1[1]] !== cards[card2[0]][card2[1]]) {' Line Number: 148
User prompt
call canBeLinked in the down event
Code edit (2 edits merged)
Please save this source code
User prompt
in the tick event update matchDebugText with last matched value
User prompt
update lastMatched with the result of the match after 2nd card selection
User prompt
add a global bool variable lastMatched
User prompt
Add another debug text at top right and display "Match:"
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'selectedCard2 = null;' Line Number: 91
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'selectedCard2 = null;' Line Number: 88
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'selectedCard2 = null;' Line Number: 89
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'selectedCard2 = null;' Line Number: 90
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'debugText.setText('Row: ' + currentRow + ' Col: ' + currentCol);' Line Number: 175
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card && card.isMatched;' Line Number: 186
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card !== undefined && card.isMatched;' Line Number: 186
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card && card.isMatched;' Line Number: 186
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card !== undefined && card.isMatched;' Line Number: 186
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card && card.isMatched;' Line Number: 186
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card !== null && card !== undefined && card.isMatched;' Line Number: 186
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card && card.isMatched;' Line Number: 186
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card != null && card.isMatched;' Line Number: 186
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card && card.isMatched;' Line Number: 186
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'call')' in this line: 'return card !== undefined && card.isMatched;' Line Number: 186
===================================================================
--- original.js
+++ change.js
@@ -158,22 +158,22 @@
return array;
}
};
self.initGame();
- var debugText = new Text2('', {
+ this.debugText = new Text2('', {
size: 50,
fill: '#ffffff'
});
- debugText.anchor.set(0.5, 0);
- LK.gui.topCenter.addChild(debugText);
+ this.debugText.anchor.set(0.5, 0);
+ LK.gui.topCenter.addChild(this.debugText);
self.on('move', function (obj) {
var pos = obj.event.getLocalPosition(self);
var col = 1 + Math.floor((pos.x - horizontalOffset + cardWidth / 2) / cardWidth);
var row = 1 + Math.floor((pos.y - verticalOffset + cardHeight / 2) / cardHeight);
currentCol = Math.max(1, Math.min(nbCols, col));
currentRow = Math.max(1, Math.min(nbRows, row));
if (debug) {
- debugText.setText('Row: ' + currentRow + ' Col: ' + currentCol);
+ self.debugText.setText('Row: ' + currentRow + ' Col: ' + currentCol);
}
});
for (var i = 0; i < nbCards; i++) {
var card = self.addChild(new Card(cardPairs[i]));
a photo realistic top view of empty flat beige plastic square. Single Game Texture. In-Game asset. 2d. No background. High contrast. No shadows.
a christmas tree. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas gift. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas ball. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a golden christmas tree star. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas hat. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas leaf. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas holly leaf. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas snow flake. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas snow man. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas reindeer. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas candy cane. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas green ball . plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas gingerbrean man. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas pine cone. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas present green. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas boe tie. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas socks. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas penguin. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas decorated blue present. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas scarf. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas gloves. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas blue decorated ball. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas candle. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas snow globe. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
an christmas elongated cuboid present. plastic style. No shadow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a round christmas gift.plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a round christmas gift.plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
one cute christmas elf. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
one cute christmas elf. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
one cute christmas reindeer head. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
one cute christmas reindeer head with a red nose. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
one christmas bell. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a couple of christmas bells. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas gifts bag. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas candle. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a cute santa clauss. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Santa's sleigh. Side view. Plastic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Reimagine the cute teddy bear sitting without background. Plastic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Christmas Rocking Horse. Plastic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
One Christmas Matryoshka Doll. Plastic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A christmas Miniature Train. Plastic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A christmas Toy Soldier. Plastic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A christmas Music Box . Plastic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a cute polar bear cub. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a sled plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas gingerbread girl. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas gingerbread house. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a cute christmas jack in the box. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a cute christmas cookie. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas log cacke. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas donut. plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a cute christmas owl. Plastic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a feeric christmas landscape at night with decorated trees Background image
a feeric christmas landscape at night with snow men and snow flakes Background image
a feeric christmas landscape at night with a snow man , candy canes ,holly leafs and snow flakes, Background image
a feeric christmas landscape at night with a snow man , candy canes ,holly leafs and snow flakes, Santa's reindeers, green, red and blue presents Background image
a feeric christmas landscape at night with a snow man , candy canes ,holly leafs and snow flakes, cute penguin, Santa's reindeers, green, red and blue presents and a lot of toys, a sled, gingerbread boy and girl, snow globes, a cute polar bear cub. a gingerbread house Background image
A Magical feeric starry christmas landscape at night with a snow man , candy canes ,holly leafs and snow flakes, cute penguin, Santa's reindeers, green, red and blue presents and a lot of toys, a sled, gingerbread boy and girl, snow globes, cute polar bears cub and a gingerbread house. Realistic. Plastic style. Background image