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

add task solution #1082

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

add task solution #1082

wants to merge 2 commits into from

Conversation

naz4ik
Copy link

@naz4ik naz4ik commented Dec 16, 2024

Copy link

@etojeDenys etojeDenys left a comment

Choose a reason for hiding this comment

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

do not create the cell if the board didn't change

Screen.Recording.2024-12-16.at.11.53.26.mov

Comment on lines 57 to 64
if (keyboardEvent.key === 'ArrowUp') {
game.moveUp();
} else if (keyboardEvent.key === 'ArrowDown') {
game.moveDown();
} else if (keyboardEvent.key === 'ArrowLeft') {
game.moveLeft();
} else if (keyboardEvent.key === 'ArrowRight') {
game.moveRight();

Choose a reason for hiding this comment

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

better to use switch case here

@naz4ik naz4ik requested a review from etojeDenys December 16, 2024 10:07
Copy link

@etojeDenys etojeDenys 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

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