private void predict(Particle a) {
		if (a == null)
			return;
		for (int i = 0; i < particles.length; i++) {
			double dt = a.timeToHit(particles[i]);
			if (t + dt < limit)
				pq.insert(new Event(t + dt, a, particles[i]));
		}
		double dtx = a.timeToHitVerticalWall();
		double dty = a.timeToHitHorizontalWall();
		if (t + dtx < limit)
			pq.insert(new Event(t + dtx, a, null));
		
		if (t + dty < limit)
			pq.insert(new Event(t + dty, null, a));
	}