Apparently working hasvalidmove

But debug is buggy? WTF?