Sentence:  Then the headlights swept around the last bend in the track and the train was bearing down on us from less than a block away. The engineer saw us and started leaning on the horn. He was going way too fast. The train whistle kept blaring as the white headlamp on the lead car <WSD>wigwagged</WSD> back and forth, strobing the car as the train thundered toward us. 
Meaning of the word marked with <WSD> tags:  To oscillate between two states.