Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilianAdF committed Feb 18, 2024
2 parents 580a948 + 3e5ab81 commit a3fa71b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions LockPick/LockPick.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ function rotateBalls(dir) {
function handleKeyPress(event) {
if (isLocked)
return; //Game is over, key presses are ignored
if (event.key === "ArrowLeft") {
if (event.key === "ArrowLeft" || event.key === "a") {
rotateBalls("Left");
}
else if (event.key === "ArrowRight") {
else if (event.key === "ArrowRight" || event.key === "d") {
rotateBalls("Right");
}
else if (event.key === "Enter") {
else if (event.key === "Enter" || event.key === " ") {
nextLock();
}
else {
Expand Down
6 changes: 3 additions & 3 deletions LockPick/LockPick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ function rotateBalls(dir: Direction): void {
function handleKeyPress(event: KeyboardEvent) {
if (isLocked) return; //Game is over, key presses are ignored

if (event.key === "ArrowLeft") {
if (event.key === "ArrowLeft" || event.key === "a") {
rotateBalls("Left");
} else if (event.key === "ArrowRight") {
} else if (event.key === "ArrowRight" || event.key === "d") {
rotateBalls("Right");
} else if (event.key === "Enter") {
} else if (event.key === "Enter" || event.key === " ") {
nextLock();
} else {
return;
Expand Down

0 comments on commit a3fa71b

Please sign in to comment.