Read the rules in detail: Homework 2: The Fighters' Universe
Sample output:
Java Fighters' Universe! v20071112
== Round 1 ==
Justin attacks Boss Janice!
Justin loses
*** Justin: 10 -> 9
*** Boss Janice: 10 -> 12
== Round 2 ==
Boss Janice attacks Justin!
Boss Janice wins
*** Boss Janice: 12 -> 18
*** Justin: 9 -> 6
== Round 3 ==
Boss Janice attacks Boss Florence!
Boss Janice loses
*** Boss Janice: 18 -> 14
*** Boss Florence: 10 -> 26
== Round 4 ==
Boss Janice attacks Justin!
Boss Janice loses
*** Boss Janice: 14 -> 10
*** Justin: 6 -> 14
== Round 5 ==
Boss Florence attacks Justin!
Boss Florence wins
*** Boss Florence: 26 -> 50
*** Justin: 14 -> 2
== Round 6 ==
Boss Florence attacks Justin!
Boss Florence loses
*** Boss Florence: 50 -> 26
*** Justin: 2 -> 50
== Round 7 ==
Boss Janice attacks Justin!
Boss Janice loses
Boss Janice is killed!
*** Boss Janice: 10 -> -10
*** Justin: 50 -> 90
== Game over ==
*** Ho Yin's power = 10
*** Justin's power = 90
*** Boss Janice's power = -10
*** Boss Florence's power = 26
My work:
FightersUniverse.java: http://pastebin.ca/819554
BossPlayer.java: http://pastebin.ca/819550
Player.java: http://pastebin.ca/819556
How to run: Compile the files (javac *.java) and run it (java FightersUniverse).
Students' works (ordered by last name):
I asked the students to put their works in a programming portfolio. Feel free to comment.
Cham Hin Cheung: Lingnan Fighting II
Chau Chung Yin: The Fighters’ Universe(simple verison)
Ching Ho Yee: Fighters Universe
Chow Chun Ho: Not yet uploaded
Chu Ming Hei: Homework2
Chu Po Ling: Java of Fighters' Universe! 20071212
Fung Ting Pong: The Fighters’ Universe
Ho Ka Wai: ISM001 Assignment 2~The Fighters' Universe
Ieong Weng Tat: Not yet uploaded!?
Lau Wing Lok: Fighters Universe
Law Mei Kwan: 2nd Homework-The Fighters’ Universe
Lee Cornwall: ISM001 Homework 2: The Fighters’ Universe
Lok Hey Young: ISM001 FightersUniverse
Ng Ho Lam:Text Fighter Universe
Pang Wing In: Java Fighters’ Universe
Tsoi Chung Him: Not yet uploaded!?
Wu Po Yu: The Fighters’ Universe