I ran the program ten times.
Expected Program Output (8/10)
[Zombie] << Spawns with [2 hp] [Player] << Spawns with [10 hp] [Player] << (4 dmg). [Zombie] dies (2 overkill)
Uncommon Program Output (2/10)
[Player] >> combat [Zombie] << Spawns with [2 hp] [Player] << Spawns with [10 hp] [Player] << (1 dmg). [Zombie] << (0 hp). [Zombie] << (2 dmg). [Player] dies (2 overkill)
The above output is off because "2-1" is not "0" and an if statement is called to return the program "0" when the player's health or zombie's health reaches "0". Also, "10-2" should not kill the player therefore no overkill value.
This post has been edited by EvanSchoffstall: 03 February 2011 - 12:22 PM

New Topic/Question
This topic is locked



MultiQuote






|