예제 #1
0
        private bool IsBattleEnd()
        {
            var allyDead = UnitsList
                           .Where(x => x.Team == BattleUnitTeamType.Ally)
                           .All(x => !x.IsAlive);

            var enemyDead = UnitsList
                            .Where(x => x.Team == BattleUnitTeamType.Enemy)
                            .All(x => !x.IsAlive);

            return(allyDead || enemyDead);
        }
예제 #2
0
 private bool IsPhaseEnd()
 {
     return(UnitsList
            .Where(x => x.IsAlive)
            .All(x => x.IsEnded));
 }