Skip to content

Latest commit

 

History

History
14 lines (14 loc) · 1.13 KB

README.md

File metadata and controls

14 lines (14 loc) · 1.13 KB

Hare-and-Turtle-simulation-sfml

This is a graphical simulation of the famous race between hare and turtle.
This program is written using the free SFML library.
Install the additional SFML library in your project to run the simulation.

Before the start of the race food is placed randomly.
The tortoise and the hare begin a race at the same time. Every time a random movement is generated (forward or backward) and the corresponding speed is set. When the turtle/hare eats an apple/carrot it gets a bonus and increases its speed for a certain time(the default is 500 milliseconds).
The winner is the one who first reaches the finish line.

Preview