Draft

Pawn March

Description
Loading description...
Games
Arrays
Recursion
  • Please sign in or sign up to leave a comment.
  • Blind4Basics 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

  • brodiemark 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?

    • Umarkhan42 Avatar

      In alot of cases this is true

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

    • brodiemark 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.

  • TheLittlePixiesFriend 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

  • Fbasham Avatar

    This comment has been hidden.