A class that represent a non playable character controlled by the computer. For the NPC to be successfully managed by the Game, you need to set an actuator.
None of the parameters are mandatory, however it is advised to make good use of some of them (like type or name) for game design purpose.
- In addition to its own member variables, this class inherits all members from:
Parameters: actuator (gamelib.Actuators.Actuator) – An actuator, it can be any class but it need to implement gamelib.Actuator.Actuator.
mynpc = NPC(name='Idiot McStupid', type='dumb_enemy') mynpc.step = 1 mynpc.actuator = RandomActuator()
Initialize self. See help(type(self)) for accurate signature.
Movable implements can_move().
Return a string with the list of the attributes and their current value.
Print the model WITHOUT carriage return.
Define if the NPC has an inventory.
Define if the NPC is overlappable.
Define if the NPC is pickable.
This is a virtual method that must be implemented in deriving class.
Store the BoardItem position for self access.