5 kyu

Spider man and his enemy

Description
Loading description...
Puzzles
View
AllIssues4QuestionsSuggestionsShow Resolved
  • Please sign in or sign up to leave a comment.
  • monadius Avatar

    It is necessary to write a very specific solution to pass all tests in this kata consistently. Tests should be updated to make sure that correct solutions pass all tests (right now, some correct solutions fail 1-5 random tests almost every time).

  • behan Avatar

    There should be a special label for kata like this, pretty fun!

  • Chiffie Avatar

    There is a security hole, look at my solution :)

  • Voile Avatar

    The test cases are really messed up :(

    Testing for: totalFloors = 26593, totalWindows = 35687, spiderPosition = [10207,9373], spiderPower = 17 (Enemy's position = [1656,26389]) Expected: ''Floor:1,Window:10000'', instead got: ''Floor:10207,Window:9373'' Test Passed: Value == 'true' Testing for: totalFloors = 38727, totalWindows = 2795, spiderPosition = [19235,1141], spiderPower = 2 (Enemy's position = [14911,1884]) Test Passed: Value == ''Floor:19235,Window:1141'' Test Passed: Value == 'true'

    And sometimes things like this appears at the beginning of the random tests (and then follow by all instant catches):

    Testing for: totalFloors = 88633, totalWindows = 38643, spiderPosition = [86402,30080], spiderPower = a (Enemy's position = [50360,15354]) Expected: ''F'', instead got: ''Floor:86402,Window:10000'' Your spider man ran out of power before he found the enemy ;-) - Expected: 'true', instead got: 'false'

    It looks like you've got some concurrency issues in JS :P

    • myjinxin2015 Avatar

      This is due to the fixing of your last issue. Now I don't have much time to fix it(I'm climbing, climbing... ;-)) So I can only perform a "rollback" operations(fixed this issue, but keep the last one)

  • Voile Avatar

    Security hole: Your game.read method is exposed so the power requirement is basically non-existent; I can just call that method again to reset my power.

  • VVVDEEP Avatar

    I am always getting 2-3 tests failure in random section. Maybe I am missing some corner case? Can you point me in right direction or provide any other hint please?

  • docgunthrop Avatar

    Spider man: "Where is enemy? I'll find him and tear him to pieces!"

    Seems uncharacteristically bloodthirsty for your friendly neighborhood Spider-Man.

  • max30272 Avatar
    Time: 665ms Passed: 205 Failed: 3
    ✔ Test Passed: Value == '\'Floor:38572,Window:6410\''
    ✘ Your spider man ran out of power before he found the enemy ;-) - Expected: 'true', instead got: 'false'
    Always out of power before spider man found the enemy. :(
    • myjinxin2015 Avatar

      all power limit are set as my solution used +2, perhaps you can improve your code a bit ;-)

    • max30272 Avatar

      This comment has been hidden.

    • max30272 Avatar

      This comment has been hidden.

    • myjinxin2015 Avatar

      No,no. other three guys and I also use the first method. My mean is that your solution is very close to the final solution, only a bit different need to improve ;-)

    • max30272 Avatar

      瞭解了,我會再試著修改原方法,真的調整不出來再換作法,感謝指點。 OK,I got it.I'll try to improve my code. If I still couldn't make it then I'll change my method. Thanks alot.

  • smile67 Avatar

    Are you sure that all your random tests correctly work? It's difficult to check, but perhaps there are some rounding error possibilities? One example:

    Time: 416ms Passed: 203 Failed: 5
    Test Results:
      Basic Tests and some Edge case
      It should works for basic tests (8 Passed, 0 Failed)
     Completed in 9ms
     :
     :
    
     Test Passed: Value == 'true'
     Log
     Testing for:
    totalFloors = 7664, totalWindows = 35026, spiderPosition = [6569,29591], spiderPower = 14 (Enemy's position = [5439,21268]) 
    ✘ Expected: '\'Floor:5439,Window:21268\'', instead got: '\'Floor:5439,Window:21269\''
    ✔ Test Passed: Value == 'true'