Here are the things I do understand:
The long wait after pressing 'play'
but I also have a couple tips, and a big one is to use MULTIPLE files. This can shorten compile time and improve readability overall. You also might want to:
1. Use classes (https://www.geeksforgeeks.org/c-classes-and-objects/), if your not going to use classes, use C instead of C++.
2. Avoid having too many variables, a good practice is to use classes from the C++ STL(Standard Template Library) such as vector and map.
3. DON'T using namespace std; it completely defeats the purpose of the namespace in the first place.
4. Use pointers(https://www.geeksforgeeks.org/pointers-c-examples/)! These guys are amazing! Learn how to use them effectively, they can vastly improve performance.
These are just a few tips I have for you, use them to optimoize your code, and try to figure out how to optimize it further. If you have no idea what I was talking about, I recommend dedicating a little more time to learning C++/C. Not bad for a first project though! Let me know if you have any questions
FINALLY! another C++ programer in this comunity, nice brain teaser!
It does look like you spent a good amount of time on this, but that's not an operating system. An operating system manages (deep breath):
GUI, memory adresses, user input, networking(opens, closes, and sends information through ports), security, uses kernel to interface with hardware, manages boot and POST on startup, manages storage, feeds CPU commands from RAM, opens and closes applications and frees memory that is not in use, takes care of audio using drivers provided by manufactiuring, uses graphics drivers, and for when the computer doesn't have a graphics card it will need default drivers... just to name a few. Nice try though!
@ChimaNwosu1 use a switch statement: https://www.tutorialspoint.com/cplusplus/cpp_switch_statement.htm
you can get the actual char key press by casting it like so:
int key = keypress();
std::cout << (char)key << std::endl;
The numbers you see are the population size, the numbers with commas are the corresponding mutations of each creature: Speed, Size,luck. Luck gives a chance to survive after finding no food