コード例 #1
0
 public void Fight()
 {
     while (Character.Alive && Enemy.Alive)
     {
         Character.Hit(Enemy);
         Enemy.Hit(Character);
         Character.ShowInfo();
         Enemy.ShowInfo();
     }
 }
コード例 #2
0
 public GamePerson Fight()
 {
     while (Character.Alive && Enemy.Alive)
     {
         Character.Hit(Enemy);
         Enemy.Hit(Character);
         Character.ShowInfo();
         Enemy.ShowInfo();
     }
     return(Character.Alive ? Character : Enemy);
 }