User prompt
Use 70 instead of candyCanes[0].height / 2 offset
User prompt
The player should move with the mouse y in the limit of the 3 first canes
User prompt
indexFromTop Should be 0
User prompt
Remove the rotation of the last cane
User prompt
topCandyIndex Should be 0
User prompt
Don’t splice canes at self.selectedCandiesCount but from 0
User prompt
Don’t use candyIndex it’s i. And splice candyCanes outside the loop using the selectedCandiesCount instead of 1
User prompt
Rotate the last candy -15° clockwise
User prompt
the candy selection and removal should always start from the top available candies
Code edit (1 edits merged)
Please save this source code
User prompt
bug : it's never computer turn
User prompt
why computer fades out immediately ?
Code edit (5 edits merged)
Please save this source code
User prompt
log the mouse down and up events
User prompt
ensure the fade in/out setInterval function ends when alpha is 1 or 0
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: LK.effects.fadeIn is not a function' in this line: 'LK.effects.fadeIn(self.player, 500);' Line Number: 96
User prompt
make the player and computer fade in and fade out when the playerturn change
Code edit (1 edits merged)
Please save this source code
Code edit (7 edits merged)
Please save this source code
User prompt
remove the board
User prompt
when mouse is up, remove the selected candies
User prompt
don't select the 1st candy when mouse is not down
User prompt
start the selection process only when mouse is down
User prompt
when a candy is within the selected one make it a little bigger
===================================================================
--- original.js
+++ change.js
@@ -158,10 +158,10 @@
function handleSelection(obj) {
var event = obj.event;
var pos = event.getLocalPosition(self);
var topCandyIndex = 0;
- var minY = candyCanes[0].y - candyCanes[0].height / 2;
- var maxY = candyCanes[2].y + candyCanes[2].height / 2;
+ var minY = candyCanes[0].y - 70;
+ var maxY = candyCanes[2].y + 70;
self.player.y = Math.max(minY, Math.min(maxY, pos.y));
if (self.player.y < candyCanes[Math.max(topCandyIndex - 1, 0)].y + 70) {
self.selectedCandiesCount = 1;
} else if (self.player.y < candyCanes[Math.max(topCandyIndex - 2, 0)].y + 70) {
a christmas wooden board Background image. High contrast. No shadows.
a vertical christmas wooden board with snow, and decorations on its sides Background image. High contrast. No shadows.
a photo-realistic white and red vertical candy stick slice Single Game Texture. No background. High contrast. No shadows.
a horizontal santa's arm with a white glove and the index pointing to the right Single Game Texture. No background. High contrast. No shadows.
an green hairy grinch's arm, pointing in the horizontal direction, the index finger pointing to the left Single Game Texture. No background. High contrast. No shadows.
a photo-realistic white and red twisted candy stick slice in vertical position and with an extinguished wick. At its center, a simple white rectangular "TNT" sticker in the same direction as the stick Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a top view of a TNT explosion fire Background image. High contrast. No shadows.
A funny Santa Claus disheveled and covered by black soot after an explosion. stary night. High contrast.
a futuristic white robot arm. horizontal direction. the index finger pointing to the left. Single Game Texture. No background. High contrast. No shadows.
A old super hero Santa Claus holding a candy cane in his hand High contrast.
frame of an empty christmas themed popup with a decorated border User interface
a single mat rounded empty button User interface