/**
* Base class for representing a state in context of State-driven agent design.
*
* @author {@link https://github.com/Mugen87|Mugen87}
*/
class State {
/**
* This method is called once during a state transition when the {@link StateMachine} makes
* this state active.
*
* @param {GameEntity} owner - The game entity that represents the execution context of this state.
*/
enter( /* owner */ ) {}
/**
* This method is called per simulation step if this state is active.
*
* @param {GameEntity} owner - The game entity that represents the execution context of this state.
*/
execute( /* owner */ ) {}
/**
* This method is called once during a state transition when the {@link StateMachine} makes
* this state inactive.
*
* @param {GameEntity} owner - The game entity that represents the execution context of this state.
*/
exit( /* owner */ ) {}
/**
* Transforms this instance into a JSON object.
*
* @return {Object} The JSON object.
*/
toJSON() {}
/**
* Restores this instance from the given JSON object.
*
* @param {Object} json - The JSON object.
* @return {State} A reference to this state.
*/
fromJSON( /* json */ ) {}
/**
* Restores UUIDs with references to GameEntity objects.
*
* @param {Map<String,GameEntity>} entities - Maps game entities to UUIDs.
* @return {State} A reference to this state.
*/
resolveReferences( /* entities */ ) {}
/**
* This method is called when messaging between game entities occurs.
*
* @param {GameEntity} owner - The game entity that represents the execution context of this state.
* @param {Telegram} telegram - A data structure containing the actual message.
* @return {Boolean} Whether the message was processed or not.
*/
onMessage( /* owner, telegram */ ) {
return false;
}
}
export { State };