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

Щукина Ирина #22

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open

Conversation

iriskis
Copy link

@iriskis iriskis commented May 10, 2017

Copy link

@mokhov mokhov left a comment

Choose a reason for hiding this comment

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

Не хватает тестов на игру, т.е на последовательность кликов, что они отрабатываются корректно. Сейчас все тесты на один клик

}
}
if (cellId + 1 < 16 && cellId % n !== n-1) {
if (parseInt(cells[cellId + 1].value) === -1){
Copy link

Choose a reason for hiding this comment

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

Почему не объединила в одном if?

}
}

if (board === undefined){
Copy link

Choose a reason for hiding this comment

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

if (!board)

}
buttons[i][j] = button;
playGround.appendChild(button);
if ((i*4 + j + 1) % n === 0) {
Copy link

Choose a reason for hiding this comment

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

CodeStyle немного страдает

if (playGround.addEventListener) {
playGround.addEventListener('click', swap);
} else {
playGround.attachEvent('onclick', swap);
Copy link

Choose a reason for hiding this comment

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

👍

})).to.have.length(15);
});

it('should move the cell to a neighboring empty cell', function() {
Copy link

Choose a reason for hiding this comment

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

Здесь хорошо бы 4 теста, т.к бывают клетки снизу, сверху, справа и слева.

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