Add a new isMoveValid test
Fix the logic of the previous test