(tokens)
return plid, planet, remainder
Parse a single planet given tokenized input from the game environment.

        :return: The planet ID, planet object, and unused tokens.
        :rtype: (int, Planet, list[str])
Parse a single planet given tokenized input from the game environment.
Parse a single planet given tokenized input from the game environment .
def _parse_single(tokens):
        """
        Parse a single planet given tokenized input from the game environment.

        :return: The planet ID, planet object, and unused tokens.
        :rtype: (int, Planet, list[str])
        """
        (plid, x, y, hp, r, docking, current, remaining,
         owned, owner, num_docked_ships, *remainder) = tokens

        plid = int(plid)
        docked_ships = []

        for _ in range(int(num_docked_ships)):
            ship_id, *remainder = remainder
            docked_ships.append(int(ship_id))

        planet = Planet(int(plid),
                        float(x), float(y),
                        int(hp), float(r), int(docking),
                        int(current), int(remaining),
                        bool(int(owned)), int(owner),
                        docked_ships)

        return plid, planet, remainder
def _parse_single ( tokens ) : ( plid , x , y , hp , r , docking , current , remaining , owned , owner , num_docked_ships , * remainder ) = tokens plid = int ( plid ) docked_ships = [ ] for _ in range ( int ( num_docked_ships ) ) : ship_id , * remainder = remainder docked_ships . append ( int ( ship_id ) ) planet = Planet ( int ( plid ) , float ( x ) , float ( y ) , int ( hp ) , float ( r ) , int ( docking ) , int ( current ) , int ( remaining ) , bool ( int ( owned ) ) , int ( owner ) , docked_ships ) return plid , planet , remainder