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); }
private bool IsPhaseEnd() { return(UnitsList .Where(x => x.IsAlive) .All(x => x.IsEnded)); }