33 lines
No EOL
1.4 KiB
C#
33 lines
No EOL
1.4 KiB
C#
// See https://aka.ms/new-console-template for more information
|
|
|
|
using DungeonMapGenerator;
|
|
using DungeonMapGenerator.Rooms;
|
|
|
|
class Program
|
|
{
|
|
private const string SAVED_DUNGEONS_PATH = @"C:\Users\User\repos\PuzzleGame\Dungeons";
|
|
private const string DUNGEON_NAME = "dungeon";
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
// Create an instance of your DungeonMapGenerator class
|
|
var generator = new DungeonGenerator();
|
|
|
|
// Call the method you want to run
|
|
int width = 30;
|
|
int height = 20;
|
|
DungeonMap map = generator.GenerateDungeon(width, height, 5);
|
|
DungeonLockPopulator.PopulateLocksOfDungeon(map);
|
|
DungeonLockPopulator.AddExtraLocksToMonsterRooms(map.GetMonsterRooms());
|
|
DungeonLockPopulator.AddExtraLocksToBossRoom(map.GetBossRoom());
|
|
List<Room> potentialLootRooms = new List<Room>();
|
|
potentialLootRooms.AddRange(map.GetNormalRooms());
|
|
potentialLootRooms.AddRange(map.GetMonsterRooms());
|
|
potentialLootRooms.Add(map.GetBossRoom());
|
|
DungeonLootPopulator.GenerateLootInRooms(potentialLootRooms);
|
|
DungeonMapSerializer.SerializeToFile(map, SAVED_DUNGEONS_PATH, $"{DUNGEON_NAME} {width}x{height}" );
|
|
|
|
// Print the map to the console (assuming it returns a string or something printable)
|
|
Console.WriteLine(map.GetMapAsString());
|
|
}
|
|
} |