Before dropping the bombs on Japan, the US gave the Japanese gov't ample warning in advance of what was headed their way if they refused to surrender. It was not a surprise attack and it certainly was avoidable.   Trump and the US government are  handing North Korea a  similar fair warning. "The party's over".