A level-set algorithm for simulating wildfire spread