introduced more tests for performMoveIfLegal