protected override void Execute(List <GameEntity> entities)
    {
        var entity = entities.First();

        if (!HasAliveCharacters(CharacterUtils.FindAll(_allCharacters.AsEnumerable(), CharacterType.GoodGuy)))
        {
            PlayerLost(entity);
            return;
        }

        if (!HasAliveCharacters(CharacterUtils.FindAll(_allCharacters.AsEnumerable(), CharacterType.BadGuy)))
        {
            PlayerWon(entity);
        }
    }
示例#2
0
 private List <GameEntity> GetAlive(CharacterType type)
 {
     return(CharacterUtils.FindAll(_allCharacters.AsEnumerable(), type)
            .Where(CharacterUtils.IsNotDead)
            .ToList());
 }