Advertisement
Guest User

LoneStar_A I.cxx

a guest
May 26th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.96 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cstring>
  4. #include <cstdlib>
  5. #include <ctime>
  6. using namespace std;
  7. // Bot Ai Functions //
  8. void BotAi() {
  9. cout << "I am L O N E" << endl;
  10. cout << "     S T A R" << endl;
  11. cout << "       A.I:";
  12. }
  13.  
  14. void BotAiAskAge() {
  15. cout << "  How old are you?" << endl;
  16. }
  17. void BotAiSpeakAge() {
  18. cout << "Are you really ";
  19. }
  20.  
  21. void BotAiSpeak1() {
  22. cout << "Ok. ";
  23. }
  24. void BotAiInvalidWords() {
  25. cout << "What?";
  26. }
  27.  
  28. void BotAiLieReply() {
  29. cout << "Then get the fuck out.";
  30. }
  31.  
  32. void BotAiName() {
  33. cout << "What's your name?" << endl;
  34. }
  35. void BotAiGreeting() {
  36. cout << "Nice to meet you, ";
  37. }
  38. // Start of Main Script //      
  39. int main() {
  40. srand(time(0));
  41.  
  42. cout << "[Input a number between 1 and 5]" << endl;
  43.  
  44. char BotNameArr[100][100];
  45. int BotArr[5] = {0, 0, 0, 0, 0};
  46. int Ai;
  47. cin >> Ai;
  48.  
  49. if (Ai <= 5) {
  50. cout << "[Success!]" << endl;
  51. BotArr[0] = Ai;
  52. }
  53.  
  54. switch (BotArr[0]) {
  55. case 1:
  56. cout << "It is 1." << endl;
  57. break;
  58. case 2:
  59. cout << "It is 2." << endl;
  60. break;
  61. case 3:
  62. cout << "It is 3." << endl;
  63. break;
  64. case 4:
  65. cout << "It is 4." << endl;
  66. break;
  67. case 5:
  68. cout << "It is 5." << endl;
  69. break;
  70. default:
  71. cout << "[No matches found]" << endl;
  72. }
  73.  
  74. if (Ai <= 5) {
  75. cout << "[Random numbers generated based on your valid number input]" << endl;
  76. }
  77. else {
  78. cout << "[& Failed to generate random numbers]" << endl;
  79. }
  80.  
  81. for (Ai; Ai <= 5; Ai++) {
  82. cout << 1 + (rand() % 100) <<endl;
  83. }
  84.  
  85. int Ai2;
  86. if (BotArr[0] <= 5 & BotArr[0] != 0) {
  87. Ai2 = BotArr[0];
  88. cout << "Passing the value to a new variable and testing it.." << endl;
  89. }
  90. else {
  91. cout << "[+ Failed to pass value to new variable]" << endl;
  92. cout << "[Restart the program]";
  93. }
  94.  
  95. switch (Ai2) {
  96. case 1:
  97. cout << "It is 1." << endl;
  98. break;
  99. case 2:
  100. cout << "It is 2." << endl;
  101. break;
  102. case 3:
  103. cout << "It is 3." << endl;
  104. break;
  105. case 4:
  106. cout << "It is 4." << endl;
  107. break;
  108. case 5:
  109. cout << "It is 5." << endl;
  110. }
  111. // Possible choice (2+3) //
  112. if (Ai2 == 2) {
  113. Ai--;
  114. Ai--;
  115. Ai--;
  116. }
  117. if (Ai == 3) {
  118. cout << "Decrementing original variable's value to 3 and adding it to the value of 2..." << endl;
  119. cout << "Value is now " << Ai+Ai2 << endl;
  120. cout << "[Restart program until you find the key number]" << endl;
  121. }
  122. // Possible choice (3+2) //
  123. if (Ai2 == 3) {
  124. Ai--;
  125. Ai--;
  126. Ai--;
  127. Ai--;
  128. }
  129. if (Ai == 2) {
  130. cout << "Decrementing original variable's value to 2 and adding it to the value of 3..." << endl;
  131. cout << "Value is now " << Ai+Ai2 << endl;
  132. cout << "[Restart program until you find the key number]" << endl;
  133. }
  134. // Possible choice (4+1) //
  135. if (Ai2 == 4) {
  136. Ai--;
  137. Ai--;
  138. Ai--;
  139. Ai--;
  140. Ai--;
  141. }
  142. if (Ai == 1) {
  143. cout << "Decrementing original variable's value to 1 and adding it to the value of 4..." << endl;
  144. cout << "Value is now " << Ai+Ai2 << endl;
  145. cout << "[Restart program until you find the key number]" << endl;
  146. }
  147. // Possible choice (1+4) //
  148. if (Ai2 == 1) {
  149. Ai--;
  150. Ai--;
  151. }
  152. if (Ai == 4) {
  153. cout << "Decrementing original variable's value to 4 and adding it to the value of 1..." << endl;
  154. cout << "Value is now " << Ai+Ai2 << endl;
  155. cout << "[Restart program until you find the key number]" << endl;
  156. }
  157. // Enlightened choice (5) //
  158. if (Ai2 == 5) {
  159. BotArr[1] = Ai2;
  160. cout << "[You have chosen the number 5! It is the key]" << endl;
  161. cout << "<(Welcome to)>" << endl;
  162. char L = 'L';
  163. char O = 'O';
  164. char N = 'N';
  165. char E = 'E';
  166. char S = 'S';
  167. char T = 'T';
  168. char A = 'A';
  169. char R = 'R';
  170. cout <<" " << L <<" " << O <<" " << N <<" " << E << endl <<" " << S << " " << T << " " << A << " " << R << endl;
  171. cout << "   A.I (unfinished)" << endl;
  172. BotAiAskAge();
  173. }
  174. int Age;
  175. cin >> Age;
  176. if (Age > 16) {
  177. BotAiSpeakAge();
  178. cout << Age << "?" << endl;
  179. }
  180. else {
  181. cout << "Fuck off, kid." << endl;
  182. cout << "[Restart the program when you're 17.]";
  183. }
  184.  
  185. string AA;
  186. cin >> AA;
  187.  
  188. if (AA == "yes" || AA == "yeah" || AA == "yep" || AA == "yup" || AA == "Yes" || AA == "Yeah" || AA == "Yep" || AA == "Yup") {
  189. BotAiSpeak1();
  190. }
  191.  
  192. else {
  193. BotAiLieReply();
  194. }
  195.  
  196. if (AA == "yes" || AA == "yeah" || AA == "yep" || AA == "yup" || AA == "Yes" || AA == "Yeah" || AA == "Yep" || AA == "Yup") {
  197. BotAiName();
  198. }
  199.  
  200. cin >> BotNameArr[0];
  201. BotAiGreeting();
  202. cout << BotNameArr[0] << endl;
  203.  
  204. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement