Ad
  • Custom User Avatar
  • Default User Avatar

    Alright... after switching things the wrong way i've switched them right :)

  • Custom User Avatar

    Due to this :

      vector<float> solution = reference_solutions(34,34 , grd);
      vector<float> test = users_solution(34, 34, grd);
      Assert::That(solution.at(c), EqualsWithDelta(test.at(c), .0001));
    

    In error messages, the actual and expected are swapped.

  • Custom User Avatar
  • Default User Avatar

    Thanks for pointing that out... fixed it.

  • Custom User Avatar

    In full test suite:

    main.cpp:101:5: error: use of undeclared identifier 'init_bool_grid'
        init_bool_grid(n, m, checked);
        ^
    
  • Custom User Avatar

    When I am checking all possible paths then sometimes I have got a little better result than in tests.
    Are the test correct for sure?

  • Custom User Avatar

    Although my comment above focuses on the negative, personally, I think that this is a good kata because it gives a real-world situation for doing the dot product. There are many ways to do a dot product, so it gives us practice thinking about it.

    As it is, some people are challenged not by the underlying problem itself, but by the description of the problem. I like that example, @Chrono79, and think that it could strengthen the description.

    Alternately, you could just write it out in words.

    [0 0 0 0 0 1] means that Good has one Wizard. One Wizard is worth 10, so Good's total army is worth 10. [0 0 0 1 1 1 0] for Evil means that there is 1 Goblin, 1 Uruk Hai and 1 Troll. A Goblin is worth 2, Uruk Hai 3 and a Troll is 5, so Evil's army is worth 10. The result of this battle is a tie!
  • Custom User Avatar

    Each race has a certain worth when battling against others.

    That should cover the common error, but if a test was added in the sample tests it would be fine by me. Or adding this example to the description:

         Good                                       Evil
    
     0 0 0 0 0 1                   /            0 0 0 1 1 1 0
        Wizard                     /       Goblin + Uruk Hai + Troll
          10                       /         2    +  3       +   5
          10                       /               10                           
    

    10 = 10 therefore it is a draw

  • Custom User Avatar

    Maybe it's just "Evil", not bad!

  • Default User Avatar

    a bad kata!!!

  • Custom User Avatar

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

  • Custom User Avatar

    The tests, as they currently stand, need serious rewriting:

    • there are no random tests
    • Test.expect should be changed to Test.assertEquals to see what our function has returned
    • The test message should (probably) also show the inputs

    (Also, if anyone wants to raise another issue about test cases being wrong, don't do it unless you can show why. Otherwise they're bogus and just noise.)

  • Custom User Avatar

    Not an issue

  • Custom User Avatar

    Not an issue

  • Loading more items...