CodingTrain / CodingTrain/Suggestion-Box
Biology related coding challenge
- Dominant language
- No language data
- Stars
- 570
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
I have a challenge for you. Recreate a game with the following rules. I played this in my biology class.
Rules:
1. The game starts with three rabbits and one lynx on the field. Rabbits positions are randomized.
2. The lynx is randomly thrown onto the field and if it catches(collides with) three rabbits it will survive and have a child.
-The catched rabbits will die (obviously)
-Every multiple of three makes extra lynx (3 rabbits -> 1 child, 6 rabbits -> 2 children, 4 rabbits -> 1 child)
-The lynx will die if it doesn't catch at least three rabbits
-Even if all lynx dies, there will always be one lynx on the field(cannot reach zero)
-the lynxes are removed from the field and thrown again in beginning of the next generation
3. The rabbit population will double every generation
4. There is a 10% chance every generation of a Tuleremia (rabbit fever) that will kill 30% of the rabbit population
I suggest making rabbits and lynx circles and checking collisions with the circles. If the lynx collides with a rabbit, the rabbit will die.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.