@@ -352,11 +352,11 @@ def perform_prey_actions(
352
352
353
353
For prey the rules are:
354
354
1. At each chronon, a prey moves randomly to one of the adjacent unoccupied
355
- squares. If there are no free squares, no movement takes place.
355
+ squares. If there are no free squares, no movement takes place.
356
356
2. Once a prey has survived a certain number of chronons it may reproduce.
357
- This is done as it moves to a neighbouring square,
358
- leaving behind a new prey in its old position.
359
- Its reproduction time is also reset to zero.
357
+ This is done as it moves to a neighbouring square,
358
+ leaving behind a new prey in its old position.
359
+ Its reproduction time is also reset to zero.
360
360
361
361
>>> wt = WaTor(WIDTH, HEIGHT)
362
362
>>> reproducable_entity = Entity(True, coords=(0, 1))
@@ -383,14 +383,14 @@ def perform_predator_actions(
383
383
384
384
For predators the rules are:
385
385
1. At each chronon, a predator moves randomly to an adjacent square occupied
386
- by a prey. If there is none, the predator moves to a random adjacent
387
- unoccupied square. If there are no free squares, no movement takes place.
386
+ by a prey. If there is none, the predator moves to a random adjacent
387
+ unoccupied square. If there are no free squares, no movement takes place.
388
388
2. At each chronon, each predator is deprived of a unit of energy.
389
389
3. Upon reaching zero energy, a predator dies.
390
390
4. If a predator moves to a square occupied by a prey,
391
- it eats the prey and earns a certain amount of energy.
391
+ it eats the prey and earns a certain amount of energy.
392
392
5. Once a predator has survived a certain number of chronons
393
- it may reproduce in exactly the same way as the prey.
393
+ it may reproduce in exactly the same way as the prey.
394
394
395
395
>>> wt = WaTor(WIDTH, HEIGHT)
396
396
>>> wt.set_planet([[Entity(True, coords=(0, 0)), Entity(False, coords=(0, 1))]])
0 commit comments