[Community Puzzle] Street Fighter : Level I - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @nguyen.lam,validated by @JeZzElLutin,@kayou and @Regulus136.
If you have any issues, feel free to ping them.

Instructions do not specify what the attack options are. The example shows only “KICK” and “PUNCH” but does not explain that “SPECIAL” means to use the special attack.

Instructions do not specify the win condition, only that there will always be a winner. Losing all health is clearly an immediate lose condition, making the other player the winner. But in cases where both survive, is the winner based on the number of hits, the total damage delivered, or total health remaining? Given that various sports use different win conditions, this should be specified.

if there is no KO, the winner is the one with more life.

Should add that to the instructions.

The special attacks are a little bit ill defined. For solving the problem, you needed to know that Vlad’s attack is based on the opponent’s rage BEFORE you hit, and then the rage is added. It is also not clear whether the opponent’s rage should be set to zero, and then you add one rage point for a hit, or whether it should remain zero. For the attack which is based on damage, it is unclear whether this is total damage, or damage from the previous successful attack. I assumed the former, but I don’t know if this is important for any of the tests,

For all attacks:

  • you apply the attack that means you remove the number of points according to the attack: Kick=4 means: you remove 4 life’s points. That’s it.
  • Then the champion who received the attack has his rage increases by 1.
    IT is written in rules: “- When a champion is hit, his/her rage increases by one.”

When a champion uses his SPECIAL attack:

  • you apply the SPECIAL attack then you increase the rage for the champion who receives the hit.
    For VLAD’s special attack it is written: the hit value is : 2 x (VLAD’s rage + opponent’s rage) then vlad’s rage = 0 (cf rule: - When a champion uses special attack, his/her rage restarts at 0.) then opponent rage = 0, so the opponent rage is also reset to 0.

For all champions, when using a special attack:
the champion’s rage is reset to zero (cf rule: When a champion uses special attack, his/her rage restarts at 0.)
the opponent’s rage is increased by one (cf rule: When a champion is hit, his/her rage increases by one)
That’s it !

“the opponent’s rage should be set to zero” => it is never the case except for Vlad’s opponent and it is written in the special attack for vlad: (2*(rage+opp.rage);opp.rage=0)