This is an object that represents the state of a village at a particular time.
Creates a new State
stepThe time step that the state is relevant to
agent_statesA list of agent states
resource_statesA list of resource states
new()Initializes all of the properties in the state to the ones passed in. This should be called by subclasses during initialization.
village_state$new(
step = 0,
agent_states = vector(),
resource_states = vector()
)stepThe time step that the state is relevant to
agent_statesA vector of tibbles representing the states of the agents
resource_statesA vector of tibbles representing the states of the resources
When adding a new property, make sure to add it to the tibble representation.
clone()The objects of this class are cloneable with this method.
village_state$clone(deep = FALSE)deepWhether to make a deep clone.
This class acts as a type of record that holds the values of the different village variables. This class can be subclassed to include more variables that aren't present.