Constructor
new OpponentAgent(timestamp)
This class is used to represent an opponent agent in the game. It contains properties such as id, name, teamId, teamName, x, y, score, timestamp, and direction. It is typically used to store information about the agents that are not controlled by the player. * @param {Object} agent - The agent object containing id, name, teamId, teamName, x, y, score
Parameters:Name | Type | Description |
---|
timestamp | number | The timestamp of the agent's state |
PropertiesName | Type | Description |
---|
id | string | The unique identifier of the agent. |
name | string | The name of the agent. |
teamId | string | The ID of the team the agent belongs to. |
teamName | string | The name of the team the agent belongs to. |
x | number | The x-coordinate of the agent's position. |
y | number | The y-coordinate of the agent's position. |
score | number | The current score of the agent. |
timestamp | number | The timestamp in milliseconds when the agent's state was last updated. |
direction | string | The direction the agent is facing (UP, DOWN, LEFT, RIGHT, NONE). |