nkremerh / sugarscape

Development repository for the Digital Terraria Lab implementation of the Sugarscape agent-based societal simulation.
https://github.com/digital-terraria-lab/sugarscape
MIT License
7 stars 11 forks source link

Adds config option to disable wraparound #74

Closed colinhanrahan closed 2 months ago

colinhanrahan commented 2 months ago

While working on this, I overhauled agents' Von Neumann and Moore neighbors.

Possible changes:

colinhanrahan commented 2 months ago

The new logic in updateNeighbors() looks just like cell.findNeighborAgents(). That function is only called in doLending(), which could just use cell.neighbors and add a check for agent != None like everything else. We can probably remove findNeighborAgents() (or if you really want, change the logic of everything else to use this function).