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.
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:
When a champion uses his SPECIAL attack:
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)