pymasep.common.initializer.initializer_fixed

Classes

InitializerFixed

Initialize Characteristic with fixed value

Module Contents

class pymasep.common.initializer.initializer_fixed.InitializerFixed(game, initializer_dict)

Bases: pymasep.common.initializer.initializer.Initializer

Initialize Characteristic with fixed value

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.

    These initializers must already exist in the game

  • value: fixed value used to initialize the characteristic

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

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

fixed_value

value used to initialize the characteristic

apply(base_object)

Apply the initializer.

Parameters:

base_object – The characteristic to initialize

Return type:

None