fixed a bug on generating moves
rules