3 # Make a DOT graph of the dungeon
5 # Copyright (c) 2017 by Eric S. Raymond
6 # SPDX-License-Identifier: BSD-2-clause
11 "Select out loci related to the Maze All Alike"
12 return (loc == "LOC_MISTWEST") or ("ALIKE" in loc) or ("DEADEND" in loc) or ("STALACTITE" in loc)
14 if __name__ == "__main__":
15 with open("adventure.yaml", "r") as f:
16 db = yaml.safe_load(f)
19 for (loc, attrs) in db["locations"]:
22 travel = attrs["travel"]
28 action = dest["action"]
29 if action[0] == "goto":
30 arc = "%s -> %s" % (loc[4:], action[1][4:])
31 label=",".join(verbs).lower()
33 arc += ' [label="%s"]' % label