computc/adventure — pull request #45 by arcym (2014-10-24 00:43:41+00:00)
Title: Fixed the nefarious Double Door Bug.

For some reason, the doors would be put in the dungeon in the wrong rooms and along the wrong walls, and worst of all, would create two doors, so after unlocking one door, you'd find another door just behind it! What made it difficult to isolate this bug was that it wasn't consistent; it would only happen some of the times.

After banging my head against the code for a while, I learned that it happened because the critical path was in the *same direction* for two consecutive rooms, which caused my hacky code to think it was the same door. I fixed that by making each door only create a single door.