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.
yw!
You're Welcome!
:)
Nope, the KO rule does not prohibit multiple passes. I don't believe there is any limit on consecutive passes in this kata.
Rolling back len-n+1 should be correct. I'm guessing that there are some subtleties in your solution that are missing in order to solve the more complex random problems (Some strange combination of resets/passes/rollbacks/moves is breaking your code and is not tested for explicitly in basic tests). It's hard to say what could be throwing your code off. It would be very strange if you could pass all the random tests and not any of the basic ones.
Also, the next move after the rollbacks should be 8F, not 5C. Seems like you have a bug in your code somewhere :o .
This is very strange. I'm not seeing any of the set tests that pass 5C twice like in your logs. It looks like you passed the first asserting correct turn test but when rolling back two your code breaks?
The Ko rule should only apply to moves on the board, not passing of turns. A pass could cancel out the Ko rule if it's done between moves where the Ko rule would otherwise apply.
I believe the test you are talking about passes turns (
pass_turn
) instead of moving stones on the board. Both should count as a turn being taken.25 is the limit because that's the length(alphabet) - I. After Z it's unclear what the next value should be. I don't mind leaving the lower limit up to the implementer (I believe the tests go down to 3x3 or 4x4 boards as a min), is there value in adding a limit?
Reset seems to be working fine in Python. I'm not sure about updating the description? The second item under
Invalid handicap usage
states that you can't place handicap stones down after they have already been placed (I understand if you didn't see it ;p).Thanks for updating the coffeescript translation! Does the random testing for it need updating? It should very similar to the JS version in terms of functionality.
Python/JS updated! (CoffeeScript is invalid with new tests ;--;)
Desc does say
A player cannot place down handicap stones after the first move has been made or handicap stones have already been placed. Throw an error if this happens.
.. Meh, I'm going to go ahead and add a couple tests. One with two handicap calls in a row (error) and the other with a reset in between handicap calls (ok). Thanks for pointing this out, ba78.Calling handicapStones multiple times without reseting the board in between should raise an error imo. I don't see value in adding a test for it though.
Resetting the board should clear all of the stones from it
should be enough of an indication that reset should clear handicap stones as well.Loading more items...