This c++ code simulates a horse doing random movements to see how many steps it takes on average to come back to the beginning
I create it on a Os machine but i think it sould work on any machine (Im not a program so I may be wrong).
If you are on mac is as simple as downloading all the files into a folder going to the folder in the Terminal and tipping:
g++ main.cpp horse.cpp -o run.exe
./run.exe
Ps: Have some fun with the printPosition function of the horse class, but be aware that maybe the sleep() function can give some trouble.