It does sort of work as far as I’ve gotten, but probably because the juxtaposition between the play and the text adventure is so jarring as to be fun.
A ghost is here.
An exit leads south.
> tell ghost “hello”
“Hey Dad,” you say cheerily. “What’s up?”
“Hamlet,” says the old man after a sigh, “you remember how I was found mysteriously dead in the orchard a couple of weeks back? Well… it’s like this. Your uncle Claudius poisoned me so he could become king and marry your mother. I’d be awfully grateful if you could kill him for me.”
“All right,” you say, “I’ll do it!”
Your life suddenly seems to have purpose.
Update: The game has been relocated to http://rdouglasjohnson.com/hamlet/