Ad
  • Custom User Avatar

    I got the same problem, did you solve this issue by any chance?

  • Custom User Avatar

    Your PHP function doesn't account for all possible game outcomes, specifically the cases where "rock" and "paper" are played against each other. Since your function doesn't return anything for those cases, it returns null by default, which leads to the failed test cases. To fix this issue, you need to add conditions to handle the missing game outcomes: when "rock" plays against "paper" and vice versa. Make sure your function returns a result for every possible combination of inputs it might receive, ensuring it never unintentionally returns null.

    Your solution has a bug, it's not a kata issue.

  • Custom User Avatar

    That's just a formatting preference. What's I think is a bad formatting preference is putting anything after a scope-closing } on the same line.