wrong result when testing if user's move is legal