User prompt
in popuptext box add asset that moves from left to right across top part of screen
Code edit (1 edits merged)
Please save this source code
User prompt
add a random shuffle to the way presents are displayed in catchPresentDisplay
User prompt
clean up CatchPresentDisplay code
User prompt
correct catchpresentdisplay code based upon the above response
Code edit (1 edits merged)
Please save this source code
User prompt
change updateList to shuffle catchPresentList to allow a random present type to be displayed
User prompt
change updatelist to shuffle catchPresentList in random order rather than taking a slice
User prompt
change updatelist to shuffle catchPresentList. present match should be against asset type only and not index id
Code edit (4 edits merged)
Please save this source code
User prompt
change updatelist to shuffle catchPresentList rather than taking a slice of it in order to get a random Asset type
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'length')' in this line: 'for (var i = array.length - 1; i > 0; i--) {' Line Number: 9
Code edit (1 edits merged)
Please save this source code
User prompt
set displaylimit to the length of the catchPresentList
Code edit (1 edits merged)
Please save this source code
User prompt
change the `updateList` function to randomly shuffle the `catchPresentsList`
Code edit (1 edits merged)
Please save this source code
User prompt
when a present is clicked and removed, set catchpresentdisplay so that the next present displayed is randomly selected from teh available items
User prompt
in presentGraphics change code to randomly select the next catchpresent item by picking a random index number from the index numbers remaining
Code edit (2 edits merged)
Please save this source code
User prompt
set displaylimit in createPresentDisplay to numPresentsToCreate value each time level changes
User prompt
in game code add a variable that captures the current catchpresentDisplay value that can be used for comparison to presents that have been clicked
Code edit (15 edits merged)
Please save this source code
User prompt
set displayedPresentType so its equal to the current catchPresentDisplay Present asset value
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -4,9 +4,9 @@
self.y = 10;
self.catchPresentsList = [];
self.displayLimit = LevelManager.getCurrentLevel();
self.updateList = function (catchPresents) {
- self.catchPresentsList = catchPresents.slice(0, self.displayLimit);
+ self.catchPresentsList = catchPresents.slice();
self.catchPresentsList.sort(function () {
return 0.5 - Math.random();
});
var gameInstance = this.parent;
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.