(player_id, tokens)
return sid, ship, remainder
Parse a single ship given tokenized input from the game environment.
        :param int player_id: The id of the player who controls the ships
        :param list[tokens]: The remaining tokens
        :return: The ship ID, ship object, and unused tokens.
        :rtype: int, Ship, list[str]
Parse a single ship given tokenized input from the game environment.
        :param int player_id: The id of the player who controls the ships
        :param list[tokens]: The remaining tokens
        :return: The ship ID, ship object, and unused tokens.
        :rtype: int, Ship, list[str]
Parse a single ship given tokenized input from the game environment . : param int player_id : The id of the player who controls the ships : param list [ tokens ] : The remaining tokens : return : The ship ID ship object and unused tokens . : rtype : int Ship list [ str ]
def _parse_single(player_id, tokens):
        """
        Parse a single ship given tokenized input from the game environment.
        :param int player_id: The id of the player who controls the ships
        :param list[tokens]: The remaining tokens
        :return: The ship ID, ship object, and unused tokens.
        :rtype: int, Ship, list[str]
        """
        (sid, x, y, hp, vel_x, vel_y,
         docked, docked_planet, progress, cooldown, *remainder) = tokens

        sid = int(sid)
        docked = Ship.DockingStatus(int(docked))

        ship = Ship(player_id,
                    sid,
                    float(x), float(y),
                    int(hp),
                    float(vel_x), float(vel_y),
                    docked, int(docked_planet),
                    int(progress), int(cooldown))

        return sid, ship, remainder
def _parse_single ( player_id , tokens ) : ( sid , x , y , hp , vel_x , vel_y , docked , docked_planet , progress , cooldown , * remainder ) = tokens sid = int ( sid ) docked = Ship . DockingStatus ( int ( docked ) ) ship = Ship ( player_id , sid , float ( x ) , float ( y ) , int ( hp ) , float ( vel_x ) , float ( vel_y ) , docked , int ( docked_planet ) , int ( progress ) , int ( cooldown ) ) return sid , ship , remainder