Yeah, that's messed up. Mine have had their share but never that bad. You are right, it must have darted and slammed into something. A good way is leaving a night light on for some days, weeks until the new fish gets accustomed.
The upturn in the upper jaw may or may not straighten out - it's a bad break.