Ardiuno UNO, a4983 driver and stepper motor

Swapping the 4-wire is a good try, assuming the chip is controlled correctly. It is enough to just swap any (adjacent) pair of motor wires.

Code suggestion (your actual pinnumbers and values may vary)

const int Mdir=6 ;
const int Mstep=7 ;
 :
pinMode(Mdir,OUTPUT) ;
pinMode(Mstep,OUTPUT) ;
 :
digitalWrite(Mdir,HIGH) ;  // LOW to go the other way
for (int j=0; j<200; j++) {
  digitalWrite(Mstep,HIGH) ;
  delayMicroseconds(12) ; // Step occurs on rising edge
  digitalWrite(MStep,LOW);
  delay(3) ; //  more delay-> slower rotation speed.
  }

Lastly, if you use delay() you are blocking, that is, the Arduino wont be able to do other things, like watching if a button is pushed, whilst turning the motor. That is also how the stepper-library works. If that is good enough, fine. Otherwise you have to start reading about "avoid using delay". Here and here and lots more from other contributors.