Use new functions to clean up the default isMoveLegal function