User prompt
at the beginning make it read because red always starts
User prompt
add an turn idicator that show the color of whos turn it is
User prompt
dont slow down the speed of the discs when falling but make them bounce instead
Code edit (1 edits merged)
Please save this source code
User prompt
make the falling of the discs work
User prompt
make the discs fall from the top of the screen op to their place and make them bounce
User prompt
take the width of the win text in account
Code edit (1 edits merged)
Please save this source code
User prompt
take the win text elements width in accaunt for placing it in the middle
User prompt
remove the debug message
User prompt
display a text if someone wins with the same message as the debug message
User prompt
Please fix the bug: 'ReferenceError: customParticleBurst is not defined' in or related to this line: 'customParticleBurst(players[currentPlayer].color, 1000, 100);' Line Number: 120
User prompt
use a self made function instead of lk.effects.particle becuase it doesnt exist
User prompt
display particles if a player wins
User prompt
go game over after 5 seconds after checkwin is true
User prompt
use the debug message data to calculate a win if 4 of the same color discs are in a row horizontally diagonally and vertically
User prompt
delay the debug message to only send every second
User prompt
only send the debug message every time a new disc gets added to prevent spam
User prompt
only send the debug message every time a new disc gets added
User prompt
make a function that lists what color discs are in what row in what order. list it in the debug console
===================================================================
--- original.js
+++ change.js
@@ -9,8 +9,9 @@
var speed = Math.sqrt(2 * distance);
self.y += speed;
if (self.y > targetY) {
self.y = targetY;
+ self.speed = -self.speed * 0.5;
}
};
self.player = player;
var discGraphics = self.attachAsset(player.color, {
@@ -51,8 +52,11 @@
disc.y = 0; // Start at the top of the screen
self.cells[row][col] = disc;
game.addChild(disc);
disc.fall(row * 220 + 310); // Fall to the correct position
+ LK.on('tick', function () {
+ disc.fall(row * 220 + 310);
+ });
return true; // Return true if a disc was successfully added
}
}
return false; // Return false if the column is full