Prevent infinite loops for moves input in Pacosako + Otage