Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • Alright... after switching things the wrong way i've switched them right :)

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

  • :D

  • Thanks for pointing that out... fixed it.

  • In full test suite:

    main.cpp:101:5: error: use of undeclared identifier 'init_bool_grid'
        init_bool_grid(n, m, checked);
        ^
    
  • 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?

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

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

  • a bad kata!!!

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

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

  • Not an issue

  • Not an issue

  • Loading more items...