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.
Okay, I played around and it accepted it. My bad.
That's a problem with your code, not a kata issue. It's not throwing when it should do it. I used
throw std::runtime_error("Game Over!");
in my code and it worked. I could make your code work too, check this: https://www.codewars.com/kata/568018a64f35f0c613000054/discuss#635d7d267dadeaf934cb3000 With your current code, if you have 2 lives, you can guess wrong two times and you can make one more guess."function should throw an error" is the only explanantion given,
but
throw std::runtime_error("Game Over!");
is not accepted in C++
honestly yeah. I was happy with the solution I came up with but I like making matrices
@B1ts I know this is an old post but still wanted to say thank you so much for your explanation! It was super helpful, especially with the
log = console.log
!Nice and clever use of pattern matching — short, readable, and does exactly what it needs to. Thanks for the fun little challenge!
The kata is ok, please consider adding "OOP" tag to it
yes the draw and another output that's says p1 won
What do you mean? Are you talking about how to get
Draw!
some of the codes we're supposed to write are not in the instructions given,
but still wrote it in a pythonic way though... way to go rossum
Can the parameter in the guess method be changed to something other than n? I was confused as to what was being input there at first
what the hell
Rejecting as superseded by a fork with updated description.
Solution sharing != kata suggestion.
This comment is hidden because it contains spoiler information about the solution
Loading more items...