예제 #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
파일: sgflib.py 프로젝트: tylerjw/badukpy
 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
파일: sgflib.py 프로젝트: tylerjw/badukpy
 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