package _06_面相对象综合练习.练习1;

public class Test {
    public static void main(String[] args) {
        Role role = new Role("乔峰", 100, "男");
        Role role1 = new Role("鸠摩智", 100, "男");
        System.out.println(role);
        System.out.println(role1);
        while (true){
            role.attack(role1);
            role1.attack(role);

            if(role.getBlood() == 0){
                System.out.println("乔峰被KO 了");
                break;
            }
            if(role1.getBlood() == 0){
                System.out.println("鸠摩智被ko了");
                break;
            }
        }
    }
}
