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

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

  	public ASTTriangle(drawphase1 p, int id) 
  	{
    	super(p, id);
  	}
  	
  	/*************************************************
	
	Method implemented as part of Node interface 
	
	*************************************************/
  	
	public void generate()
  	{
  	}
  	
  	/*************************************************
	
	Method returning three lines that make up a triangle
	in string form
	
	*************************************************/
  
  	public String generateSVG()
  	{
  		String triangle, sideA, sideB, sideC;
  		
  		sideA = ("<line x1=\"" + ((ASTInt) jjtGetChild(0)).val +
        	"\" y1=\"" + ((ASTInt) jjtGetChild(1)).val +
        	"\" x2=\"" + ((ASTInt) jjtGetChild(2)).val +
        	"\" y2=\"" + ((ASTInt) jjtGetChild(3)).val +
        	"\" stroke=\"black\" stroke-width=\"1\"/>\n");
        	
        sideB = ("<line x1=\"" + ((ASTInt) jjtGetChild(4)).val +
        	"\" y1=\"" + ((ASTInt) jjtGetChild(5)).val +
        	"\" x2=\"" + ((ASTInt) jjtGetChild(2)).val +
        	"\" y2=\"" + ((ASTInt) jjtGetChild(3)).val +
        	"\" stroke=\"black\" stroke-width=\"1\"/>\n");
        
        sideC = ("<line x1=\"" + ((ASTInt) jjtGetChild(0)).val +
        	"\" y1=\"" + ((ASTInt) jjtGetChild(1)).val +
        	"\" x2=\"" + ((ASTInt) jjtGetChild(4)).val +
        	"\" y2=\"" + ((ASTInt) jjtGetChild(5)).val +
        	"\" stroke=\"black\" stroke-width=\"1\"/>\n");
        
        triangle = sideA + sideB + sideC;
        
        return triangle;
  	}

}
