village_state | R Documentation |
This is an object that represents the state of a village at a particular time.
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.
Creates a new State
step
The time step that the state is relevant to
agent_states
A list of agent states
resource_states
A 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() )
step
The time step that the state is relevant to
agent_states
A vector of tibbles representing the states of the agents
resource_states
A 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)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.