Added conditional in particle_at(int x, int y) to prevent crash.