Add valid-move? function