invalid move detection