Beta

Soccer Fixtures Results Table

Description
Loading description...
Algorithms
  • Please sign in or sign up to leave a comment.
  • menkauri Avatar

    Hello, looks like a misprint in kata description: ["TEAM C", "6", "5"] instead of ["TEAM C", "6", "4"], or TEAM C won two matches (1x0 and 3x2). Receives 6 points and a total of 4 scored goals. instead of TEAM C won two matches (1x0 and 3x2). Receives 6 points and a total of 5 scored goals.

    • Chrono79 Avatar

      TEAM C won two matches (1x0 and 3x2). Receives 6 points and a total of 4 scored goals.

      Should be:

      TEAM C won two matches (2x1 and 3x2). Receives 6 points and a total of 5 scored goals.

      Given these two matches results:

      "TEAM A 1 x 2 TEAM C", "TEAM B 2 x 3 TEAM C"

      What's wrong there are the first match result and the total scored goals.

  • B1ts Avatar
    given [PARIS DEVIL GERMAN 2 x 2 CEILESTER CITY, CEILESTER CITY 4 x 4 PARIS DEVIL GERMAN]
    expected [ [ 'TEAM NAME', 'PTS.', 'GLS.' ],
      [ 'CEILESTER CITY', '2', '6' ],
      [ 'PARIS DEVIL GERMAN', '2', '6' ] ] 
    to deeply equal [ [ 'TEAM NAME', 'PTS.', 'GLS.' ],
      [ 'PARIS DEVIL GERMAN', '2', '6' ],
      [ 'CEILESTER CITY', '2', '6' ] ]
    

    It's not mentioned how this should be handled. Sort by name or appearance in initial list?

  • costagavras Avatar

    Nice kata, thank you Calvin

  • FArekkusu Avatar

    No random tests.

    • CalvinNunes Avatar

      actually, I tried to make all tests random... by myself. try to run the "Attemp" more than once and the teams and scores should change

    • FArekkusu Avatar

      Now I see what you did, but why on earth is code responsible for random tests preloaded? It should be a part of the fixture too.

    • CalvinNunes Avatar

      cause I already had all the code ready here in my PC, so since I think that codeWars use a extremely complex system to create randoms and etc... I just decided to do by myself and pasted my code there. I really want ta this is acceptable, if not, I'm going to remove this kata :(

    • FArekkusu Avatar

      code responsible for random tests should be a part of the fixture too

      Literally move everything into the fixture (final test section).

    • CalvinNunes Avatar

      When creating the kata, I have "Complete Solution", "Initial Solution", "Preloaded", "Test Cases", "Example Test Cases" in which of those I should add my random matches creator code?

    • FArekkusu Avatar

      "Test cases"

    • CalvinNunes Avatar

      Nice, Thanks. I did it. It's okay now?

    • FArekkusu Avatar
      Issue marked resolved by FArekkusu 6 years ago
  • FArekkusu Avatar

    Sample tests:

    ReferenceError: mts is not defined
        at /home/codewarrior/index.js:161:49
        at begin
        at it
        at /home/codewarrior/index.js:160:5
        at /runner/frameworks/javascript/cw-2.js:152:11
        at Promise._execute
        at Promise._resolveFromExecutor
        at new Promise
        at describe
        at /home/codewarrior/index.js:158:5
        at /home/codewarrior/index.js:167:5
        at Object.handleError
    
  • JohanWiltink Avatar

    Example tests would be nice.