Skip to content

justthatpixel/Predator-Prey-simulation

Repository files navigation

Eco-system-simulation

This is a predator/prey simulator

simulationyhyh

Behaviour of species

Tigers

  • Tigers only hunt during the day
  • Tigers only hunt Zebras
  • If a Tiger reaches an age of more than 150, they will die of old age
  • Tigers will breed with the opposite gender and a valid breeding age(15)
  • Tigers can pass on diseases to other Tigers as well as Lions at any time
  • If a tiger does carry a disease, they have a 50% chance of dying at each step

Lions

  • Lions hunt Zebras and Mice
  • Lions can hunt during the day and night
  • Lions hunt Zebras and Mice
  • Lions can hunt during the day and night
  • Lions will breed with other lions that are of the opposite gender and valid breeding age(15)
  • If a Lion exceeds the age of 150, they will die
  • Lions can pass on disease to other lions at any time, as well as Tigers
  • If a Lion does carry a disease, they have a 50% chance of dying at each step

Zebras

  • Zebras are awake and active during the day
  • If a Zebra exceeds the age of 150, they will die
  • They look for at eat grass
  • If their hunger level goes below zero, they will die
  • Depending on the age of the grass, zebras will get different food level gains when eating grass of different ages
  • Zebras can breed with other Zebras of opposite gender and once they reach their breeding age (5)

Hares

  • Hares also eat grass and compete with Zebras in order to eat grass
  • If Hares exceed the age of 40, they will die
  • Hares are awake and active during the day
  • If their hunger level goes below zero, they will die
  • Depending on the age of the grass, Hares will get different food level gains when eating grass of different ages
  • Hares can breed with other Hares of opposite gender and at the breeding age(5)

Mice

  • Majority of the time Mice will be looking for food or breeding
  • Lions hunt mice
  • They look for and eat grass
  • If their hunger level goes below zero, they will die
  • Mice breed with other mice of opposite gender and of breeding age (5)
  • If the Mice reach over the age of 30, they will die

Grass

  • Grass randomly spawns in any area
  • Grass can breed with other grass, to create more grass at the breeding age of 5
  • They will die due to reaching a maximum age(200)
  • They can also die from overcrowding
  • If the weather is rainy there is a chance of more grass growing
  • Different ages of grass provide different food levels when consumed.

Screenshots:

GUI: Grid size

specify

GUI: Simulate number of steps

this

Class Diagram:

Class_diagram

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published