Ad
  • Custom User Avatar
    • Description also does not mention the coordinates given as well as the association between direction of movement and sign (+ / - ) of the coordinate.

    • Should be language-agnostic

    As a side note for solvers, coordinates decrease upon moving above the Y-axis !

  • Custom User Avatar

    Dashatize it has good tests to learn from. Click on "Show Kata Test Cases" (I can't link straight to there) and read how he does it. That's the general pattern; you can build on that if necessary.

    Generating good random inputs can be complicated, and there are some gotcha's, but those'll probably be pointed out as you go along.

    There are no published documents that take you beyond the basics really. Read tests and comments on others' kata and learn what you can do wrong. Writing tests is an art as much as a craft, and not everybody is good at it, so don't take anything anybody else does as gospel.

    And never ever use Test.expect ! :P

  • Custom User Avatar

    Hello,

    Thank you for your helpful feedback. I'm new to making kata's so I don't know how I can make random tests for the Dunkirk kata. Could you please point me in the right direction?

    Kind regards,

    Bart

  • Custom User Avatar
  • Custom User Avatar

    Nice kata. Three suggestions:

    • Explicitly mention coordinates are given as [y,x]. It can be deduced from the examples, but why make it a puzzle?
    • Capitalise "Queen". This is perhaps a matter of taste.

    Your function returns two outcomes.

    • No, it returns one of two outcomes.