I'm trying to make a text based game with both a top and bottom status bar. how can i make sure that (1) it is always visible and (2) the info is always updating and accurate as the player plays?
Here is the code i have so far for the status bars:
string name = "Name"; // name
int LvNum; // level number
string Asp = "Aspiration"; // aspiration
int hlth; // current health
int mxhlth; // max health
int money; // money
int LukP;// Luck points
string area= "McCarther Park"; // displays the name of the area of the map you are in
string time_of_day = "Morning"; // displays what time of day it is; ie, morning ,midday ,afternoon ,evening, night
int TopBar(); // status bar on the top of the screen
int BottomBar(); // status bar on the bottom of the screen
int game();
int main ()
{
TopBar();
cout << " the game goes in between here" << endl;//
It just needs to be a part of your loop. Everytime the user does something that modifies the status of the game, write out the status bars and wait for the next input.