Ad
  • Custom User Avatar

    i dont remember, but the language was Javascript

  • Custom User Avatar

    You must add a test that forces you to continue rotating turns even if one of the robots does not attack. In this example must be win Robot2, but if you only change round when it was attacked had been produced, in that case robot 2 only excute one of all attacks, and how his attack is less he lost. My initial code worked whitout change round if attack is not produced and pass the all test when i tryed 2 or 3 times.

    Add a test that looks like this example and returns that robot two won. Don't leave it to chance...

    fight({
        "name": "Robot1",
        "health": 100,
        "speed": 200,
        "tactics": ["supermissile"]
    },
        {
            "name": "Robot2",
            "health": 100,
            "speed": 0,
            "tactics": ["missile","missile","missile"]
        },
        {   "suppermissile":40,
            "missile": 20
        })" => 'Robot2 has won the fight.'
  • Custom User Avatar

    2/2 A subsequence must be delivered in order. You can say on the instructions that you want it not to be ordered, or it is, or this is and that is not, it is your choice. That you cannot do is require in the test that the string is ordered if it is made up of numbers and not if it is made up of letters without saying anything about this on the instructions...

  • Custom User Avatar

    TWO ISSUES

    1/2 - You must add that although they do not have to be consecutive, they must maintain the direction towards the end of the array, that is, if the first matching term is at index 3 of the longest string, the second cannot be at an index less than 3 ... Your instructions lead to error, non-consecutive does not imply that it must have an address, and you require it in LCD("anothertest", "notatest") ...

  • Custom User Avatar

    Friendly reminder: It's more declarative use a block instructions "if", "else if", "else". That a triple nested of ternaries on a one line.

  • Custom User Avatar

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

  • Custom User Avatar

    added

  • Custom User Avatar

    You're right, I should start with a comma, however since the element's primitive type shouldn't be a problem I've removed that paragraph. Thanks to comment!