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

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

  public ASTTriangle(drawphase1 p, int id) {
    super(p, id);
  }

  /*-----------------------------------------------*/
  /* Returns triangle                              */
  /*-----------------------------------------------*/
  public String getString()
  {
    String triangle = "{";
    int noChilds = jjtGetNumChildren();

    for(int i=0; i < noChilds-2; i++) 
    {
      triangle = triangle + "\n" +
      formatLine(((ASTInt) jjtGetChild(i)).val,((ASTInt) jjtGetChild(i+1)).val,((ASTInt) jjtGetChild(i+2)).val,((ASTInt) jjtGetChild(i+3)).val);
      i = i +1;
    }

    triangle = triangle + "\n" +
    formatLine(((ASTInt) jjtGetChild(noChilds-2)).val,((ASTInt) jjtGetChild(noChilds-1)).val,((ASTInt) jjtGetChild(0)).val,((ASTInt) jjtGetChild(1)).val) + 
    "\n}";

    return triangle; 
  }

}
