pymasep.common.initializer.initializer_container_interface
Classes
Initializer used to initialize a Container by the interface |
Module Contents
- class pymasep.common.initializer.initializer_container_interface.InitializerContainerInterface(game, initializer_dict)
Bases:
pymasep.common.initializer.initializer_container.InitializerContainerInitializer used to initialize a Container by the interface An initializer can be executed by the Engine (by default) or processed by the Interface.
An initializer is created from a dictionary. The format is the following:
name: name of the initializer used as id
type: type of initialization. ALL: all the objects in obj_init will be created. BUY: the player must choose the objects to buy
- obj_initdictionary containing the name of the objects that could be created/bought as the keys.
Values are dictionaries with 3 keys: “cost”, the cost of the object, ‘template’: the template to create the object and ‘initializer’ used to initialize the object.
- Parameters:
game – the game where the initializer is created
initializer_dict (dict) – the dictionary used to create the initializer
- init_type
initializer by interface
- apply(base_object)
Apply the initializer. Do nothing since it is an interface initializer.
- Parameters:
base_object – The BaseObject to initialize
- Return type:
None