Stepper motor with driver A4988

You are probably exceeding the maximum speed of your motor. 200ms per revolution works out to be 300RPM. The A4988 library recommends no more than 200RPM.

When I tried your code, my stepper didn't even rotate until I increased the delay.