What was the relationship between military events and the outcome of the Korean war?