World

WorldBuilder

class balladeer.lite.world.WorldBuilder

This class is the base for the world of your narrative.

It is responsible for holding all the entities you need. It helps you retrieve them when you need them.

To populate a new world, override the build method of a subclass. It is a generator of entity objects.

class World(WorldBuilder):
    def build(self):
        yield Entity(names=["Percy Alleline,", "Tinker"], type="Spy")
        yield Entity(names=["Bill Haydon", "Tailor"], type="Spy")
        yield Entity(names=["Roy Bland", "Soldier"], type="Spy")
__init__(map: MapBuilder = None, config: dict = None)
property statewise: Grouping

Returns a Grouping whose keys are all of type int or State.

The corresponding value is a list of entities with that state.

build() Generator[Entity]

Override this method to generate Entities.