-
Notifications
You must be signed in to change notification settings - Fork 23
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
base: gh-pages
Are you sure you want to change the base?
Щукина Ирина #22
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.
Не хватает тестов на игру, т.е на последовательность кликов, что они отрабатываются корректно. Сейчас все тесты на один клик
} | ||
} | ||
if (cellId + 1 < 16 && cellId % n !== n-1) { | ||
if (parseInt(cells[cellId + 1].value) === -1){ |
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.
Почему не объединила в одном if?
} | ||
} | ||
|
||
if (board === undefined){ |
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.
if (!board)
} | ||
buttons[i][j] = button; | ||
playGround.appendChild(button); | ||
if ((i*4 + j + 1) % n === 0) { |
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.
CodeStyle немного страдает
if (playGround.addEventListener) { | ||
playGround.addEventListener('click', swap); | ||
} else { | ||
playGround.attachEvent('onclick', swap); |
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.
👍
})).to.have.length(15); | ||
}); | ||
|
||
it('should move the cell to a neighboring empty cell', function() { |
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.
Здесь хорошо бы 4 теста, т.к бывают клетки снизу, сверху, справа и слева.
https://iriskis.github.io/qa-task-05/