Esempio n. 1
0
// Main prompts player to indicate new or existing user, then calls the appropriate function for either. Afterward,
// the function containing the adventure game is called.
int main(int argc, char *argv[]) {
    msgDisplay(0);
    void gameBegin(string);
    bool rightInp = false;

    while (rightInp == false){	
        string input;
	cout << "> ";
	cin >> input;
	if (input == "l"){          // Existing user
		rightInp = true;
		game.login(); 
		gameBegin(game.getUserName());
	}
	else if ( input == "n"){    // New user
		rightInp = true;
		game.newUser();
		gameBegin(game.getUserName());
	}
	else {
		msgDisplay(1);     // Instructions reiterated if invalid entry given
	}
    }
   return 0;
}