public void advance(long milliseconds) {
		
		// Check to make sure we are given a positive amount of time.
		if (milliseconds < 0) {
			throw new IllegalArgumentException("Time interval cannot be less than 1.");
		} else if (milliseconds == 0) {
			return;
		} else {
			
			/* Critical Region */
			synchronized (this) {
				// Calculate new position.
				double newX = xPosition + (milliseconds * 0.001 * BALL_VELOCITY * Math.cos(theta));
				double newY = yPosition + (milliseconds * 0.001 * BALL_VELOCITY * Math.sin(theta));
			
				xPosition = (int) newX;
				yPosition = (int) newY;
			}
		}
	}