-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
2048 reviev 1 #1056
base: master
Are you sure you want to change the base?
2048 reviev 1 #1056
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check answer in chat
https://mate.academy/chats/12392?selectedMessageId=4360327
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic still broken.
See screencast. I always make right move, but cells sometimes changes randomly.
Screen.Recording.2024-12-02.at.17.19.37.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/modules/Game.class.js
Outdated
filtered[i] *= 2; // Об'єднуємо | ||
filtered[i + 1] = 0; // Обнуляємо наступну клітинку | ||
merged[i] = true; // Відзначаємо злиття | ||
this.score += filtered[i]; // Додаємо очки |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to write comments only in English
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
DEMO: https://nikalaiii.github.io/js_2048_game/