Hmmm..lets see...
pass current through a wire in a magnet field, there's a force on the wire, and as there's no restraint on the wire, it moves..
It's a very simple electric motor, almost out of Ladybird book of Bulbs , Magnets and Batteries
If I could remember if it's Flemings left or right hand rule, we could say which way round the magnet is ( north or south joined to the battery ).
Clever though
Malcolm