It is an ( Non- infinite ) random dungeon generator .you are supposed to walk around. The only thing that slightly resembles a goal is to try to find the red block which will send you back to start. Some generated dungeons are not beatable
This dungeon can have many more rooms ( up to 447x447) but I keep it at 51x51 so it isn't overwhelmingly large. The reason why there's a limit is because the list variable runs out of space by then.