Constructor
new ServerConfig()
This class is used to manage the server configuration settings for the game. It includes properties such as parcels_max, parcel_reward_avg, parcels_decaying_interval, clock, agents_obs_distance, and parcels_obs_distance. It provides a method to update the configuration based on a given config object.
PropertiesName | Type | Description |
---|---|---|
parcels_max | number | The maximum number of parcels allowed in the game. |
parcel_reward_avg | number | The average reward for parcels. |
parcels_decaying_interval | number | The interval in seconds at which parcels decay. |
clock | number | The clock time for the game. |
agents_obs_distance | number | The observation distance for agents. |
parcels_obs_distance | number | The observation distance for parcels. |
Classes
Methods
updateConfig(config)
This method updates the server configuration properties based on the provided config object. It sets the maximum number of parcels, average parcel reward, decaying interval for parcels, clock time, and observation distances for agents and parcels.
Parameters:
Name | Type | Description |
---|---|---|
config | Object | The configuration object containing new settings. |