/* 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);
  }

/****************************************************
 This generates 4 lines to create a square, based on 
 the input values. As the 0 and 1 children of the 
 node are the same (as its a square) either could
 be used below when defining the values. I chose to
 use 0.
****************************************************/

  public void generate()
  {

    System.out.println
	  ("<line x1=\"" + ((ASTInt) jjtGetChild(2)).val +
        "\" y1=\"" + ((ASTInt) jjtGetChild(0)).val +
        "\" x2=\"" + ((ASTInt) jjtGetChild(2)).val +
        "\" y2=\"" + ((ASTInt) jjtGetChild(2)).val + 
        "\" fill=\"none\" stroke=\"black\" stroke-width=\"1\" />");

    System.out.println
	  ("<line x1=\"" + ((ASTInt) jjtGetChild(2)).val +
        "\" y1=\"" + ((ASTInt) jjtGetChild(0)).val +
        "\" x2=\"" + ((ASTInt) jjtGetChild(0)).val +
        "\" y2=\"" + ((ASTInt) jjtGetChild(0)).val + 
        "\" fill=\"none\" stroke=\"black\" stroke-width=\"1\" />"); 

    System.out.println
	  ("<line x1=\"" + ((ASTInt) jjtGetChild(2)).val +
        "\" y1=\"" + ((ASTInt) jjtGetChild(2)).val +
        "\" x2=\"" + ((ASTInt) jjtGetChild(0)).val +
        "\" y2=\"" + ((ASTInt) jjtGetChild(2)).val + 
        "\" fill=\"none\" stroke=\"black\" stroke-width=\"1\" />");
 
    System.out.println
	  ("<line x1=\"" + ((ASTInt) jjtGetChild(0)).val +
        "\" y1=\"" + ((ASTInt) jjtGetChild(2)).val +
        "\" x2=\"" + ((ASTInt) jjtGetChild(0)).val +
        "\" y2=\"" + ((ASTInt) jjtGetChild(0)).val + 
        "\" fill=\"none\" stroke=\"black\" stroke-width=\"1\" />");

  }

}
