Code edit (3 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: playerTrun is not defined' in this line: 'if (playerTrun && playerSelecting && !self.selectedCandiesCount) {' Line Number: 229
Code edit (2 edits merged)
Please save this source code
User prompt
speed up computer selection movement when screen size is small
User prompt
speed up computer selection movement when candiesToPick is 2
User prompt
Add an explosion background and an animation when anyone takes the last candy and before the win/lose backgrounr display
Code edit (2 edits merged)
Please save this source code
User prompt
place the explostion at x =2048 / 2 + 30; y=250 + 12 * 190 + 20;
Code edit (11 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Math.Random is not a function' in this line: 'candiesNumber = Math.Random() > 0.5 ? 12 : 11;' Line Number: 207
Code edit (1 edits merged)
Please save this source code
User prompt
show the explosion animation also when computer lose
Code edit (7 edits merged)
Please save this source code
User prompt
factorize the 3 blocks if (candyCanes.length === 0) {...} in a global function with all required parameters
User prompt
Fix Bug: 'ReferenceError: handleEndGame is not defined' in this line: 'handleEndGame(self, playerTurn);' Line Number: 266
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in this line: 'if (context.candyCanes.length === 0) {' Line Number: 171
User prompt
fix game end because the annimations doesn't show anymore !
Code edit (9 edits merged)
Please save this source code
User prompt
Add a popup at the begining to let the user choose between 1 or 2 players mode
User prompt
gameState should change to 1 only after mode selection
User prompt
bug : onePlayerButton & twoPlayerButton are not visible
User prompt
place the mode buttons at the vertical center
Code edit (16 edits merged)
Please save this source code
User prompt
create the candies only after mode is selected
User prompt
add a gui text in front of each button 1 and 2
===================================================================
--- original.js
+++ change.js
@@ -83,10 +83,10 @@
}
var Explosion = Container.expand(function () {
var self = Container.call(this);
var explosionGraphics = self.createAsset('explosion', 'Explosion Graphics', .5, .5);
- self.x = 2048 / 2;
- self.y = 2732 / 2;
+ self.x = 2048 / 2 + 30;
+ self.y = 250 + 12 * 190 + 20;
self.scale.set(0);
self.animate = function () {
var scaleDelta = 0.05;
var maxScale = 3;
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