Generating simple procedural dungeon

Can you provide an asset of this? I’m a bit lost in two of the functions.