Formula for DopeWars

This is a formula for the excellent DopeWars (console) game.