/* Generated By:JJTree: Do not edit this line. ASTColour.java */

public class ASTColour extends SimpleNode {
    
  public ASTColour(int id) {
    super(id);
  }

  public ASTColour(drawphase3 p, int id) {
    super(p, id);
  }

  /*----------------------------------------------*/
  /*  Returns Node Type                           */
  /*----------------------------------------------*/
  public String getType()
  {
    return "Colour";
  }

  /*----------------------------------------------*/
  /*  Returns Specified Colour                    */
  /*----------------------------------------------*/
  public String getColour()
  {
    String colour = "";
    
    for ( int i = 0; i < jjtGetNumChildren(); i++)
    { 
      if (jjtGetChild(i).getType().equals("Char") == true )
      {  
        colour = colour + ((ASTChar) jjtGetChild(i)).val;
      }
    }

    return colour;
  }

  /*----------------------------------------------*/
  /*  Loops through the Colours children          */
  /*----------------------------------------------*/
  public String getString()
  {
    String children = "";

    for(int i=0; i < jjtGetNumChildren(); i++) 
    {
      if (jjtGetChild(i).getType().equals("Char") == false )
      {
        children = children + jjtGetChild(i).getString();
      }
    }
    return children;    
  }

}
