Ad
  • Custom User Avatar

    Thanks for translating this to Go

  • Custom User Avatar

    I have updated the description to be a clearer about the possible input range.

  • Custom User Avatar

    I have added some random test cases now.

  • Custom User Avatar

    Thanks. I've updated the kata to replace the tabs with spaces.

  • Custom User Avatar

    Could you be more specific as to why it is 'not good', please?

    Because the width of the tab in your IDE is different from the tab in the CW editor, and the code that looks like this in the editor:

    func Play(reserves, gambled string) [2]string {
      // first line of solution
      // ...
      // last line of solution
      return [2]string{reserves, gambled}
    }
    

    looks like this on the solutions page (due to the tab being expanded):

    func Play(reserves, gambled string) [2]string {
      // first line of solution
      // ...
      // last line of solution
            return [2]string{reserves, gambled}
    }
    
  • Custom User Avatar

    Could you be more specific (and perhaps constructive in your feedback) as to why it is 'not good', pleae?

    The tabs vs spaces debate is one that has been going on for years - if using spaces instead of tabs solves some formatting issues on this website then that's fine, but the Initial Solution has 1 tab in it...

  • Custom User Avatar

    Using tabs in the initial solution is not good.

  • Custom User Avatar

    No random tests.

  • Custom User Avatar

    You should specify the input range. Mentioning that "numbers will be big" somewhere in the middle of the text is not enough.

  • Custom User Avatar

    Thanks for mentioning this, @stevejaxon. Marking suggestion as resolved.

  • Custom User Avatar

    ...looking into it...will update

  • Custom User Avatar

    I really enjoyed the idea behind this Kata; I loved that it had some personality and that it was very well explained.

    I found that it wasn't too difficult to create a solution that worked for the basic test cases (the '5 FIXED TESTS'), however, when it came to the '100 RANDOM QUESTS' I ran into issues that upon further investigation seemed to be related to underflow/overflow.

    I spent a considerable amount of time trying to work out where the program should accept the loss of precision in order to match some of the random tests that deal with numbers as large as 1^e+140 (only for the expected result to in the region of 1^e+17).

    It would have been great if there was some guidance on how the tests expect integer overlow to be handled or some simple tests that demonstrate the expected output around these edge cases.

  • Default User Avatar

    he's been told that the castle is surrounded with a couple of powerful dragons

    If he'd been told how many dragons there really were, he wouldn't have gone there :)

  • Custom User Avatar

    the castle is surrounded with a couple of powerful dragons

    I would suggest changing "a couple" to a "a number"; a couple specifically refers to there being a small number and not a wide dynamic amount, so this description is misleading (and contrasts with the test cases).