Scattering of two particles in a one-dimensional lattice