Refactored LegalMoveTest()