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 #1092

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

Develop #1092

wants to merge 3 commits into from

Conversation

nex1994
Copy link

@nex1994 nex1994 commented Dec 21, 2024

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on implementing the 2048 game! 🎉 The code meets the task requirements and constraints, and the game functions as expected. Just make sure to correct the typo in the Game class method name from addRandomTitle to addRandomTile to prevent any runtime errors. Keep up the excellent work and happy coding! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

}

if (moved) {
this.addRandomTitle();

Choose a reason for hiding this comment

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

There seems to be a typo in the method name addRandomTitle. It should likely be addRandomTile to reflect the action of adding a random tile to the board.


start() {
this.status = 'playing';
this.addRandomTitle();

Choose a reason for hiding this comment

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

Same typo as above: addRandomTitle should be addRandomTile.

start() {
this.status = 'playing';
this.addRandomTitle();
this.addRandomTitle();

Choose a reason for hiding this comment

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

Same typo as above: addRandomTitle should be addRandomTile.


startButton.addEventListener('click', () => {
if (startButton.classList.contains('start')) {
game.start();

Choose a reason for hiding this comment

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

Ensure that the start method in the Game class correctly initializes the game state. There was a typo in the Game class regarding the method name addRandomTitle, which should be addRandomTile. Make sure this is corrected in the Game class to avoid runtime errors.

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