Finished algorithm to check move consistency (isMovable)