Checks if the walker should terminate based on simulation rules.
Usage
check_termination(
walker,
grid,
neighborhood = c("4-hood", "8-hood"),
boundary = c("terminate", "wrap"),
max_steps = 10000L
)
Arguments
- walker
List. Walker object.
- grid
Numeric matrix. The simulation grid.
- neighborhood
Character. "4-hood" or "8-hood".
- boundary
Character. "terminate" or "wrap".
- max_steps
Integer. Maximum steps before forced termination. Default 10000.
Value
Modified walker object with updated active status.