User prompt
if lives are zero then end game
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'height')' in this line: 'if (self.y > mainContainer.height - self.height) {' Line Number: 243
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'width')' in this line: 'if (self.x > mainContainer.width - self.width) {' Line Number: 235
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'removeLife')' in this line: 'gameInstance.lifeCounter.removeLife();' Line Number: 214
User prompt
if console.log is match then delete selected present and increase score by 1. if console.log is mismatch then run removelife
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: presentDisplay is not defined' in this line: 'presentDisplay.x = 0;' Line Number: 298
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'getCurrentPresentType')' in this line: 'var currentDisplayType = this.parent.parent.presentDisplay.getCurrentPresentType();' Line Number: 206
User prompt
Fix Bug: 'ReferenceError: presentDisplay is not defined' in this line: 'var currentDisplayType = presentDisplay.getCurrentPresentType();' Line Number: 206
User prompt
when present clicked on check to see if it matchs displaypresent. if match log match else log missmatch
User prompt
adjust code so only logs when present clicked on
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'type')' in this line: 'if (selectedPresent.type === self.currentDisplayedPresentType) {' Line Number: 330
User prompt
run a check to see if present selected matchs displaypresent. if so log match else mismatch
User prompt
clean code
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'getChildByName')' in this line: 'var currentDisplayGraphic = gameInstance.presentTypeDisplay.getChildByName('displayGraphic');' Line Number: 203
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'children')' in this line: 'var currentDisplayGraphic = gameInstance.presentTypeDisplay.children[0];' Line Number: 203
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'presentTypeDisplay')' in this line: 'var currentDisplayGraphic = gameInstance.presentTypeDisplay.children[0];' Line Number: 204
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'presentTypeDisplay')' in this line: 'var currentDisplayGraphic = self.gameInstance.presentTypeDisplay.children[0];' Line Number: 203
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'presentTypeDisplay')' in this line: 'var currentDisplayGraphic = self.gameInstance.presentTypeDisplay.children[0];' Line Number: 202
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'presentDisplay')' in this line: 'var currentDisplayGraphic = self.gameInstance.presentDisplay.children[0];' Line Number: 202
User prompt
Fix Bug: 'TypeError: self.parent.getChildByName is not a function' in this line: 'var currentDisplayGraphic = self.parent.getChildByName('presentTypeDisplay').children[0];' Line Number: 202
User prompt
Fix Bug: 'TypeError: self.parent.parent.getChildByName is not a function' in this line: 'var currentDisplayGraphic = self.parent.parent.getChildByName('presentTypeDisplay').children[0];' Line Number: 202
User prompt
when a present is selected compare selection with displaygraphic. If both are the same type then log match else log missmatch
Code edit (3 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -107,8 +107,11 @@
self.removeLife = function () {
if (self.lives > 0) {
self.lives--;
self.refreshLifeDisplay();
+ if (self.lives <= 0) {
+ LK.showGameOver();
+ }
}
};
self.resetLives = function () {
while (self.lifeIcons.length < initialLives) {
basic snowflake. white Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
open top of Santa's sack. wrapped presents with ribbons and box, vivid colours, candy canes Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
close up of a Snow covered roof, Winter scene, star lit night sky, brick chimbly on right hand side, Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stary night sky.dark blue. no land. only sky Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Candy cane, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
old paper scroll, blank with no writing, Single Game Texture. In-Game asset. 2d. transparent Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
rudolf the red nose raindeer Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, bright colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture.
gift wrapped box, bright light colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture.
Santa's sleigh with a team of reindeer moving across a star light sky. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.