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

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

  public ASTSquare(drawsimple p, int id) {
    super(p, id);
  }
  
 public void generate()
  {
  	
  	int iZero = ((ASTInt) jjtGetChild(0)).val;
  	int iOne = ((ASTInt) jjtGetChild(1)).val;
  	int iTwo = ((ASTInt) jjtGetChild(2)).val;
  	int bottom = iOne + (iTwo - iZero);
    System.out.println("Square");
    System.out.println("<line x1=\"" + iZero +
        "\" y1=\"" + iOne +
        "\" x2=\"" + iTwo +
        "\" y2=\"" + iOne +
        "\" stroke=\"black\" stroke-width=\"1\"/>");
    System.out.println("<line x1=\"" + iTwo +
        "\" y1=\"" + iOne +
        "\" x2=\"" + iTwo +
        "\" y2=\"" + bottom +
        "\" stroke=\"black\" stroke-width=\"1\"/>");
    System.out.println("<line x1=\"" + iTwo +
        "\" y1=\"" + bottom +
        "\" x2=\"" + iZero +
        "\" y2=\"" + bottom +
        "\" stroke=\"black\" stroke-width=\"1\"/>");
    System.out.println("<line x1=\"" + iZero +
        "\" y1=\"" + bottom +
        "\" x2=\"" + iZero +
        "\" y2=\"" + iOne +
        "\" stroke=\"black\" stroke-width=\"1\"/>");
        
  }

}
