Ad
  • Custom User Avatar
  • Custom User Avatar

    You're Welcome!

  • Custom User Avatar
  • Custom User Avatar

    Nope, the KO rule does not prohibit multiple passes. I don't believe there is any limit on consecutive passes in this kata.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Also, the next move after the rollbacks should be 8F, not 5C. Seems like you have a bug in your code somewhere :o .

  • Custom User Avatar

    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?

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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?

  • Custom User Avatar

    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.

  • Custom User Avatar

    Python/JS updated! (CoffeeScript is invalid with new tests ;--;)

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar
    • I've added an invalid handicap usage section to the description.
    • The opposite color should make the first move after handicap stones have been placed. A test/tests will need to be added for that.
    • I think that 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...