pymasep.common.initializer.initializer_object_interface

Classes

InitializerObjectInterface

Initializer used to initialize an Object from the interface.

Module Contents

class pymasep.common.initializer.initializer_object_interface.InitializerObjectInterface(game, initializer_dict)

Bases: pymasep.common.initializer.initializer_object.InitializerObject

Initializer used to initialize an Object from the interface.

An initializer is created from a dictionary. The format is the following:

  • name: name of the initializer used as id

  • value_type: for Characteristic, the type of the value (as string)

  • subclass_initializer: name of sub initializer used to initialize sub BaseObject.

    For an object, the name of the subclass_initializer must be ‘objectstate’ These initializers must already exist in the game.

Parameters:
  • game – the game where the initializer is created

  • initializer_dict (dict) – the dictionary used to create the initializer

init_type

initializer by interface