code: public void addFrame(int duration, int x, int y){
  	   if (duration == 0) {
  	      Log.error("Invalid duration: "+duration);
  	      throw new RuntimeException("Invalid duration: "+duration);
  	   }
  	 
  	    if (frames.isEmpty()) {
  	      nextChange = (int) (duration / speed);
  	   }
  	   
  	   frames.add(new Frame(duration, x, y));
  	   currentFrame = 0;      
  	}
docs: Add animation frame to the animation.
  @param duration The duration to display the frame for
  @param x The x location of the frame on the <tt>SpriteSheet</tt>
  @param y The y location of the frame on the <tt>spriteSheet</tt>