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.
Thank you for this comment! I haven't even started putting in the logic of when someone has won, but was very puzzled why it fails the first test unless I set it to start with player 2 instead of player 1.
You expect that message to be announcing whose turn it is now, not whose turn it just was!
Ruby
It looks like the kata is broken, I just sent the array that was in the game object to the check method and all the tests passed.
Another problem with kata is not a very clear description, it is worth showing a step-by-step example in more detail.
Working in Ruby and stuck because of the handling of variables. All elements of string in array point to same object, so modifying it causes all the elements to change. Hint needed. How do get multiple objects that all are the same word?
Does that mean the top-level object could be an array? If so, what would the dot notation for that be?
I was supprised when I did a quick search that this had not already been created before. I'll close this kata if you believe its not unique enough ππ»
I somewhat remember a blue JS kata with objects and arrays that is very similar, but can't seem to find it.
Duplicate?
An unmaintained beta duplicate:
Similar katas without arrays:
Cool, it works now. I'm just worried this might be a duplicate kata.
yep, appears to be resolved.
Both your solutions now pass all tests. Thanks for letting me know there was a bug
So sorry about that..my bad, should work now.
Yeah I feel like there's an issue somewhere still:
input: {"V":[{"h":"2"},{"r":2}],"d":0,"G":{"ef":[],"wffw":[{"fwf":[{"wf":[{"wf":[{"wfwf":[{"wfwfw":[{"wfwf":"f"}]}]}]}]}]}]},"c":{"d":"f","g":{"g":{"g":"d"}}}}
expected { 'V[0].h': '2', 'V[1].r': 2, d: 0, 'G.wffw[0].fwf[0].wf[0].wf[0].wfwf[0].wfwfw[0].wfwf': 'f', 'c.d': 'f', 'c.g.g.g': 'd' } to deeply equal { d: 0 }
Hi @B1ts I've added better logging now to hopefully debug this. Please could you try again?
Are random tests ok? I'm getting some strange logs like the one below (multiple "objects" for one test):
This leads me to believe you're calling user function in your ref solution somewhere.
Loading more items...