Description
Animal life simulation project carried out as part of my 2 years IT Technical Degree (2021-2022). This simulation models the behaviour of rabbits and foxes in a grassland environment. Animals move, feed, reproduce, and interact with each other according to specific rules. For example, rabbits can run away from fox attacks if they have enough energy, and young foxes depend on their mother for food until they reach adulthood.
To structure this project, I used design patterns like Singleton to manage the world’s unique instance, Strategy for animal-specific behaviors, and State to manage their internal states. The world, represented by a matrix of meadows, is changing every day with updates of resources and actions of animals.
I also created a class diagram to show the relationships between different entities like World, Meadow, Animal, Rabbit, and Fox. A graphical interface allows to visualize the simulation in real time, displaying the details of animals and grasslands.
The project is stable and includes several simulation scenarios to demonstrate animal behaviors.
Technology used
- Java
- StarUML