I would suggest that before you get a new engine, you actually have the thing checked out. You may have fried the engine, but then again, maybe you didn't do irrepairable damage... Just have it checked and hope for the best...
I recently had a scare myself.. Although I couldn't here it from inside my car, when I got out of it to check on the lights (to maek sure I hadn't blown any bulbs), I heard a ticking in my engine... Needless to say, a ticking engine is a ticking bomb! I took it in, hoping that I hadn't blown anything major, or broken a valve, etc... All it turned out to be was a loose sparkplug.. I've never heard of a loose sparkplug causing such a noise, but I was sure glad when I learend that...
So all I can say, is expect for the worst, and hope for the best...