Example #1
0
void ScoreOutput(Player& user, Computer& comp, int roundCount)
{
	cout << "After " << roundCount << " rounds:\n" <<		
		"Your current score: " << user.GetScore() << "\n" <<
		comp.GetName() << "'s current score: " << comp.GetScore() << "\n" <<
		"And the game continues...\n\n";
}
Example #2
0
void outputEnding(Player& player, Computer& comp)
{
	cout << "Final Score:\n" << player.GetName() << ": " << player.GetScore() << "\n" << comp.GetName() << ": " << comp.GetScore() << "\n\n";

	// Whichever player has the higher score wins
	if ( player.GetScore() >= comp.GetScore() )
		cout << "Congratulations, " << player.GetName() << "! You beat the computer in Rummy 500!";
	else
		cout << "Sorry, " << comp.GetName() << " defeated you!";

	// Thanks to the players
	cout << "\n\nI hope you enjoyed my game!" <<
		"\nFeedback please to: [email protected]\n\n";
}