Ad
  • Custom User Avatar

    Thanks to another comment, this is solved. The Kata description below is incorrect.

    Any activities completed that are ranking 2 levels or more lower than the user's ranking will be ignored

    A correct description would be:

    Any activities completed that are ranking 2 levels or more lower than the user's ranking will be worth 1 point

  • Custom User Avatar

    Yes, JavaScript. I do get these failed tests (and others similar):

    • After applying rank of -1 the progress was expected to be 21, but was actually 20
    • After applying rank of 3 the progress was expected to be 61, but was actually 60

    The class currently should do what the instructions describe, so I'm not sure what I am misunderstanding about the desired behaviour. Why should progress be 21, 61, 51, 91 etc. instead of 20, 60, 50, 90? What does this test look like?

  • Custom User Avatar

    After applying rank of -1 the progress was expected to be 21, but was actually 20

    I am seeing this broken test. The only scenarios I can think of that should result in progress 21, are the following - but in these cases my class test suite passes.

    user.rank = -2;
    user.progress = 0;
    for (let i=0; i<17; i++) { U.incProgress(-1); } // Complete 17 x -1 activities.
    Test.assertEquals(user.rank, -1);               // Pass
    Test.assertEquals(user.progress, 21);           // Pass
    
    user.rank = -2;
    user.progress = 1;
    user.incProgress(-1);                           // Complete 2 x -1 activities
    user.incProgress(-1);                           // starting from progress 1.
    Test.assertEquals(user.rank, -2);               // Pass
    Test.assertEquals(user.progress, 21);           // Pass
    

    What am I missing here?

  • Custom User Avatar

    Removed comment, posted as issue instead of reply.

  • Custom User Avatar

    Thanks Hilary, Having several clans would work as well right? This field works as a comma separated list?