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.
I'd suggest using Array#length or Array#size instead of Array#count here as they don't check whether a block was given.
Awesome solution overall, the array-adding one-liner is pure gold for readability here.
The description size 10 example ends on the element [5][5]. Shouldn't it be able to move to the element [5][4] before ending? I'm guessing the intended starting point is the element [0][0], so at the element [5][5] the snake is moving to the left. If this is the case, moving to the element [5][4] wouldn't mean it touched itself.
The description should specify what is considered an empty element:
It should also specify the starting point.