A Dynamic Theory of Resource Wars