Numerical model of the Moon's rotation