The worst possible turn can not be programmed. It is caused by coincidence.
A story is not finished, until it took the worst turn.
A story has been thought to its conclusion when it has taken its worst possible turn.
A story has been thought through to the end when it has taken the worst possible turn.