Simple predator and prey simulator created using SFML.NET
- Each cell has a tick counter which gets increased every frame.
- If the cell is not empty and its tick counter is greater than the max life limit it turns into a empty cell(dies).
- If the cell is an prey and
tick_counter % dup_interval
is 1 a new prey is created inx+1
orx-1
if unavailable. - If the cell is not empty it will randomly move to a position around it self.
- If the position it moved to contained a pray and the cell that moved was a predator it will change the prey into a predator.
- If the position it moved to contained a predator and the cell that moved was a pray it will change the prey into a predator.
- Else it will move to the position.