How did the alliances before world war 1 affect the war?