CookieNumberPrinter, incremental / idle game style numbers in C++

To level up my software development skills, I'm programming a command line game in my spare time. It is a clone of the famous cookieclicker game by ortiel. A clone of a game is simple enough to get up and running fairly quickly, but also extensible enough when needed. How do you store huge score numbers when they don't fit in a long long? How do you write a game loop, how to use threads to handle user input? Saving a game (how to design a proper save format)? Also a great way to learn about project organization, software architecture and to try out design patterns. As the game is a clone of CookieCliker, which itself is an incremental game, I had to figure out how to work with large numbers. Since this is not a university math project, I allowed myself the luxury of using Boosts Multiprecision. The library handles the large numbers, including caluclation and operations with such a number. I did want to print the numbers in Idle Style, where large numbers are displayed with a suffix, like '1 million' instead of '1000000' and so on. This 'C++' class can be used to print Boost's 'cpp_dec_float' numbers in incremental style. It's just one header.

Top News