original_docstring: 
          Choose the target of this Player's Carnivore at the given index in this Player's species boards
          :param carn_index: The index of the attacking Carnivore in this Player's species boards
          :type carn_index: Nat
          :param players: the other players in the game
          :type players: [PlayerState, ...]
          :param own_index: This players index in the given array of player states
          :type own_index: Nat
          :return: The attack that the aforementioned Carnivore will execute
          :rtype: PlayerAttackWithCarnivore
          
docstring: Choose the target of this Player's Carnivore at the given index in this Player's species boards
docstring_tokens: Choose the target of this Player ' s Carnivore at the given index in this Player ' s species boards
code: def choose_target(self, carn_index, players, own_index):
          """
          Choose the target of this Player's Carnivore at the given index in this Player's species boards
          :param carn_index: The index of the attacking Carnivore in this Player's species boards
          :type carn_index: Nat
          :param players: the other players in the game
          :type players: [PlayerState, ...]
          :param own_index: This players index in the given array of player states
          :type own_index: Nat
          :return: The attack that the aforementioned Carnivore will execute
          :rtype: PlayerAttackWithCarnivore
          """
          carn_species = players[own_index].get_all_species()[carn_index]
          BestInfo = namedtuple('BestInfo', ['key', 'p_index', 's_index'])
          best = None  # type: None or BestInfo
  
          for player_index, player in enumerate(players):
              if player_index == own_index:
                  continue
              player_species = player.get_all_species()
              player_best_species_index, player_best_speices_key = \
                  carn_species.best_attack_on_player(player_species,
                                                     SpeciesOrderKey)
              if (player_best_speices_key is not None) and \
                      ((best is None) or (player_best_speices_key > best.key)):
                  best = BestInfo(player_best_speices_key, player_index,
                                  player_best_species_index)
          if best is None:
              raise ValueError(
                  "choose_target: Given carnivore had no valid target among players.")
  
          return PlayerAttackWithCarnivore(carn_index, best.p_index, best.s_index)
code_tokens: def choose_target ( self , carn_index , players , own_index ) : carn_species = players [ own_index ] . get_all_species ( ) [ carn_index ] BestInfo = namedtuple ( 'BestInfo' , [ 'key' , 'p_index' , 's_index' ] ) best = None for player_index , player in enumerate ( players ) : if player_index == own_index : continue player_species = player . get_all_species ( ) player_best_species_index , player_best_speices_key = carn_species . best_attack_on_player ( player_species , SpeciesOrderKey ) if ( player_best_speices_key is not None ) and ( ( best is None ) or ( player_best_speices_key > best . key ) ) : best = BestInfo ( player_best_speices_key , player_index , player_best_species_index ) if best is None : raise ValueError ( "choose_target: Given carnivore had no valid target among players." ) return PlayerAttackWithCarnivore ( carn_index , best . p_index , best . s_index )
short_docstring: Choose the target of this Player's Carnivore at the given index in this Player's species boards
short_docstring_tokens: Choose the target of this Player ' s Carnivore at the given index in this Player ' s species boards
comment: """
          Choose the target of this Player's Carnivore at the given index in this Player's species boards
          :param carn_index: The index of the attacking Carnivore in this Player's species boards
          :type carn_index: Nat
          :param players: the other players in the game
          :type players: [PlayerState, ...]
          :param own_index: This players index in the given array of player states
          :type own_index: Nat
          :return: The attack that the aforementioned Carnivore will execute
          :rtype: PlayerAttackWithCarnivore
          """$SEP$# type: None or BestInfo