Ad
  • Default User Avatar

    It's a great idea, but I was able to solve it without really taking the walls into account (except in the sense that they block the path, as an enemy pawn does). Unless you can convince me that they really add something, I think it would be a stronger kata without the walls. To me they are a distraction, and not real chess.

  • Custom User Avatar

    Hi,

    • The test framework isn't used properly (decorators + describe vs it blocks. See the docs if needed)
    • The full test suite should start with fixed tests
    • Why the mixed types? wull strings would make much more sense, or at least, lists of strings.

    Cheers

  • Custom User Avatar

    In alot of cases this is true

    But there are some scenarios where having a wall instead of a pawn changes the outcome

  • Default User Avatar

    I haven't solved this yet - my question is based on the description. Are the walls necessary? If each wall was replaced by a black pawn, would the problem be basically the same?

  • Custom User Avatar

    What I have edited:

    1. changed the wording of the description to the above
    2. changed the parameter name to board
    3. added 2 example tests with descriptions

    I used chess.com to create the images of the board

  • Default User Avatar

    Great job! What did you use to create the images of the boards?

    Minor editing suggestions:

    Replace "b is ..." by "The board is ...."

    Replace ""W" representing the WhiteKing" by ""W" representing the white king".

    Replace ""0" representing a square with no pieces on it" by ""0" representing an empty square".

    Replace "if the black king is in checkmate return true and false otherwise."
    by "Return true if the black king is in checkmate and false otherwise."

    I recommend changing the parameter name in the Initial Solution from b to board. Encourage the use of descriptive variable names!

    It would be nice if the sample tests showed example of all the various cases: not check, check but king can escape, check but king can capture queen, & mate. Even better would be if the random tests were subdivided into those different types - this would help with debugging.

    There are related problems, like Check and Mate? and Is the King in check ?. But by simplifying the board I think you have added something.

  • Custom User Avatar

    Badly written description with multiple typos and formatting (minor issue)

  • Custom User Avatar

    Ah I see how that is a bit confusing now, ill change it so that its easier to understand

  • Default User Avatar

    It says "It is always whites move", which I took to mean it's white's turn next.

  • Custom User Avatar

    Thank you. I am glad you liked it.

  • Custom User Avatar

    It says in the description it is always whites move

  • Default User Avatar

    Is this Kata based on black not having turns?

    Consider this case:

    [
        [0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 1, 0],
        [0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 'B', 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 'W', 0],
        [0, 0, 0, 0, 0, 0, 0, 0]
    ]
    

    White's only option is to move forward. Black then has to either move forward, or take white. In either case there's no way for White to get around the wall

  • Custom User Avatar
  • Custom User Avatar

    fixed

  • Custom User Avatar

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

  • Loading more items...