protected override void Execute(List <GameEntity> entities) { var playerE = _players .GetEntities() .First(i => i.player.Type == PlayerType.Player); var botEs = _players .GetEntities() .Where(i => i.player.Type == PlayerType.Bot); var isPlayerDead = !playerE.player.IsAlive; var areBotsDead = botEs.All(i => !i.player.IsAlive); if (isPlayerDead) { _gameInfo.ReplaceGameEnded(false); } else if (areBotsDead) { _gameInfo.ReplaceGameEnded(true); } }