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

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

  	public ASTSquare(drawphase1 p, int id) 
  	{
    	super(p, id);
  	}
  	
  	/*************************************************
	
	Method implemented as part of Node interface 
	
	*************************************************/
  
  	public void generate()
  	{
    }
    
    /*************************************************
	
	Method to generate SVG code for a square and return
	the four lines in a string
	
	*************************************************/
  
  	public String generateSVG()
  	{
  		String temp, right, left, bottom, top;
  		
		top = ("<line x1=\"" + ((ASTInt) jjtGetChild(0)).val +
			"\" y1=\"" + ((ASTInt) jjtGetChild(1)).val +
			"\" x2=\"" + ((ASTInt) jjtGetChild(2)).val +
			"\" y2=\"" + ((ASTInt) jjtGetChild(1)).val +
			"\" stroke=\"black\" stroke-width=\"1\"/>\n");
		
		left = ("<line x1=\"" + ((ASTInt) jjtGetChild(0)).val +
			"\" y1=\"" + ((ASTInt) jjtGetChild(1)).val +
			"\" x2=\"" + ((ASTInt) jjtGetChild(0)).val +
			"\" y2=\"" + ((ASTInt) jjtGetChild(2)).val +
			"\" stroke=\"black\" stroke-width=\"1\"/>\n");
			
		right = ("<line x1=\"" + ((ASTInt) jjtGetChild(2)).val +
			"\" y1=\"" + ((ASTInt) jjtGetChild(1)).val +
			"\" x2=\"" + ((ASTInt) jjtGetChild(2)).val +
			"\" y2=\"" + ((ASTInt) jjtGetChild(2)).val +
			"\" stroke=\"black\" stroke-width=\"1\"/>\n");
			
		bottom = ("<line x1=\"" + ((ASTInt) jjtGetChild(0)).val +
			"\" y1=\"" + ((ASTInt) jjtGetChild(2)).val +
			"\" x2=\"" + ((ASTInt) jjtGetChild(2)).val +
			"\" y2=\"" + ((ASTInt) jjtGetChild(2)).val +
			"\" stroke=\"black\" stroke-width=\"1\"/>\n");

  		temp = top + left + right + bottom;
  		
  		return temp;
  	}

}
