That does assume the encounter takes place on a (mostly) featureless plain.
In some cases the bad guys should have thought about how they might retreat, before actually attacking the PCs. "If this goes badly, you know we are all going to die, right? Why are we doing this again?" Especially if...