More logic to check move validity.