Ad
  • Default User Avatar

    Attempting this Kata with C# I am unable to see how I can use the built in Mapping/Dictionary, which previously worked as MorseCode.Get(""), and now seems like it may have a different name, but none of my attempts to use it with any name have worked. I can't compare the second part of this kata since it is not in C#. Will I need to create my own mapping?

    Instructions indicate: The Morse code table is preloaded for you as MORSE_CODE dictionary, feel free to use it. (For C, the function 'morse_code' acts like the dictionary. For C++ a map is used.)

  • Default User Avatar

    Ok, that makes sense, but I beleive the Kata could be improved by including those specific requirements in the instructs. As they are, the instructions leave this very open ended. Nowhere does it indicate that you are only to create lines IF they create a box, one would assume they are creating an AI to play against, and the AI would be useless if could not take a turn in a case in which it could not score...

    Thanks for the good Kata, however, I just was frustrated I couldn't get a working solution after expending a good deal of effort on it!

  • Default User Avatar

    HELP! I'm missing something!
    BasicTest1 test: "{ 1, 3, 4 }" expects a solution of "{ 1, 3, 4, 6 }"
    Why is the solution not "{ 1, 3, 4, 6, 7}" since the instructions say, "The player who completes the fourth side of a 1×1 box earns one point and takes another turn."
    and the BasicTest3 test: "{ 1, 2, 3, 4, 5, 8, 10, 11, 12 }" requires that behavior to achieve: { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }

    Why do you not score another turn when completing the Box: {1, 3, 4, 6}?
    This same logic applies to BasicTest2: { 7, 9, 12 }

    ALSO: why does it not play a line in the tests, when you pass in an empty game: new List { }
    I would assume this means it is the first turn and the computer is going first, therefore, it would return a single line result since it played a line!

  • Default User Avatar

    I used the SUM method wondering if the tests would be vague enough to fall of it. It did... this test could easily be added to catch my sneaky solution.

            var test = new int[][]
            {
              new int[] {5, 5, 5, 5, 5, 5, 5, 5, 5}, 
              new int[] {5, 5, 5, 5, 5, 5, 5, 5, 5},
              new int[] {5, 5, 5, 5, 5, 5, 5, 5, 5},
              new int[] {5, 5, 5, 5, 5, 5, 5, 5, 5},
              new int[] {5, 5, 5, 5, 5, 5, 5, 5, 5},
              new int[] {5, 5, 5, 5, 5, 5, 5, 5, 5},
              new int[] {5, 5, 5, 5, 5, 5, 5, 5, 5},
              new int[] {5, 5, 5, 5, 5, 5, 5, 5, 5},
              new int[] {5, 5, 5, 5, 5, 5, 5, 5, 5},
            };
    
  • Default User Avatar

    Wtf, this isn't my solution... how did someone else's solution get put as mine... oh well.

  • Default User Avatar

    This solution makes me very sad...