Door.interact#

Door.interact(agent: Agent)#

Interact with the door. The result of the interaction depends on the door state prior to the interaction. Closed doors (state = 1) can always be opened by interaction. Locked doors (state = 2) require the prior collection of a Key object of the same color to open.

Parameters:

agent (Agent) – Agent object performing the interaction.