map: implement seeded generation; allow passing custom seed

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I742b7e59c7ca872539d4ebfe3a03b44f6a6a6964
This commit is contained in:
raf 2026-04-10 10:43:03 +03:00
commit f51b754e76
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
3 changed files with 32 additions and 8 deletions

View file

@ -170,9 +170,6 @@ void get_random_floor_tile(Map *map, int *x, int *y, int attempts) {
}
void dungeon_generate(Dungeon *d, Map *map, int floor_num) {
// Seed RNG with floor number for deterministic generation
rng_seed(floor_num * 12345);
// Initialize map to all walls
map_init(map);