I may have blatantly copied the algorithm from ChaosForge's DoomRL. I'm not saying I did, but it's definitely a possibility.