about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2023-12-28 12:59:22 -0500
committerelioat <hi@eli.li>2023-12-28 12:59:22 -0500
commitc49f8d5dde2cc34036be6ee953ffef92a688fd28 (patch)
tree053c7a0b1f7b161b3c282a3a444d4f299a9f47c7 /js
parent544d53097c7f220e397ab2fb2d7f7973a8ae11da (diff)
downloadtour-c49f8d5dde2cc34036be6ee953ffef92a688fd28.tar.gz
*
Diffstat (limited to 'js')
-rw-r--r--js/game-frame/game.js10
1 files 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;
     }