Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Nick_Rimer,validated by @Potxoki,@Unilasalle-supremacy and @Raizel.
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 @Nick_Rimer,validated by @Potxoki,@Unilasalle-supremacy and @Raizel.
If you have any issues, feel free to ping them.
Simulation is a good tag for this puzzle.
Output format does not mention how the winner message should be formatted
Line 5: If Stack 1 defeats Stack 2 there must be a win message and this line will be the last.
should have explicitly mentioned:
As for the winner message, it should state who won and how many units left.
OTOH, the line number for the winning condition is kind of misleading (starting from line 5). It should be
If Stack 1 defeats Stack 2 there **must** be a win message and this line will be the last. Otherwise, the log format will continue as follows:
Line 5: Stack 2 attack result (who attacks whom dealing how much damage).
Line 6: Number of units perished during the attack.
Line 7: Round end separator ##########
If Stack 2 defeats Stack 1 there **must** be a win message and this line will be the last. Otherwise, the log format continues back to line 1 again whilst cycle continues until one of the stacks has no more units (all units dead)