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 silution #1067

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

Conversation

gorbachovam00
Copy link

Copy link

@VitaliyBondarenko1982 VitaliyBondarenko1982 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.
Please check comments.

// startButton.textContent = 'Restart';
// updateUI();
// checkGameStatus();
// });

Choose a reason for hiding this comment

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

do not keep commented code

});

document.addEventListener('keydown', (event) => {
if (game.getStatus() !== 'IN_PROGRESS') {

Choose a reason for hiding this comment

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

move to constants statuses.
better to palce all statuces strings in object.

'use strict';

// Uncomment the next lines to use your game instance in the browser
// const Game = require('../modules/Game.class');
// const game = new Game();

// Write your code here
class Game {

Choose a reason for hiding this comment

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

why you wrote class Game in main.js?
move code to /modules/Game.class and import here (uncomment code above)

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.

I can play the game even if I don't click on the Start button
image

  1. do not create the new cell if the board didn't change after move
Screen.Recording.2024-12-11.at.20.13.24.mov

Copy link

@VitaliyBondarenko1982 VitaliyBondarenko1982 left a comment

Choose a reason for hiding this comment

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

Almost done.
Move to right still add new cell, even when wasn't any move or cells merge.

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.

Hi, you need to fix demo link and check it after
image

Add a favicon on the page
image

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.

4 participants