Key.interact#

Key.interact(agent: Agent) None#

Collect the key object and remove it from the environment. The agent changes color according to the key collected.

Parameters:

agent (Agent) – Agent object performing the interaction.