Ad
  • Custom User Avatar

    I think if you think about this one more, you can do it this way. But I feel like it was so far to type I might as well just write out all the combos I can think of.

  • Custom User Avatar

    What does this mean?

    "E" if an error of any kind occured during the interpretation (invalid input or invalid move required)

    How do we know who made an error? If someone does not have a legal move, can they make an "invalid" illegal move? Or is the turn flipped and the other made the error? And what if both players don't have a next legal move, and there still is a move in the input, who made the error?

  • Custom User Avatar

    well, it depends how you interpret the description I guess. The description should either:

    • state the exact rules, with examples
    • OR tell us that it's a prerequisite that we known the rules, and link us to the proper rules somewhere online
  • Custom User Avatar

    I watched a quick guide of the rules. For instance, the statement below is incorrect. You can't flip any pieces in between, you can only flip from the piece you place to your first own piece.

    A player can play only if he has a valid move. Valid moves are those in which an opposing piece is trapped (horizontally, vertically, or diagonally) between one already on the board, and the piece being placed. Any pieces between will be flipped (could be more than one!).

    For instance

    BWWBWW
    
    -> if you place a B at the right, you end up with
    
    BWWBBBB
    
    
  • Custom User Avatar

    All these ARE explained. Not spoon fed, ok, but the info are present.

  • Custom User Avatar

    I can't imagine how bad the description was before. It's still a bad description. You don't explain how we should interpret the input. You don't explain how a valid moves looks like.

  • Custom User Avatar

    fixed for python.

  • Custom User Avatar

    There's so much in Python you'd have to disable to make this minimally difficult...

  • Default User Avatar

    Ah okay, thanks! I was going to fork the PHP translation for this raised issue, but decided to ask this first :)

  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    Generics cannot take primitives so Optional<boolean> is not a thing and Optional<Boolean> is just well like a Boolean in the first place.

    Changed to null like said in description.

  • Custom User Avatar

    Answered your own question didn't you? It's technically very much possible.

    Running randomised full tests would have been better tho; author's other kata does that.

  • Custom User Avatar
  • Custom User Avatar

    Java possesses Option in its stdlib iirc.

  • Custom User Avatar

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

  • Loading more items...