Source

pygamegsoc12 / alchemymadness / sprite.py

Diff from to

alchemymadness/sprite.py

 class Node(object):
     def __init__(self, *args, **kwargs):
         super(Node, self).__init__(*args, **kwargs)
+        print self, args
         self._parent = None
-        self._children = set()
+        self._children = set() # unordered !!
 
     @property
     def parent(self):
     def children(self):
         return self._children
 
+    def add(self, node):
+        node.parent = self
+
+    def discard(self, node):
+        node.parent = None
+
 
 class MaskedSprite(DirtySprite):
     """ Sprite with color