From c49f8d5dde2cc34036be6ee953ffef92a688fd28 Mon Sep 17 00:00:00 2001 From: elioat Date: Thu, 28 Dec 2023 12:59:22 -0500 Subject: * --- js/game-frame/game.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/game-frame/game.js b/js/game-frame/game.js index 3eac852..935263d 100644 --- a/js/game-frame/game.js +++ b/js/game-frame/game.js @@ -10,7 +10,7 @@ const player = { y: 0, width: 8, height: 8, - speed: 8, + step: 8, color: 'blue', spriteUrl: "chickadee.svg" }; @@ -78,16 +78,16 @@ window.addEventListener('keydown', (e) => { switch (e.key) { case 'ArrowUp': - newY -= player.speed; + newY -= player.step; break; case 'ArrowDown': - newY += player.speed; + newY += player.step; break; case 'ArrowLeft': - newX -= player.speed; + newX -= player.step; break; case 'ArrowRight': - newX += player.speed; + newX += player.step; break; } -- cgit 1.4.1-2-gfad0