Advertisement
jaybeau21

ReportWinner

Apr 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. void ReportWinner(int winvalue)
  2. /*Informs the user who won the round based on winvalue
  3. winvalue >= 0 && winvalue <= 2
  4. The winner of the round is reported*/
  5. {
  6. if(winvalue == 1)
  7. {
  8. SetColor(4);
  9. cout << endl << "Sorry, the computer won this hand." << endl;
  10. SetColor(7);
  11. }
  12. else if (winvalue == 2)
  13. {
  14. SetColor(2);
  15. cout << endl << "Congratulations, you won this hand!" << endl;
  16. SetColor(7);
  17. }
  18. else
  19. {
  20. SetColor(5);
  21. cout << endl << "This hand resulted in a draw." << endl;
  22. SetColor(7);
  23. }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement