ServerConfig

ServerConfig class to manage server configuration settings.

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.
Properties
NameTypeDescription
parcels_maxnumberThe maximum number of parcels allowed in the game.
parcel_reward_avgnumberThe average reward for parcels.
parcels_decaying_intervalnumberThe interval in seconds at which parcels decay.
clocknumberThe clock time for the game.
agents_obs_distancenumberThe observation distance for agents.
parcels_obs_distancenumberThe observation distance for parcels.

Classes

ServerConfig

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:
NameTypeDescription
configObjectThe configuration object containing new settings.