-
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
Develop #1039
base: master
Are you sure you want to change the base?
Develop #1039
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.
- provide the demo link in the pr description
- remove all console.log and redundant comments
src/scripts/main.js
Outdated
if (e.key === 'ArrowRight') { | ||
// eslint-disable-next-line no-console | ||
console.log('Right'); | ||
game.moveRight(); | ||
renderField(game.state); // Відображаємо оновлене поле після руху | ||
} | ||
|
||
if (e.key === 'ArrowLeft') { | ||
// eslint-disable-next-line no-console | ||
console.log('Left'); | ||
game.moveLeft(); | ||
renderField(game.state); // Відображаємо оновлене поле після руху | ||
} | ||
|
||
if (e.key === 'ArrowUp') { | ||
// eslint-disable-next-line no-console | ||
console.log('Up'); | ||
game.moveUp(); | ||
renderField(game.state); // Відображаємо оновлене поле після руху | ||
} | ||
|
||
if (e.key === 'ArrowDown') { | ||
// eslint-disable-next-line no-console | ||
console.log('Down'); | ||
game.moveDown(); | ||
renderField(game.state); // Відображаємо оновлене поле після руху | ||
} |
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 simplify it using the switch case
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.
and provide the demo link
src/modules/Game.class.js
Outdated
// eslint-disable-next-line no-console | ||
console.log(initialState); | ||
console.log(this.initialState); |
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.
remove all logs
src/modules/Game.class.js
Outdated
// Об'єднуємо однакові числа, починаючи знизу | ||
// рухаємось знизу вверх по колонці, не рядку | ||
// якщо ми бачимо, що цей елемент {і} === {і - 1} | ||
// тобто дорівнює попередньому елементу, то ми множимо числа на 2 | ||
// TODO: зробити типу такої логіки з двійкою, але можна винести |
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.
and remove all comments
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.
*/ | ||
constructor(initialState) { | ||
// TODO: Замінити по індексу числа |
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.
Remove all comments
// TODO: Замінити по індексу числа |
|
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.
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.
Good job! 👍
No description provided.