34 lines
866 B
Java
34 lines
866 B
Java
package exp5;
|
|
|
|
import com.experiment.DragonSlayer;
|
|
import com.experiment.FingerMan;
|
|
import com.experiment.SwordSaint;
|
|
|
|
public class RoleDemo {
|
|
public static void main(String[] args){
|
|
DragonSlayer d = new DragonSlayer();
|
|
SwordSaint s = new SwordSaint();
|
|
FingerMan f = new FingerMan();
|
|
|
|
System.out.println(d.getName()+"加入战斗");
|
|
System.out.println(s.getName()+"加入战斗");
|
|
System.out.println(f.getName()+"加入战斗");
|
|
System.out.println("\n作战开始!\n");
|
|
|
|
/*交互
|
|
* 战斗过程...
|
|
* 以后再写^v^
|
|
*/
|
|
System.out.println("***激烈的战斗过程***\n");
|
|
|
|
d.finishingMove();
|
|
s.finishingMove();
|
|
f.finishingMove();
|
|
|
|
|
|
System.out.println("\n全死了!\n");
|
|
|
|
System.out.println("\n战斗结束\n");
|
|
}
|
|
}
|