I really enjoy Roguelikes, and am planning on creating one sooner or later. As I had a bit of spare time, and since my brain was just itching to write this, I created the very core of Roguelikes: The random dungeon generator.
The class's algorithm is very simple, but gets the job done. It's fully extendable, if you wish to do so. All configuration is also placed at the top of the class, in constants, so you can easily adjust the parameters to your likings. I could have added them as parameters to the constructor, but as these settings'd be the same throughout the entire game, setting them as constants made more sense.
Right now, it only uses "wall" and "floor" tiles, as per FlxTilemap.
Code is in attachment.
It's used as follows:
var dungeonMap:DungeonGenerator = new DungeonGenerator();
var level:FlxTilemap = new FlxTilemap();
level.loadMap(FlxTilemap.arrayToCSV(dungeonMap.map,40), FlxTilemap.ImgAuto, 0, 0, FlxTilemap.AUTO);
var someRandomFloorTile:Array = dungeonMap.getRandomRoomTile();