eighthill / Slime_Mold_Simulation

A student project simulating smile mold🧫
MIT License
6 stars 0 forks source link

Update method reflect_at_boundary in agent class #21

Closed Isabelle-Gbl closed 7 months ago

Isabelle-Gbl commented 8 months ago

We need to update the reflect_at_boundary method in the agent class. The code right now is from ChatGPT and was just implemented as temporaty solution and could be written shorter and easier to read.

in case a possible next position of an agent would be out of range, the method calculates an other next position, based on the reflection on the boundary

eighthill commented 8 months ago

Code has been updated and optimized. The workflow doesn't seem to work after the changes: Black is raising an error, even though the code has been tested and formatted using black locally. Working on a fix. Branch: eighthill_sandbox