Пример #1
0
    def __init__(self, nodelist=None, variations=None):
        """
			Initialize the 'GameTree'. Arguments:
			- nodelist : 'GameTree' or list of 'Node' -- Stored in 'self.data'.
			- variations : list of 'GameTree' -- Stored in 'self.variations'."""
        List.__init__(self, nodelist)
        self.variations = variations or []
Пример #2
0
 def __init__(self, nodelist=None, variations=None):
     """
         Initialize the 'GameTree'. Arguments:
         - nodelist : 'GameTree' or list of 'Node' -- Stored in 'self.data'.
         - variations : list of 'GameTree' -- Stored in 'self.variations'."""
     List.__init__(self, nodelist)
     self.variations = variations or []
Пример #3
0
    def __init__(self, id, values, name=None):
        """
			Initialize the 'Property'. Arguments:
			- id : string
			- name : string (optional) -- If not given, 'self.name' 
			- nodelist : 'GameTree' or list of 'Node' -- Stored in 'self.data'.
			- variations : list of 'GameTree' -- Stored in 'self.variations'."""
        List.__init__(self, values)  # XXX will _convert work here?
        self.id = id
        self.name = name or id
Пример #4
0
 def __init__(self, id, values, name=None):
     """
         Initialize the 'Property'. Arguments:
         - id : string
         - name : string (optional) -- If not given, 'self.name' 
         - nodelist : 'GameTree' or list of 'Node' -- Stored in 'self.data'.
         - variations : list of 'GameTree' -- Stored in 'self.variations'."""
     List.__init__(self, values)             # XXX will _convert work here?
     self.id = id
     self.name = name or id