Example #1
0
/**
 * Draw the next frame of the game.
 */
void game_draw(void)
{
    world_print();
    cat_print();
}
Example #2
0
int chooseActivity()
{
	char ch;

	cout << "What would you like to do?" << endl << endl;
	cout << "1. Manage books" << endl;
	cout << "2. Manage clients" << endl;
	cout << "3. Manage categories" << endl;
	cout << "4. View books" << endl;
	cout << "5. View clients" << endl;
	cout << "6. View categories" << endl;
	cout << "7. Save session data" << endl;
	cout << "8. Exit" << endl;

	cout.flush();

	cin.clear();
	cin.ignore(numeric_limits<streamsize>::max(), '\n');

	ch = getchar();
	system("CLS");

	switch (ch)
	{
	case '1':
		Manage(1);
		break;
	case '2':
		Manage(2);
		break;
	case '3':
		Manage(3);
		break;
	case '4':
		book_view();
		system("pause");
		break;
	case '5':
		client_view();
		system("pause");
		break;
	case '6':
		cat_print();
		system("pause");
		break;
    case '7':
        AllExport();
        system("pause");
		break;
	case '8':
		return (1);
	default:
		cout << "Please provide a valid response." << endl;
		cin.clear();
		cin.ignore(numeric_limits<streamsize>::max(), '\n');
		chooseActivity();
		return(-1);
		break;
	}
	return(0);
}