Slide Puzzle
{
$nextTick(() => {
if (
(['up', 'down'].includes(moves[i - 1]) && $el.scrollTop === ($el.scrollHeight - $el.offsetHeight)) ||
(['left', 'right'].includes(moves[i - 1]) && $el.scrollLeft === ($el.scrollWidth - $el.offsetWidth))
) {
slides[slides.indexOf(null)] = slides[i - 1];
slides[i - 1] = null;
}
});
}"
>
Move one square at a time in this challenging slide puzzle game. Put the numbers in order with "1" starting at the top left corner.