Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: scoreText is not defined' in or related to this line: 'scoreText.setText(nouveauScore);' Line Number: 172
Code edit (7 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: scoreText is not defined' in or related to this line: 'scoreText.setText(nouveauScore);' Line Number: 178
User prompt
Please fix the bug: 'ReferenceError: scoreText is not defined' in or related to this line: 'scoreText.setText(nouveauScore);' Line Number: 173
User prompt
Please fix the bug: 'ReferenceError: scoreText is not defined' in or related to this line: 'scoreText.setText(nouveauScore);' Line Number: 172
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: startPoints is not defined' in or related to this line: 'var randomIndex = Math.floor(Math.random() * startPoints.length);' Line Number: 86
Code edit (1 edits merged)
Please save this source code
Initial prompt
Coco Monkey
===================================================================
--- original.js
+++ change.js
@@ -71,8 +71,10 @@
game.move = function (x, y, obj) {
parasol.x = x;
parasol.y = y;
};
+// Define the startPoints array
+var startPoints = [2048 / 4, 2048 / 2, 2048 / 4 * 3];
game.update = function () {
if (LK.ticks % 60 == 0) {
var newCoconut = new Coconut();
// Choisir aléatoirement un point de départ