Random walk/map program in C++