Constructor
new AgentGate(terrain)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
terrain |
Terrain | The underlying terrain this decorator wraps. |
Extends
Classes
Members
terrain :Terrain
- Source:
- Overrides:
Type:
Methods
canEnter(agent, cell, direction) → {boolean}
- Description:
Allows entry only for the player; delegates to the wrapped terrain for the player, and returns false for all other agents.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
agent |
Agent | |
cell |
Cell | |
direction |
Direction |
Returns:
- Type
- boolean
canExit(agent, cell, direction) → {boolean}
- Description:
Allows exit only for the player; delegates to the wrapped terrain for the player, and returns false for all other agents.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
agent |
Agent | |
cell |
Cell | |
direction |
Direction |
Returns:
- Type
- boolean
getProxiedTerrain()
- Description:
Return the terrain being wrapped (TerrainProxy interface).
- Source:
- Overrides: