The "literal" destruction of the whole world is a bit of an Hebraism, usually this phraase denotes a huge area, not necessarily the literal entire earth.
Even assuming for talking's sake that God did in fact flood the world to drown out the wicked, His Rule is Sovereign and He did it because it was right and good to do so.
>So every single man, woman and child on earth was an immoral, evil person who deserved to die? Seriously?
Frankly, yes.
>The Lord hath looked down from heaven upon the children of men, to see if there be any that understand and seek God.
>They are all gone aside, they are become unprofitable together: there is none that doth good, no not one. Their throat is an open sepulchre: with their tongues they acted deceitfully; the poison of asps is under their lips. Their mouth is full of cursing and bitterness; their feet are swift to shed blood. Destruction and unhappiness in their ways: and the way of peace they have not known: there is no fear of God before their eyes.
Ps.13:1-2
To be honest I'd still take this view over the modern view that morality is irrelevant and evil is arbitrary. From the perspective the secular devaluation of values the eradication of the wicked is even more futile.