Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
(UwU✿)
meow
This code should not be "Best practice" for at least the 2 following reasons:
It is inefficient since it checks the entire grid for every move instead of focusing on the pieces around the latest one added to the grid.
The 2 if statements are so complex and similar that they should be put into a function taking either 'Y' or 'R' as parameter. This would help during development and maintenance.
Wouldn't using set ensure the result is sorted though?
This comment is hidden because it contains spoiler information about the solution