/*////////////////////////////////////////////////////////
Name:		ASTRepeat

Author: 	Sarah Han-de-Beaux

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

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

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

  public ASTRepeat(drawphase3 p, int id) {
    super(p, id);
  }

  public void generate(String Colour, int brush, int x, int y, int scaleX, 
                       int scaleY, int deltax, int deltay, int number)
  {
    deltax = ((ASTInt) jjtGetChild(0)).val;
    deltay = ((ASTInt) jjtGetChild(1)).val;
    number = ((ASTInt) jjtGetChild(2)).val;
    
    if(number==0)
    {
      jjtGetChild(3).generate(Colour, brush, x, y, scaleX, scaleY, 0, 0, 0);
    }
    else
    {
      for(int i=0; i<number; i++)
      {
        jjtGetChild(3).generate(Colour, brush, x+(i*deltax), y+(i*deltay), scaleX, scaleY, 0, 0, 0);
      }
    }
  }

}
