Initial prompt
Car Racing
User prompt
CPU can move by itself
User prompt
Extend the length of finish line
User prompt
Left and right arrow movements for Player
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'addEventListener')' in this line: 'window.addEventListener('keydown', function (event) {' Line Number: 38
User prompt
Add asset for left and right arrow keyboard
User prompt
Press the left and right asset to make player car move
User prompt
Increase left and right arrows size
User prompt
Increase player movement
User prompt
Increase size of CPU, player and finish line
User prompt
Flip the CPU asset image sideward
User prompt
Flip the Player asset image sideward
User prompt
Ability to hold arrow
User prompt
CPU in easy mode
User prompt
Make player speed normal mode
User prompt
Ability to hold left and right arrow for the player to be faster
User prompt
Make CPU in normal mode
User prompt
Make the finish line tall
User prompt
Make the finish line taller in down
User prompt
Put the finish line in the middle
User prompt
CPU in hard mode
User prompt
CPU in normal mode
User prompt
Player increase speed
User prompt
CPU in hard mode
User prompt
3 seconds count before race starts
===================================================================
--- original.js
+++ change.js
@@ -34,9 +34,9 @@
var finishLine = self.addChild(new FinishLine());
finishLine.x = 2048 - 200;
finishLine.y = 2732 / 2;
var isGameOver = false;
- window.addEventListener('keydown', function (event) {
+ LK.on('keydown', function (event) {
if (event.key === 'ArrowLeft') {
player.move('left');
} else if (event.key === 'ArrowRight') {
player.move('right');