Code edit (1 edits merged)
Please save this source code
User prompt
in StartButton, add 5 new texts similars to startText for each letter of the word "START"
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: levelText is not defined' in or related to this line: 'levelText.setText("?");' Line Number: 1149
Code edit (21 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: levelText is not defined' in or related to this line: 'levelText.setText("?");' Line Number: 1145
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (11 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: Error: Invalid color format. Expected 0xRRGGBB format, received: undefined' in or related to this line: 'tween(tileGraphics, {' Line Number: 235
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
in handlePlayingStateDown, if not taping an operation but tapping a tile, play tick sound
Code edit (20 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: tile is not defined' in or related to this line: 'tween(tile, {' Line Number: 945
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
in createOperations, before `self.operations = [];` destroy all previous remaining operations
Code edit (10 edits merged)
Please save this source code
User prompt
adapt areNeighbors to take int oaccount the fact that the grid is hexagonal. ie: tile at 2,3 is not adjacent with tile at 1,2 even if dx=1 and dy=1
Code edit (1 edits merged)
Please save this source code
User prompt
add detailed logs in areNeighbors
User prompt
there is a problem with fillTilesNeighbors : it doesn't actually check if the the tiles are adjacent using their row and col ! please fix
User prompt
there is a problem with getAdjacentTiles algorithm : it selects tiles with same value even if there are not adjacent! please fix
===================================================================
--- original.js
+++ change.js
@@ -580,9 +580,9 @@
self.game = game;
self.activeTileCount = 0; // Initialize active tile count
self.levelBoardOffsetX = 0; // Initialize levelBoardOffsetX
self.levelBoardOffsetY = 0; // Initialize levelBoardOffsetY
- self.currentLevel = debug ? 8 : 1;
+ self.currentLevel = debug ? 16 : 1;
self.previousLevelNumber = 1;
self.board = [];
self.operations = [];
self.isAnimating = false;
@@ -1628,30 +1628,54 @@
"tiles": [["", 3, 1, 2, 1, "", ""], ["", 3, 1, 2, 1, "", ""], [3, 1, 2, 1, "", "", ""], ["", "", "", "", 1, 1, ""], [3, 3, 3, 1, 1, 1, 1], ["", 3, 3, 1, 1, 2, ""], ["", 3, 1, 1, 2, 2, ""], ["", "", 1, 1, 2, 2, ""], ["", "", 1, 2, 2, "", ""]],
"operations": ["-2", "+2", "-1", "-1", "-1"]
},
9: {
- "tiles": [["", "", 1, 1, "", "", ""], ["", "", 1, 1, 1, "", ""], ["", 1, 1, 1, 1, "", ""], ["", 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, ""], ["", 1, 1, 1, 1, 1, ""], ["", 1, 1, 1, 1, "", ""], ["", "", 1, 1, 1, "", ""], ["", "", 1, 1, "", "", ""]],
- "operations": ["-1"]
+ "tiles": [["", "", "", "", "", "", ""], ["", 1, 3, 3, 3, 3, 1], [1, 1, 3, 3, 3, 1, 1], ["", 3, 3, 3, 3, 3, 3], [3, 2, 3, 2, 3, 2, 3], ["", 3, 3, 3, 3, 3, 3], [1, 1, 3, 3, 3, 1, 1], ["", 1, 3, 3, 3, 3, 1], ["", "", "", "", "", "", ""]],
+ "operations": ["-2", "+1", "-2"]
},
10: {
- "tiles": [["", "", 1, 1, "", "", ""], ["", 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, ""], ["", 1, 1, 1, 1, 1, ""], ["", "", 1, 1, "", "", ""]],
- "operations": ["-1"]
+ "tiles": [[1, 2, 1, 1, 1, 1, 1], ["", 3, 3, 3, 3, 2, 1], [1, 2, 1, 1, 1, 1, 1], ["", 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], ["", 1, 1, 1, 2, 2, 1], [1, 2, 3, 3, 2, 1, 1], ["", 1, 1, 1, 2, 2, 1], [1, 3, 3, 1, 3, 3, 3], ["", 1, 3, 1, 3, 2, 3], [1, 1, 1, 3, 3, 3, 1]],
+ "operations": ["+1", "+2", "-2", "-2"]
},
11: {
- "tiles": [["", 1, 1, 1, 1, "", ""], ["", 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, ""], ["", 1, 1, 1, 1, 1, ""], ["", 1, 1, 1, 1, "", ""]],
- "operations": ["-1"]
+ "tiles": [[3, 3, 2, 3, 3, 4, 3], ["", 3, 2, 3, 3, 3, 3], [3, 2, 3, 3, 3, 4, 3], ["", 3, 2, 3, 3, 3, 3], [3, 2, 2, 2, 1, 2, 2], ["", 3, 2, 3, 3, 3, 3], [3, 2, 3, 3, 3, 4, 3], ["", 3, 2, 3, 3, 3, 3], [3, 3, 2, 3, 3, 4, 3]],
+ "operations": ["-2", "-1", "-1", "-1", "+2", "+2"]
},
12: {
- "tiles": [["", 1, 1, 1, 1, "", ""], ["", 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, ""], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, ""], ["", 1, 1, 1, 1, 1, ""]],
- "operations": ["-1"]
+ "tiles": [["", 2, 2, 2, 2, 2, ""], ["", 2, 1, 1, 1, 1, 2], [2, 1, 3, 3, 3, 1, 2], ["", 1, 3, 2, 2, 3, 1], [2, 1, 3, 1, 3, 1, 2], ["", 1, 3, 2, 2, 3, 1], [2, 1, 3, 3, 3, 1, 2], ["", 2, 1, 1, 1, 1, 2], ["", 2, 2, 2, 2, 2, ""]],
+ "operations": ["-2", "-1", "-1", "+1"]
},
13: {
- "tiles": [["", 1, 1], [1, 1, 1], ["", 1, 1]],
- "operations": ['-1']
+ "tiles": [["", "", 3, 3, "", "", ""], ["", "", 3, 4, 3, "", ""], ["", "", 3, 3, "", "", ""], ["", "", "", "", 2, 2, ""], ["", "", "", 2, 3, 2, ""], ["", "", "", "", 2, 2, ""], ["", "", 1, 1, "", "", ""], ["", "", 1, 2, 1, "", ""], ["", "", 1, 1, "", "", ""]],
+ "operations": ["-2", "-2", "-1", "-1", "+1"]
},
14: {
+ "tiles": [[1, 1, 4, 4, 1, 1, 1], ["", 1, 4, 4, 1, 3, 1], [1, 4, 4, 1, 3, 1, 2], ["", 4, 4, 1, 3, 1, 2], [4, 4, 1, 3, 1, 2, 1], ["", 4, 4, 1, 3, 1, 2], [1, 4, 4, 1, 3, 1, 2], ["", 1, 4, 4, 1, 3, 1], [1, 1, 4, 4, 1, 1, 1]],
+ "operations": ["-2", "-1", "-1", "-1", "+1"]
+ },
+ 15: {
+ "tiles": [["", "", 1, 2, 1, "", ""], ["", "", 1, 2, 2, 1, ""], ["", 1, 2, 2, 2, 1, ""], ["", 1, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1], ["", "", 2, 3, 3, 2, ""], ["", 2, 2, 3, 2, 2, ""], ["", 4, 4, 4, 4, 4, 4], ["", "", "", "", "", "", ""]],
+ "operations": ["-2", "-1", "-1", "+2"]
+ },
+ 16: {
+ "tiles": [[1, 2, 1, 1, 1, 2, 1], ["", 1, 2, 1, 1, 2, 1], [1, 2, 4, 4, 4, 2, 1], ["", 1, 4, 4, 4, 4, 1], [3, 2, 4, 4, 4, 2, 3], ["", 1, 4, 4, 4, 4, 1], [1, 1, 2, 4, 2, 1, 1], ["", 1, 2, 1, 1, 2, 1], [1, 2, 1, 1, 1, 2, 1]],
+ "operations": ["-2", "-2", "-1", "+1"]
+ },
+ 17: {
"tiles": [["", 1, 1], [1, 1, 1], ["", 1, 1], ["", 1, ""]],
"operations": ['-1']
+ },
+ 18: {
+ "tiles": [["", 1, 1], [1, 1, 1], ["", 1, 1], ["", 1, ""]],
+ "operations": ['-1']
+ },
+ 19: {
+ "tiles": [["", 1, 1], [1, 1, 1], ["", 1, 1], ["", 1, ""]],
+ "operations": ['-1']
+ },
+ 20: {
+ "tiles": [["", 1, 1], [1, 1, 1], ["", 1, 1], ["", 1, ""]],
+ "operations": ['-1']
}
};
/***********************************************************************************************/
/***************************************** GAME INITIALISATION *********************************/
tick
Sound effect
tileEntrance
Sound effect
tileRemove
Sound effect
operationSelect
Sound effect
operationCancel
Sound effect
tileChangeValue
Sound effect
resetSound
Sound effect
levelFailed
Sound effect
menuLevelSelect
Sound effect
menuCellEnter
Sound effect
applause
Sound effect
bgMusic
Music
tada
Sound effect