Advertisement
Guest User

ass program v2.1

a guest
Aug 22nd, 2014
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5. #include <windows.h>
  6. #include <string>
  7.  
  8. // V2.1
  9.  
  10. using namespace std;
  11.  
  12. class redClass {
  13. public:
  14. void setName(string x) {
  15. name = x;
  16.  
  17. }
  18. string getName(){
  19. return name;
  20. }
  21. private:
  22. string name;
  23. };
  24.  
  25. int main() {
  26. redClass message1;
  27. message1.setName("You have selected, ");
  28. redClass message2;
  29. message2.setName("u dirty hag");
  30. redClass message3;
  31. message3.setName("AHHHHHHHHH AHH AGHHHA AHHAG");
  32.  
  33. int playerSelect;
  34. cout << "Select an option" << endl;
  35. cout << "1 = A game of Pick a number 1-10" << endl;
  36. cout << "2 = WIP" << endl;
  37. cout << "3 = nothing at all" << endl;
  38. cout << "4 = Some option to configure yo stuff" << endl;
  39. cin >> playerSelect;
  40.  
  41. if (playerSelect == 4) {
  42. cout << "ded" << endl;
  43.  
  44.  
  45. }
  46.  
  47.  
  48. if (playerSelect == 3) {
  49. cout << "Hurr durr durr HAG" << endl;
  50. Sleep(2000);
  51. cout << "stoopid" << endl;
  52. cout << "loser" << endl;
  53. Sleep(212031);
  54. }
  55.  
  56.  
  57. if (playerSelect == 2) {
  58.  
  59.  
  60. cout << message1.getName() << "Test 2" << endl;
  61.  
  62. Sleep(1400);
  63. cout << "Enter your problem" << endl;
  64. }
  65.  
  66. //////////////////////////////////////////////////////////////////////////////////
  67.  
  68. if (playerSelect == 1) {
  69. cout << message1.getName() << "Pick a number 1 through 10" << endl;
  70. cout << "Annd..." << endl;
  71. Sleep(1000);
  72. cout << ". ";
  73. Sleep(500);
  74. cout << ". ";
  75. Sleep(200);
  76. cout << ". " << endl;
  77. Sleep(100);
  78.  
  79. // Random message generator for message outcomes.
  80. int GUESS;
  81. srand((unsigned)time(NULL));
  82. int ANSWER = rand() % 10 + 1;
  83. cout << "Enter in a number, guess 1 - 10" << endl;
  84. cin >> GUESS;
  85. if (GUESS == ANSWER) {
  86.  
  87. cout << "You got it right, good job sir!" << endl;
  88. Sleep(2000);
  89.  
  90. }
  91. if (GUESS > 10) {
  92. cout << "I SAID ONE THROUGH TEN!!" << endl;
  93. }
  94. srand((unsigned)time(NULL)); // For use with the messsage outcomes.
  95. int randMessageloss = rand() % 6 + 0; // Defines randMessageloss1 as a number between 0 and 4
  96.  
  97. if (randMessageloss == 1) { // Think of these as a three sided dice. The messages will appear depending on what number is chosen.
  98. cout << "you are the worst. try it again" << endl;
  99. Sleep(2000);
  100. }
  101.  
  102. if (randMessageloss == 2){
  103. cout << "like seriously, come on. try again" << endl;
  104. Sleep(2000);
  105. }
  106.  
  107. if (randMessageloss == 3) {
  108. cout << "that was awful so now i'm gonna give you one more chance. get it right loser" << endl;
  109. Sleep(2000);
  110. }
  111. if (randMessageloss == 4) {
  112. cout << "one more chance try again" << endl;
  113. Sleep(2000);
  114. }
  115. if (randMessageloss == 5) {
  116. cout << "now you're being unreasonable" << endl;
  117. Sleep(2000);
  118. }
  119. if (randMessageloss == 6) {
  120. cout << "loser try again." << endl;
  121.  
  122. Sleep(2000);
  123. }
  124.  
  125. cin >> GUESS;
  126. if (GUESS == ANSWER) {
  127.  
  128. cout << "You have learned your lesson well citizen. A second helping of gruel for you tonight citizen!" << endl;
  129. Sleep(3000);
  130.  
  131. }
  132.  
  133. else
  134.  
  135. {
  136. if (randMessageloss == 1){
  137. cout << "wow loser" << endl;
  138. Sleep(1000);
  139. }
  140. if (randMessageloss == 2){
  141. cout << "twice in a row. what a way to lose" << endl;
  142. Sleep(1200);
  143. }
  144.  
  145. if (randMessageloss == 3){
  146. cout << "that was just horrible. cmon man you're giving me skin cancer" << endl;
  147. Sleep(4000);
  148. }
  149. if (randMessageloss == 1){
  150. cout << "twice are you serious " << endl;
  151. Sleep(1000);
  152. }
  153. if (randMessageloss == 2){
  154. cout << "TWO IN A ROW!" << endl;
  155. Sleep(1200);
  156. }
  157.  
  158. if (randMessageloss == 3){
  159. cout << "you suck. like bad." << endl;
  160. Sleep(4000);
  161. }
  162.  
  163. }
  164. }
  165.  
  166. else
  167.  
  168. cout << " " << endl;
  169. return(0);
  170. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement