Ad
  • Custom User Avatar

    i really should have put a bit more thinking into this - i forgot to check if the player has won

    thank you for pointing that out

  • Custom User Avatar

    yup, forgot to copy paste into sample tests - thanks

  • Custom User Avatar

    I just copy-pasted my java tests - my bad. I hope this "new" version is better.

  • Custom User Avatar

    If it is too similar, I could make this a bit more complex by including both starting possibilities, resulting in 3 kata's about this puzzle:

    • simplified one way
    • simplified both ways
    • complete puzzle

    (just an idea)

  • Custom User Avatar

    good hint, when searching for similar kata's i only found "NIM - the game" (https://www.codewars.com/kata/54120de842dff35232000195, i think there is enough difference hence its call Simplified Nim)

    im not sure if it is too similar,
    i think the main difference is throwing exceptions (and obviously the AI goes second in this kata)

  • Custom User Avatar

    you're absolutely right
    the random tests now do random stuff until they can "end" the game, and then they will win it
    (now they are at least not completely useless, even tho the kata is too easy for useful random tests)

  • Custom User Avatar

    the print was, the bigger brain lag fix should be up now
    (sometimes code wars is a bit bugged when a new test is released)

  • Custom User Avatar

    woops, forgot to take that out

  • Custom User Avatar

    it should be fixed now

  • Custom User Avatar

    yikes, i thought i fixed that
    not containing a single word is indeed an issue.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    that is intended

  • Custom User Avatar

    first of all, thank you for the feedback.

    could you explain what you mean?
    it is (and should be, its a 7kyu) possible that the wrong word never appears in the string

  • Custom User Avatar

    It is defined in the 2-dimensional array words that is given as an input (its a 7kyu after all).
    Example:
    "badword" is the wrong word and "correctword" is the correction to it
    then the array would be [["badword","correctword"]]

  • Custom User Avatar

    Fixed it.
    Youre right about the empty array, changed that too.
    The random test already generates empty lists

  • Loading more items...