If the "power difference" is zero before the attack (i.e. both players have the same power), then use 1 as the difference.
Sample of output:
Round 1You can download the file here:
Player Ho Yin's power = 100
Player Jenifer's power = 100
Ho Yin attacks Jenifer!
Jenifer wins
Round 2
Player Ho Yin's power = 99
Player Jenifer's power = 101
Ho Yin attacks Jenifer!
Ho Yin wins
...
Player.java: Player.java
FighterTest(main program): FighterTest.java
Or you may download the source code as a zip file:Lingnan Fighting
沒有留言:
發佈留言