OpponentAgent

OpponentAgent class to represent an opponent agent in the game

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:
NameTypeDescription
timestampnumberThe timestamp of the agent's state
Properties
NameTypeDescription
idstringThe unique identifier of the agent.
namestringThe name of the agent.
teamIdstringThe ID of the team the agent belongs to.
teamNamestringThe name of the team the agent belongs to.
xnumberThe x-coordinate of the agent's position.
ynumberThe y-coordinate of the agent's position.
scorenumberThe current score of the agent.
timestampnumberThe timestamp in milliseconds when the agent's state was last updated.
directionstringThe direction the agent is facing (UP, DOWN, LEFT, RIGHT, NONE).

Classes

OpponentAgent