when you do
you apply attr_reader to all objects of that class, but you need that attributes only in one object
some useful docs are here https://ruby-doc.org/ (look for Core API and there for Class, Module, Object, Basic_Object articles)
Nice one !
Thanks for your kind feedback :)
I could not figure it out myself by using Regex but looking at the solution made me learn.
I will keep this in mind as it can be a very nice method to find repeated patterns in strings.
Again a very nice Kata.
Explanation were clear.
Some solution in Ruby are very elegant.
Wow! This is a beautiful solution. With some recursion isn't it? (In the play instance method)
I have difficulty to implement such approach because definitively you need to come back to lines to complete it unitl filling all the squares.
And recursion is a good way to do this.
Not having CS background can you tell me if this is what is called backtracking?
In my code proposal I used this false - true - false structure wrapped into a loop.
But yours is so much more clever and elegant.
Thx. Will keep a copy of it and work through it.
Thank you :-)
I just passed by to say many thanks for this kata.
I upvoted this.
My pleasure! All hhe best
This comment is hidden because it contains spoiler information about the solution