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

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

  public ASTSquare(drawphase1 p, int id) {
    super(p, id);
  }
  
  /*-----------------------------------------------*/
  /* Returns drawn square as 4 lines               */
  /*-----------------------------------------------*/
  public String getString()
  {
    int xbottom = ((ASTInt) jjtGetChild(1)).val + (((ASTInt) jjtGetChild(2)).val - ((ASTInt) jjtGetChild(0)).val);

    String square = "{\n" + 
    formatLine(((ASTInt) jjtGetChild(0)).val,xbottom,((ASTInt) jjtGetChild(0)).val,((ASTInt) jjtGetChild(1)).val)+"\n"+
    formatLine(((ASTInt) jjtGetChild(0)).val,((ASTInt) jjtGetChild(1)).val,((ASTInt) jjtGetChild(2)).val,((ASTInt) jjtGetChild(1)).val)+"\n"+
    formatLine(((ASTInt) jjtGetChild(2)).val,((ASTInt) jjtGetChild(1)).val,((ASTInt) jjtGetChild(2)).val,xbottom)+"\n"+
    formatLine(((ASTInt) jjtGetChild(2)).val,xbottom,((ASTInt) jjtGetChild(0)).val,xbottom)+
    "\n}";

    return square; 
  }

}
