# _ all_GG_exec.py ____________________________________________________________________________
# all : a class that subclasifies GraphGrammar. File generated automatically by ATOM3.
# ___________________________________________________________________________________________
from GraphGrammar import *
from moveComponent_GG_rule import *
from colorComponent_GG_rule import *
from shapeComponent_GG_rule import *
from blowUpComponent_GG_rule import *
from blowRightComponent_GG_rule import *
from blowLeftComponent_GG_rule import *
from produceBallComponent_GG_rule import *
class all_GG_exec (GraphGrammar):
   def __init__ (self, parent):
      GraphGrammar.__init__(self, [moveComponent_GG_rule(parent) , colorComponent_GG_rule(parent) , shapeComponent_GG_rule(parent) , blowUpComponent_GG_rule(parent) , blowRightComponent_GG_rule(parent) , blowLeftComponent_GG_rule(parent) , produceBallComponent_GG_rule(parent)])
   def initialAction(self, graph):
      # Template code for an initial action (a full host graph traversal)
      
      #idInt = 0
      #for nodeType in graph.listNodes.keys():
      #    for node in graph.listNodes[nodeType]:
      #      # Prints the class name of all nodes in graph
      #      print node.__class__.__name__ 
      #
      #      # This part assumes that *ALL* nodes in graph have ATOM3 Integer 
      #      # attribute called "id" and that this attribute is in the visual icon
      #      # NOTE: setGenValue() sets the semantic value, updates visually, and
      #      # catches attribute name errors and displays correct alternatives
      #      node.setGenValue('id', idInt)
      #      idInt += 1
      for nodeType in graph.listNodes.keys():
          for node in graph.listNodes[nodeType]:
              node.color = False
              node.shape = False
              node.up = False
              node.right = False
              node.left = False
              node.produce = False
      

   def finalAction(self, graph):
      pass

importedModules = ['moveComponent_GG_rule', 'colorComponent_GG_rule', 'shapeComponent_GG_rule', 'blowUpComponent_GG_rule', 'blowRightComponent_GG_rule', 'blowLeftComponent_GG_rule', 'produceBallComponent_GG_rule']

