The logic is not very readable. Better do something like:
if(!restartPrompt)
    restart = true
else
    restart = show_message