Swap the position of two equivalent pins.
If the operation ends correctly, it returns true otherwise it returns false.