/*////////////////////////////////////////////////////////
Name: 	ASTPolygon

Author: 	Sarah Han-de-Beaux

*////////////////////////////////////////////////////////

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

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

  public ASTPolygon(drawphase2 p, int id) {
    super(p, id);
  }

  public void generate(String Colour, int brush, int x, int y)
  {
   	int value=this.jjtGetNumChildren();
  	   int xpoint[] = new int[value/2] , ypoint[] = new int[value/2];
   	
		for (int i=0; i<value/2; i++)
  	   {
  		   xpoint[i]=((ASTInt) jjtGetChild(2*i)).val;
  		   ypoint[i]=((ASTInt) jjtGetChild((2*i)+1)).val;
  	   }	
  		paintPolygon(xpoint,ypoint,Colour, brush, x, y);
  }

}
