RpgGame
Console Based RPG game in C#
Loading...
Searching...
No Matches
RpgGame.Generation.IMapGenerator Interface Reference

Defines the contract for procedural level generation strategies. More...

Inheritance diagram for RpgGame.Generation.IMapGenerator:
Collaboration diagram for RpgGame.Generation.IMapGenerator:

Public Member Functions

Task GenerateAsync (Level level)
 Asynchronously generates the terrain layout for the specified level.
 

Detailed Description

Defines the contract for procedural level generation strategies.

Implementations of this interface are responsible for constructing the terrain layout of a Level instance.

This abstraction enables the use of the Strategy Pattern, allowing different generation algorithms (e.g., simple rooms, mazes, dungeon layouts) to be swapped without modifying the game logic.

Member Function Documentation

◆ GenerateAsync()

Task RpgGame.Generation.IMapGenerator.GenerateAsync ( Level  level)

Asynchronously generates the terrain layout for the specified level.

Parameters
levelThe level instance to populate.
Returns
A task that completes when generation is finished.

Implementations should perform all work asynchronously; callers may await the returned task to remain responsive during map creation.

Implemented in RpgGame.Generation.DungeonBuilder, and RpgGame.Generation.SimpleRoomGenerator.


The documentation for this interface was generated from the following file: