Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #999

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Develop #999

wants to merge 3 commits into from

Conversation

NazarHaida
Copy link

- [DEMO LINK](https://NazarHaida.github.io/js_2048_game/)

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!
Add a favicon on the page
image

Comment on lines 18 to 33
case 'ArrowLeft':
game.moveLeft();
moveMade = true;
break;
case 'ArrowRight':
game.moveRight();
moveMade = true;
break;
case 'ArrowUp':
game.moveUp();
moveMade = true;
break;
case 'ArrowDown':
game.moveDown();
moveMade = true;
break;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create variables for event key words and use it here, also, add the blank line between the cases

Suggested change
case 'ArrowLeft':
game.moveLeft();
moveMade = true;
break;
case 'ArrowRight':
game.moveRight();
moveMade = true;
break;
case 'ArrowUp':
game.moveUp();
moveMade = true;
break;
case 'ArrowDown':
game.moveDown();
moveMade = true;
break;
case 'ArrowLeft':
game.moveLeft();
moveMade = true;
break;
case 'ArrowRight':
game.moveRight();
moveMade = true;
break;
case 'ArrowUp':
game.moveUp();
moveMade = true;
break;
case 'ArrowDown':
game.moveDown();
moveMade = true;
break;

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants