Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 232.08 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <cstdlib>
  5. #include <ctime>
  6.  
  7. using namespace std;
  8.  
  9. void ticGame()
  10. {
  11. system("COLOR 0f");
  12. printf;
  13. int boxnum;
  14. char player1 = 'X';
  15. char player2 = 'O';
  16. string p1, p2;
  17. cout << "--------------------------------------------------------------------------------" << endl;
  18. cout << "Welcome to tic-tac-toe! Enjoy!" << endl;
  19. cout << " " << endl;
  20. cout << "Player 1, enter your name:" << endl;
  21. cin >> p1;
  22. cout << p1 << ": Your character is X." << endl;;
  23. cout << " " << endl;
  24. do {
  25. cout << "Player 2, enter your name:" << endl;
  26. cin >> p2;
  27. cout << p2 << ": Your character is O." << endl;
  28. if (p1 == p2)
  29. {
  30. cout << " " << endl;
  31. cout << "Error: Please choose a name that is different than the other person." << endl;
  32. cout << " " << endl;
  33. }
  34. } while (p1 == p2);
  35. do
  36. {
  37. cout << " " << endl;
  38. char ticGrid [11][12] =
  39. {
  40. {0,0,0,0,179,0,0,0,179,0,0,0},
  41. {0,0,49,0,179,0,50,0,179,0,51,0},
  42. {0,0,0,0,179,0,0,0,179,0,0,0},
  43. {0,196,196,196,197,196,196,196,197,196,196,196},
  44. {0,0,0,0,179,0,0,0,179,0,0,0},
  45. {0,0,52,0,179,0,53,0,179,0,54,0},
  46. {0,0,0,0,179,0,0,0,179,0,0,0},
  47. {0,196,196,196,197,196,196,196,197,196,196,196},
  48. {0,0,0,0,179,0,0,0,179,0,0,0},
  49. {0,0,55,0,179,0,56,0,179,0,57,0},
  50. {0,0,0,0,179,0,0,0,179,0,0,0},
  51. };
  52.  
  53. for (int x = 0; x < 11; x++)
  54. {
  55. for (int y = 0; y < 12; y++)
  56. {
  57. cout << ticGrid [x][y];
  58. }
  59. cout << endl;
  60. }
  61. cout << " " << endl;
  62. cout << "Use the key above to say which box you would like to put your character in." << endl;
  63. int x;
  64. for (x = 1; x < 10; x++)
  65. {
  66. if (x % 2 != 0)
  67. {
  68. cout << " " << endl;
  69. cout << p1 << ", it is your turn, please choose the box you would like to put the character in (number)." << endl;
  70. cin >> boxnum;
  71. if (boxnum == 1)
  72. {
  73. ticGrid[1][2] = 'X';
  74. for (int x = 0; x < 11; x++)
  75. {
  76. for (int y = 0; y < 12; y++)
  77. {
  78. cout << ticGrid [x][y];
  79. }
  80. cout << endl;
  81. }
  82. }
  83. else if (boxnum == 2)
  84. {
  85. ticGrid[1][6] = 'X';
  86. for (int x = 0; x < 11; x++)
  87. {
  88. for (int y = 0; y < 12; y++)
  89. {
  90. cout << ticGrid [x][y];
  91. }
  92. cout << endl;
  93. }
  94. }
  95. else if (boxnum == 3)
  96. {
  97. ticGrid[1][10] = 'X';
  98. for (int x = 0; x < 11; x++)
  99. {
  100. for (int y = 0; y < 12; y++)
  101. {
  102. cout << ticGrid [x][y];
  103. }
  104. cout << endl;
  105. }
  106. }
  107. else if (boxnum == 4)
  108. {
  109. ticGrid[5][2] = 'X';
  110. for (int x = 0; x < 11; x++)
  111. {
  112. for (int y = 0; y < 12; y++)
  113. {
  114. cout << ticGrid [x][y];
  115. }
  116. cout << endl;
  117. }
  118. }
  119. else if (boxnum == 5)
  120. {
  121. ticGrid[5][6] = 'X';
  122. for (int x = 0; x < 11; x++)
  123. {
  124. for (int y = 0; y < 12; y++)
  125. {
  126. cout << ticGrid [x][y];
  127. }
  128. cout << endl;
  129. }
  130. }
  131. else if (boxnum == 6)
  132. {
  133. ticGrid[5][10] = 'X';
  134. for (int x = 0; x < 11; x++)
  135. {
  136. for (int y = 0; y < 12; y++)
  137. {
  138. cout << ticGrid [x][y];
  139. }
  140. cout << endl;
  141. }
  142. }
  143. else if (boxnum == 7)
  144. {
  145. ticGrid[9][2] = 'X';
  146. for (int x = 0; x < 11; x++)
  147. {
  148. for (int y = 0; y < 12; y++)
  149. {
  150. cout << ticGrid [x][y];
  151. }
  152. cout << endl;
  153. }
  154. }
  155. else if (boxnum == 8)
  156. {
  157. ticGrid[9][6] = 'X';
  158. for (int x = 0; x < 11; x++)
  159. {
  160. for (int y = 0; y < 12; y++)
  161. {
  162. cout << ticGrid [x][y];
  163. }
  164. cout << endl;
  165. }
  166. }
  167. else if (boxnum == 9)
  168. {
  169. ticGrid[9][10] = 'X';
  170. for (int x = 0; x < 11; x++)
  171. {
  172. for (int y = 0; y < 12; y++)
  173. {
  174. cout << ticGrid [x][y];
  175. }
  176. cout << endl;
  177. }
  178. }
  179. else
  180. {
  181. cout << " " << endl;
  182. cout << "An invalid number was entered, please try again!" << endl;
  183. cout << " " << endl;
  184. }
  185. if (ticGrid[1][2] == 'X' && ticGrid[1][6] == 'X' && ticGrid[1][10] == 'X' || ticGrid[5][2] == 'X' && ticGrid[5][6] == 'X' && ticGrid[5][10] == 'X' || ticGrid[9][2] == 'X' && ticGrid[9][6] == 'X' && ticGrid[9][10] == 'X' || ticGrid[1][6] == 'X' && ticGrid[5][6] == 'X' && ticGrid[9][6] == 'X' || ticGrid[1][2] == 'X' && ticGrid[5][2] == 'X' && ticGrid[9][2] == 'X' || ticGrid[1][10] == 'X' && ticGrid[5][10] == 'X' && ticGrid[9][10] == 'X' || ticGrid[1][2] == 'X' && ticGrid[5][6] == 'X' && ticGrid[9][10] == 'X' || ticGrid[1][10] == 'X' && ticGrid[5][6] == 'X' && ticGrid[9][2] == 'X')
  186. {
  187. system("COLOR 0A");
  188. printf;
  189. cout << " " << endl;
  190. cout << " +============================================================+ " << endl;
  191. cout << " | | " << endl;
  192. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  193. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  194. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  195. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  196. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  197. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  198. cout << " | | " << endl;
  199. cout << " +============================================================+ " << endl;
  200. cout << " " << endl;
  201. cout << "Congratulations! " << p1 << ", you have won!" << endl;
  202. cout << " " << endl;
  203. break;
  204. }
  205. else if ((ticGrid [1][2] == 'X' || ticGrid [1][2] == 'O') && (ticGrid [1][6] == 'X' || ticGrid [1][6] == 'O') && (ticGrid [1][10] == 'X' || ticGrid [1][10] == 'O') && (ticGrid [5][2] == 'X' || ticGrid [5][2] == 'O') && (ticGrid [5][6] == 'X' || ticGrid [5][6] == 'O') && (ticGrid [5][10] == 'X' || ticGrid [5][10] == 'O') && (ticGrid [9][2] == 'X' || ticGrid [9][2] == 'O') && (ticGrid [9][6] == 'X' || ticGrid [9][6] == 'O') && (ticGrid [9][10] == 'X' || ticGrid [9][10] == 'O'))
  206. {
  207. system("COLOR 0d");
  208. printf;
  209. cout << " " << endl;
  210. cout << " +=========================================+ " << endl;
  211. cout << " | | " << endl;
  212. cout << " | d8888b. d8888b. .d8b. db d8b db | " << endl;
  213. cout << " | 88 `8D 88 `8D d8' `8b 88 I8I 88 | " << endl;
  214. cout << " | 88 88 88oobY' 88ooo88 88 I8I 88 | " << endl;
  215. cout << " | 88 88 88`8b 88~~~88 Y8 I8I 88 | " << endl;
  216. cout << " | 88 .8D 88 `88. 88 88 `8b d8'8b d8' | " << endl;
  217. cout << " | Y8888D' 88 YD YP YP `8b8' `8d8' | " << endl;
  218. cout << " | | " << endl;
  219. cout << " +=========================================+ " << endl;
  220. cout << " " << endl;
  221. cout << "The game concludes as a draw." << endl;
  222. cout << " " << endl;
  223. break;
  224. }
  225. else
  226. {
  227. cout << " " << endl;
  228. }
  229. }
  230. else
  231. {
  232. cout << " " << endl;
  233. cout << p2 << ", it is your turn, please choose the box you would like to put the character in (number)." << endl;
  234. cin >> boxnum;
  235. if (boxnum == 1)
  236. {
  237. ticGrid[1][2] = 'O';
  238. for (int x = 0; x < 11; x++)
  239. {
  240. for (int y = 0; y < 12; y++)
  241. {
  242. cout << ticGrid [x][y];
  243. }
  244. cout << endl;
  245. }
  246. }
  247. else if (boxnum == 2)
  248. {
  249. ticGrid[1][6] = 'O';
  250. for (int x = 0; x < 11; x++)
  251. {
  252. for (int y = 0; y < 12; y++)
  253. {
  254. cout << ticGrid [x][y];
  255. }
  256. cout << endl;
  257. }
  258. }
  259. else if (boxnum == 3)
  260. {
  261. ticGrid[1][10] = 'O';
  262. for (int x = 0; x < 11; x++)
  263. {
  264. for (int y = 0; y < 12; y++)
  265. {
  266. cout << ticGrid [x][y];
  267. }
  268. cout << endl;
  269. }
  270. }
  271. else if (boxnum == 4)
  272. {
  273. ticGrid[5][2] = 'O';
  274. for (int x = 0; x < 11; x++)
  275. {
  276. for (int y = 0; y < 12; y++)
  277. {
  278. cout << ticGrid [x][y];
  279. }
  280. cout << endl;
  281. }
  282. }
  283. else if (boxnum == 5)
  284. {
  285. ticGrid[5][6] = 'O';
  286. for (int x = 0; x < 11; x++)
  287. {
  288. for (int y = 0; y < 12; y++)
  289. {
  290. cout << ticGrid [x][y];
  291. }
  292. cout << endl;
  293. }
  294. }
  295. else if (boxnum == 6)
  296. {
  297. ticGrid[5][10] = 'O';
  298. for (int x = 0; x < 11; x++)
  299. {
  300. for (int y = 0; y < 12; y++)
  301. {
  302. cout << ticGrid [x][y];
  303. }
  304. cout << endl;
  305. }
  306. }
  307. else if (boxnum == 7)
  308. {
  309. ticGrid[9][2] = 'O';
  310. for (int x = 0; x < 11; x++)
  311. {
  312. for (int y = 0; y < 12; y++)
  313. {
  314. cout << ticGrid [x][y];
  315. }
  316. cout << endl;
  317. }
  318. }
  319. else if (boxnum == 8)
  320. {
  321. ticGrid[9][6] = 'O';
  322. for (int x = 0; x < 11; x++)
  323. {
  324. for (int y = 0; y < 12; y++)
  325. {
  326. cout << ticGrid [x][y];
  327. }
  328. cout << endl;
  329. }
  330. }
  331. else if (boxnum == 9)
  332. {
  333. ticGrid[9][10] = 'O';
  334. for (int x = 0; x < 11; x++)
  335. {
  336. for (int y = 0; y < 12; y++)
  337. {
  338. cout << ticGrid [x][y];
  339. }
  340. cout << endl;
  341. }
  342. }
  343. else
  344. {
  345. cout << " " << endl;
  346. cout << "An invalid number was entered, please try again!" << endl;
  347. cout << " " << endl;
  348. }
  349.  
  350. if (ticGrid[1][2] == 'O' && ticGrid[1][6] == 'O' && ticGrid[1][10] == 'O' || ticGrid[5][2] == 'O' && ticGrid[5][6] == 'O' && ticGrid[5][10] == 'O' || ticGrid[9][2] == 'O' && ticGrid[9][6] == 'O' && ticGrid[9][10] == 'O' || ticGrid[1][6] == 'O' && ticGrid[5][6] == 'O' && ticGrid[9][6] == 'O' || ticGrid[1][2] == 'O' && ticGrid[5][2] == 'O' && ticGrid[9][2] == 'O' || ticGrid[1][10] == 'O' && ticGrid[5][10] == 'O' && ticGrid[9][10] == 'O' || ticGrid[1][2] == 'O' && ticGrid[5][6] == 'O' && ticGrid[9][10] == 'O' || ticGrid[1][10] == 'O' && ticGrid[5][6] == 'O' && ticGrid[9][2] == 'O')
  351. {
  352. system("COLOR 0A");
  353. printf;
  354. cout << " " << endl;
  355. cout << " +============================================================+ " << endl;
  356. cout << " | | " << endl;
  357. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  358. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  359. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  360. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  361. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  362. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  363. cout << " | | " << endl;
  364. cout << " +============================================================+ " << endl;
  365. cout << " " << endl;
  366. cout << "Congratulations! " << p2 << ", you have won!" << endl;
  367. cout << " " << endl;
  368. break;
  369. }
  370. else
  371. {
  372. cout << " " << endl;
  373. }
  374. }
  375. }
  376. } while (boxnum > 9 || boxnum < 1);
  377. }
  378. void instructionsTTT()
  379. {
  380. system("COLOR f1");
  381. printf;
  382. cout << " " << endl;
  383. cout << " +===============================================================+ " << endl;
  384. cout << " | | " << endl;
  385. cout << " | 888 w w w | " << endl;
  386. cout << " | 8 8d8b. d88b w8ww 8d8b 8 8 .d8b w8ww w .d8b. 8d8b. d88b | " << endl;
  387. cout << " | 8 8P Y8 `Yb. 8 8P 8b d8 8 8 8 8' .8 8P Y8 `Yb. | " << endl;
  388. cout << " | 888 8 8 Y88P Y8P 8 `Y8P8 `Y8P Y8P 8 `Y8P' 8 8 Y88P | " << endl;
  389. cout << " | | " << endl;
  390. cout << " +===============================================================+ " << endl;
  391. cout << " " << endl;
  392. cout << "1. Take out a 3x3 grid of squares (this will be provided for you here)." << endl;
  393. cout << "2. Player 1 (X character) goes first, player 2 (O character) goes second." << endl;
  394. cout << "3. Players alternate turns placing X's and O's on the board until either one player has three in a row, horizontally, vertically or diagonally; or all nine squares are filled." << endl;
  395. cout << "4. The player that is able to get 3 of his or her character in-a-row wins." << endl;
  396. cout << "5. If all spaces (9) are filled and nobody has 3 in-a-row, the game results as a draw." << endl;
  397. cout << " " << endl;
  398. cout << "Tips: Starting in the middle usually helps a lot more. Include offensive and defensive strategies to help you win. Don't forget about defending yourself, check on the other player if they have chances of getting a 3 in-a-row!" << endl;
  399. cout << " " << endl;
  400. }
  401. void instructionsHang()
  402. {
  403. system("COLOR f1");
  404. printf;
  405. cout << " " << endl;
  406. cout << " +===============================================================+ " << endl;
  407. cout << " | | " << endl;
  408. cout << " | 888 w w w | " << endl;
  409. cout << " | 8 8d8b. d88b w8ww 8d8b 8 8 .d8b w8ww w .d8b. 8d8b. d88b | " << endl;
  410. cout << " | 8 8P Y8 `Yb. 8 8P 8b d8 8 8 8 8' .8 8P Y8 `Yb. | " << endl;
  411. cout << " | 888 8 8 Y88P Y8P 8 `Y8P8 `Y8P Y8P 8 `Y8P' 8 8 Y88P | " << endl;
  412. cout << " | | " << endl;
  413. cout << " +===============================================================+ " << endl;
  414. cout << " " << endl;
  415. cout << "1. Choose the category you would like to choose a word from." << endl;
  416. cout << "2. A secret word will be chosen from that category for you to guess." << endl;
  417. cout << "3. Blank spaces will be shown, showing the number of letters in the word." << endl;
  418. cout << "4. A letter bank will also show up, showing the letters you have available." << endl;
  419. cout << "5. Start guessing letters you think that will be in the word. Correct guesses will show up in the blank spaces." << endl;
  420. cout << "6. You can only get up to 6 letters wrong. If a letter is not in the word, a hanged man will start to appear. One by one his body parts will show for each incorrect letter." << endl;
  421. cout << "7. 1 incorrect guess = adds a head. 2 incorrect guesses = adds a body. 3 incorrect guesses = adds an arm. 4 incorrect guesses = adds the other arm. 5 incorrect guesses = adds a leg. 6 incorrect guesses = adds the other leg." << endl;
  422. cout << "8. You will receive a total of 2 tokens per game to use if you would like to receive a hint. This means you have a maximum of 2 hints." << endl;
  423. cout << "9. If you get 6 incorrect letters, you lose. If you guess the word before that, you win." << endl;
  424. cout << "10. If you repeat a letter, then you will add another body part (if the letter is wrong)." << endl;
  425. cout << " " << endl;
  426. cout << "Tips: Try to get rid of the vowels first." << endl;
  427. cout << " " << endl;
  428. }
  429. void hangGame()
  430. {
  431. int category;
  432. string wordUS, wordCOUN, wordANI;
  433. system("COLOR 0f");
  434. printf;
  435. cout << "--------------------------------------------------------------------------------" << endl;
  436. cout << "Welcome to hangman! Enjoy!" << endl;
  437. do {
  438. cout << " " << endl;
  439. cout << "From what category would you like to guess a word from?" << endl;
  440. cout << "1. US Cities" << endl;
  441. cout << "2. Countries" << endl;
  442. cout << "3. Animals" << endl;
  443. cout << " " << endl;
  444. cout << "Please choose the number corresponding to the category you would like to guess from." << endl;
  445. cin >> category;
  446. if (category == 1)
  447. {
  448. cout << "You have chosen the US Cities category." << endl;
  449. srand(time(NULL));
  450. int randCity = (rand() % 3) + 1;
  451. if (randCity == 1) //lansing
  452. {
  453. int category;
  454. int wrongguess = 0;
  455. int token = 2;
  456. char letterSample[8][18] =
  457. {
  458. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  459. {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
  460. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  461. {65,0,66,0,67,0,68,0,69,0,70,0,71},
  462. {72,0,73,0,74,0,75,0,76,0,77,0,78},
  463. {79,0,80,0,81,0,82,0,83,0,84,0,85},
  464. {0,0,86,0,87,0,88,0,89,0,90,0,0},
  465. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  466. };
  467. char lansingWord[1][13] = {95,0,95,0,95,0,95,0,95,0,95,0,95};
  468. int z;
  469. cout << "---------------------------------------------------------------" << endl;
  470. for (int x = 0; x < 8; x++)
  471. {
  472. for (int y = 0; y < 18; y++)
  473. {
  474. cout << letterSample [x][y];
  475. }
  476. cout << endl;
  477. }
  478. for (int x = 0; x < 1; x++)
  479. {
  480. for (int y = 0; y < 13; y++)
  481. {
  482. cout << lansingWord [x][y];
  483. }
  484. cout << endl;
  485. }
  486. cout << " " << endl;
  487. cout << " _________ \n";
  488. cout << "| | \n";
  489. cout << "| \n";
  490. cout << "| \n";
  491. cout << "| \n";
  492. cout << "| \n";
  493. cout << "| \n";
  494. cout << " " << endl;
  495. for (z = 0; z < 1000; z++)
  496. {
  497. char guess;
  498. cout << " " << endl;
  499. if (token >= 0)
  500. {
  501. cout << "-- Token(s) left: " << token << " --" << endl;
  502. }
  503. cout << " " << endl;
  504. cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
  505. cin >> guess;
  506. cout << " " << endl;
  507. cout << "---------------------------------------------------------------" << endl;
  508. if (guess == 'a' || guess == 'A')
  509. {
  510. lansingWord[0][2] = 'A';
  511. cout << " " << endl;
  512. for (int x = 0; x < 1; x++)
  513. {
  514. for (int y = 0; y < 13; y++)
  515. {
  516. cout << lansingWord [x][y];
  517. }
  518. cout << endl;
  519. }
  520. letterSample[3][0] = 0;
  521. for (int x = 0; x < 8; x++)
  522. {
  523. for (int y = 0; y < 18; y++)
  524. {
  525. cout << letterSample [x][y];
  526. }
  527. cout << endl;
  528. }
  529. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  530. }
  531. else if (guess == 'b' || guess == 'B')
  532. {
  533. letterSample[3][2] = 0;
  534. for (int x = 0; x < 8; x++)
  535. {
  536. for (int y = 0; y < 18; y++)
  537. {
  538. cout << letterSample [x][y];
  539. }
  540. cout << endl;
  541. }
  542. cout << " " << endl;
  543. }
  544. else if (guess == 'c' || guess == 'C')
  545. {
  546. letterSample[3][4] = 0;
  547. for (int x = 0; x < 8; x++)
  548. {
  549. for (int y = 0; y < 18; y++)
  550. {
  551. cout << letterSample [x][y];
  552. }
  553. cout << endl;
  554. }
  555. cout << " " << endl;
  556. }
  557. else if (guess == 'd' || guess == 'D')
  558. {
  559. letterSample[3][6] = 0;
  560. for (int x = 0; x < 8; x++)
  561. {
  562. for (int y = 0; y < 18; y++)
  563. {
  564. cout << letterSample [x][y];
  565. }
  566. cout << endl;
  567. }
  568. cout << " " << endl;
  569. }
  570. else if (guess == 'e' || guess == 'E')
  571. {
  572. letterSample[3][8] = 0;
  573. for (int x = 0; x < 8; x++)
  574. {
  575. for (int y = 0; y < 18; y++)
  576. {
  577. cout << letterSample [x][y];
  578. }
  579. cout << endl;
  580. }
  581. cout << " " << endl;
  582. }
  583. else if (guess == 'f' || guess == 'F')
  584. {
  585. letterSample[3][10] = 0;
  586. for (int x = 0; x < 8; x++)
  587. {
  588. for (int y = 0; y < 18; y++)
  589. {
  590. cout << letterSample [x][y];
  591. }
  592. cout << endl;
  593. }
  594. cout << " " << endl;
  595. }
  596. else if (guess == 'g' || guess == 'G')
  597. {
  598. lansingWord[0][12] = 'G';
  599. cout << " " << endl;
  600. for (int x = 0; x < 1; x++)
  601. {
  602. for (int y = 0; y < 13; y++)
  603. {
  604. cout << lansingWord [x][y];
  605. }
  606. cout << endl;
  607. }
  608. letterSample[3][12] = 0;
  609. for (int x = 0; x < 8; x++)
  610. {
  611. for (int y = 0; y < 18; y++)
  612. {
  613. cout << letterSample [x][y];
  614. }
  615. cout << endl;
  616. }
  617. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  618. }
  619. else if (guess == 'h' || guess == 'H')
  620. {
  621. letterSample[4][0] = 0;
  622. for (int x = 0; x < 8; x++)
  623. {
  624. for (int y = 0; y < 18; y++)
  625. {
  626. cout << letterSample [x][y];
  627. }
  628. cout << endl;
  629. }
  630. cout << " " << endl;
  631. }
  632. else if (guess == 'i' || guess == 'I')
  633. {
  634. lansingWord[0][8] = 'I';
  635. cout << " " << endl;
  636. for (int x = 0; x < 1; x++)
  637. {
  638. for (int y = 0; y < 13; y++)
  639. {
  640. cout << lansingWord [x][y];
  641. }
  642. cout << endl;
  643. }
  644. letterSample[4][2] = 0;
  645. for (int x = 0; x < 8; x++)
  646. {
  647. for (int y = 0; y < 18; y++)
  648. {
  649. cout << letterSample [x][y];
  650. }
  651. cout << endl;
  652. }
  653. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  654. }
  655. else if (guess == 'j' || guess == 'J')
  656. {
  657. letterSample[4][4] = 0;
  658. for (int x = 0; x < 8; x++)
  659. {
  660. for (int y = 0; y < 18; y++)
  661. {
  662. cout << letterSample [x][y];
  663. }
  664. cout << endl;
  665. }
  666. cout << " " << endl;
  667. }
  668. else if (guess == 'k' || guess == 'K')
  669. {
  670. letterSample[4][6] = 0;
  671. for (int x = 0; x < 8; x++)
  672. {
  673. for (int y = 0; y < 18; y++)
  674. {
  675. cout << letterSample [x][y];
  676. }
  677. cout << endl;
  678. }
  679. cout << " " << endl;
  680. }
  681. else if (guess == 'l' || guess == 'L')
  682. {
  683. lansingWord[0][0] = 'L';
  684. cout << " " << endl;
  685. for (int x = 0; x < 1; x++)
  686. {
  687. for (int y = 0; y < 13; y++)
  688. {
  689. cout << lansingWord [x][y];
  690. }
  691. cout << endl;
  692. }
  693. letterSample[4][8] = 0;
  694. for (int x = 0; x < 8; x++)
  695. {
  696. for (int y = 0; y < 18; y++)
  697. {
  698. cout << letterSample [x][y];
  699. }
  700. cout << endl;
  701. }
  702. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  703. }
  704. else if (guess == 'm' || guess == 'M')
  705. {
  706. letterSample[4][10] = 0;
  707. for (int x = 0; x < 8; x++)
  708. {
  709. for (int y = 0; y < 18; y++)
  710. {
  711. cout << letterSample [x][y];
  712. }
  713. cout << endl;
  714. }
  715. cout << " " << endl;
  716. }
  717. else if (guess == 'n' || guess == 'N')
  718. {
  719. lansingWord[0][4] = 'N';
  720. lansingWord[0][10] = 'N';
  721. cout << " " << endl;
  722. for (int x = 0; x < 1; x++)
  723. {
  724. for (int y = 0; y < 13; y++)
  725. {
  726. cout << lansingWord [x][y];
  727. }
  728. cout << endl;
  729. }
  730. letterSample[4][12] = 0;
  731. for (int x = 0; x < 8; x++)
  732. {
  733. for (int y = 0; y < 18; y++)
  734. {
  735. cout << letterSample [x][y];
  736. }
  737. cout << endl;
  738. }
  739. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  740. }
  741. else if (guess == 'o' || guess == 'O')
  742. {
  743. letterSample[5][0] = 0;
  744. for (int x = 0; x < 8; x++)
  745. {
  746. for (int y = 0; y < 18; y++)
  747. {
  748. cout << letterSample [x][y];
  749. }
  750. cout << endl;
  751. }
  752. cout << " " << endl;
  753. }
  754. else if (guess == 'p' || guess == 'P')
  755. {
  756. letterSample[5][2] = 0;
  757. for (int x = 0; x < 8; x++)
  758. {
  759. for (int y = 0; y < 18; y++)
  760. {
  761. cout << letterSample [x][y];
  762. }
  763. cout << endl;
  764. }
  765. cout << " " << endl;
  766. }
  767. else if (guess == 'q' || guess == 'Q')
  768. {
  769. letterSample[5][4] = 0;
  770. for (int x = 0; x < 8; x++)
  771. {
  772. for (int y = 0; y < 18; y++)
  773. {
  774. cout << letterSample [x][y];
  775. }
  776. cout << endl;
  777. }
  778. cout << " " << endl;
  779. }
  780. else if (guess == 'r' || guess == 'R')
  781. {
  782. letterSample[5][6] = 0;
  783. for (int x = 0; x < 8; x++)
  784. {
  785. for (int y = 0; y < 18; y++)
  786. {
  787. cout << letterSample [x][y];
  788. }
  789. cout << endl;
  790. }
  791. cout << " " << endl;
  792. }
  793. else if (guess == 's' || guess == 'S')
  794. {
  795. lansingWord[0][6] = 'S';
  796. cout << " " << endl;
  797. for (int x = 0; x < 1; x++)
  798. {
  799. for (int y = 0; y < 13; y++)
  800. {
  801. cout << lansingWord [x][y];
  802. }
  803. cout << endl;
  804. }
  805. letterSample[5][8] = 0;
  806. for (int x = 0; x < 8; x++)
  807. {
  808. for (int y = 0; y < 18; y++)
  809. {
  810. cout << letterSample [x][y];
  811. }
  812. cout << endl;
  813. }
  814. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  815. }
  816. else if (guess == 't' || guess == 'T')
  817. {
  818. letterSample[5][10] = 0;
  819. for (int x = 0; x < 8; x++)
  820. {
  821. for (int y = 0; y < 18; y++)
  822. {
  823. cout << letterSample [x][y];
  824. }
  825. cout << endl;
  826. }
  827. cout << " " << endl;
  828. }
  829. else if (guess == 'u' || guess == 'U')
  830. {
  831. letterSample[5][12] = 0;
  832. for (int x = 0; x < 8; x++)
  833. {
  834. for (int y = 0; y < 18; y++)
  835. {
  836. cout << letterSample [x][y];
  837. }
  838. cout << endl;
  839. }
  840. cout << " " << endl;
  841. }
  842. else if (guess == 'v' || guess == 'V')
  843. {
  844. letterSample[6][2] = 0;
  845. for (int x = 0; x < 8; x++)
  846. {
  847. for (int y = 0; y < 18; y++)
  848. {
  849. cout << letterSample [x][y];
  850. }
  851. cout << endl;
  852. }
  853. cout << " " << endl;
  854. }
  855. else if (guess == 'w' || guess == 'W')
  856. {
  857. letterSample[6][4] = 0;
  858. for (int x = 0; x < 8; x++)
  859. {
  860. for (int y = 0; y < 18; y++)
  861. {
  862. cout << letterSample [x][y];
  863. }
  864. cout << endl;
  865. }
  866. cout << " " << endl;
  867. }
  868. else if (guess == 'x' || guess == 'X')
  869. {
  870. letterSample[6][6] = 0;
  871. for (int x = 0; x < 8; x++)
  872. {
  873. for (int y = 0; y < 18; y++)
  874. {
  875. cout << letterSample [x][y];
  876. }
  877. cout << endl;
  878. }
  879. cout << " " << endl;
  880. }
  881. else if (guess == 'y' || guess == 'Y')
  882. {
  883. letterSample[6][8] = 0;
  884. for (int x = 0; x < 8; x++)
  885. {
  886. for (int y = 0; y < 18; y++)
  887. {
  888. cout << letterSample [x][y];
  889. }
  890. cout << endl;
  891. }
  892. cout << " " << endl;
  893. }
  894. else if (guess == 'z' || guess == 'Z')
  895. {
  896. letterSample[6][10] = 0;
  897. for (int x = 0; x < 8; x++)
  898. {
  899. for (int y = 0; y < 18; y++)
  900. {
  901. cout << letterSample [x][y];
  902. }
  903. cout << endl;
  904. }
  905. cout << " " << endl;
  906. }
  907. else if (guess == '0')
  908. {
  909. token--;
  910. if (token == 1)
  911. {
  912. for (int x = 0; x < 8; x++)
  913. {
  914. for (int y = 0; y < 18; y++)
  915. {
  916. cout << letterSample [x][y];
  917. }
  918. cout << endl;
  919. }
  920. for (int x = 0; x < 1; x++)
  921. {
  922. for (int y = 0; y < 13; y++)
  923. {
  924. cout << lansingWord [x][y];
  925. }
  926. cout << endl;
  927. }
  928. cout << " " << endl;
  929. cout << "Hint 1: This city is the capital of a US state." << endl;
  930. }
  931. else if (token == 0)
  932. {
  933. for (int x = 0; x < 8; x++)
  934. {
  935. for (int y = 0; y < 18; y++)
  936. {
  937. cout << letterSample [x][y];
  938. }
  939. cout << endl;
  940. }
  941. for (int x = 0; x < 1; x++)
  942. {
  943. for (int y = 0; y < 13; y++)
  944. {
  945. cout << lansingWord [x][y];
  946. }
  947. cout << endl;
  948. }
  949. cout << " " << endl;
  950. cout << "Hint 2: The capital is in US state that is in the midwest." << endl;
  951. }
  952. else
  953. {
  954. cout << "You have no more hints/token left. Sorry!" << endl;
  955. for (int x = 0; x < 8; x++)
  956. {
  957. for (int y = 0; y < 18; y++)
  958. {
  959. cout << letterSample [x][y];
  960. }
  961. cout << endl;
  962. }
  963. for (int x = 0; x < 1; x++)
  964. {
  965. for (int y = 0; y < 13; y++)
  966. {
  967. cout << lansingWord [x][y];
  968. }
  969. cout << endl;
  970. }
  971. }
  972. }
  973. if (guess == 'e' || guess == 'E' || guess == 'B' || guess == 'b' || guess == 'c' || guess == 'C' || guess == 'D' || guess == 'd' || guess == 'f' || guess == 'F' || guess == 'H' || guess == 'h' || guess == 'j' || guess == 'J' || guess == 'K' || guess == 'k' || guess == 'M' || guess == 'm' || guess == 'O' || guess == 'o' || guess == 'p' || guess == 'P' || guess == 'Q' || guess == 'q' || guess == 'r' || guess == 'R' || guess == 't' || guess == 'T' || guess == 'u' || guess == 'U' || guess == 'V' || guess == 'v' || guess == 'W' || guess == 'w' || guess == 'X' || guess == 'x' || guess == 'Y' || guess == 'y' || guess == 'Z' || guess == 'z')
  974. {
  975. cout << "---------------------------------------------------------------" << endl;
  976. for (int x = 0; x < 8; x++)
  977. {
  978. for (int y = 0; y < 18; y++)
  979. {
  980. cout << letterSample [x][y];
  981. }
  982. cout << endl;
  983. }
  984. for (int x = 0; x < 1; x++)
  985. {
  986. for (int y = 0; y < 13; y++)
  987. {
  988. cout << lansingWord [x][y];
  989. }
  990. cout << endl;
  991. }
  992. wrongguess++;
  993. if (wrongguess == 1)
  994. {
  995. cout << " _________ \n";
  996. cout << "| | \n";
  997. cout << "| 0 \n";
  998. cout << "| \n";
  999. cout << "| \n";
  1000. cout << "| \n";
  1001. cout << "| \n";
  1002. cout << " " << endl;
  1003. cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
  1004. }
  1005. else if (wrongguess == 2)
  1006. {
  1007. cout << " _________ \n";
  1008. cout << "| | \n";
  1009. cout << "| 0 \n";
  1010. cout << "| | \n";
  1011. cout << "| \n";
  1012. cout << "| \n";
  1013. cout << "| \n";
  1014. cout << " " << endl;
  1015. cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
  1016. }
  1017. else if (wrongguess == 3)
  1018. {
  1019. cout << " _________ \n";
  1020. cout << "| | \n";
  1021. cout << "| 0 \n";
  1022. cout << "| /| \n";
  1023. cout << "| \n";
  1024. cout << "| \n";
  1025. cout << "| \n";
  1026. cout << " " << endl;
  1027. cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
  1028. }
  1029. else if (wrongguess == 4)
  1030. {
  1031. cout << " _________ \n";
  1032. cout << "| | \n";
  1033. cout << "| 0 \n";
  1034. cout << "| /|\\ \n";
  1035. cout << "| \n";
  1036. cout << "| \n";
  1037. cout << "| \n";
  1038. cout << " " << endl;
  1039. cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
  1040. else if (wrongguess == 5)
  1041. {
  1042. cout << " _________ \n";
  1043. cout << "| | \n";
  1044. cout << "| 0 \n";
  1045. cout << "| /|\\ \n";
  1046. cout << "| / \n";
  1047. cout << "| \n";
  1048. cout << "| \n";
  1049. cout << " " << endl;
  1050. cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
  1051. }
  1052. else if (wrongguess == 6)
  1053. {
  1054. cout << " _________ \n";
  1055. cout << "| | \n";
  1056. cout << "| 0 \n";
  1057. cout << "| /|\\ \n";
  1058. cout << "| / \\ \n";
  1059. cout << "| \n";
  1060. cout << "| \n";
  1061. system("COLOR 0C");
  1062. printf;
  1063. cout << " " << endl;
  1064. cout << " +=====================================================================+ " << endl;
  1065. cout << " | | " << endl;
  1066. cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
  1067. cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
  1068. cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
  1069. cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
  1070. cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
  1071. cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
  1072. cout << " | | " << endl;
  1073. cout << " +=====================================================================+ " << endl;
  1074. cout << " " << endl;
  1075. cout << "You have lost the game, good luck next time!" << endl;
  1076. cout << " " << endl;
  1077. cout << "The correct word was: LANSING." << endl;
  1078. break;
  1079. }
  1080. else
  1081. {
  1082. cout << " " << endl;
  1083. }
  1084. }
  1085. if (lansingWord[0][0] == 'L' && lansingWord[0][2] == 'A' && lansingWord[0][4] == 'N' && lansingWord[0][6] == 'S' && lansingWord[0][8] == 'I' && lansingWord[0][10] == 'N' && lansingWord[0][12] == 'G')
  1086. {
  1087. system("COLOR 0A");
  1088. printf;
  1089. cout << " " << endl;
  1090. cout << " +============================================================+ " << endl;
  1091. cout << " | | " << endl;
  1092. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  1093. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  1094. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  1095. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  1096. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  1097. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  1098. cout << " | | " << endl;
  1099. cout << " +============================================================+ " << endl;
  1100. cout << " " << endl;
  1101. cout << "Congratulations! You have won!" << endl;
  1102. cout << " " << endl;
  1103. break;
  1104. }
  1105. }
  1106. }
  1107. else if (randCity == 2) //denver
  1108. {
  1109. int category;
  1110. int wrongguess = 0;
  1111. int token = 2;
  1112. char letterSample[8][18] =
  1113. {
  1114. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  1115. {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
  1116. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  1117. {65,0,66,0,67,0,68,0,69,0,70,0,71},
  1118. {72,0,73,0,74,0,75,0,76,0,77,0,78},
  1119. {79,0,80,0,81,0,82,0,83,0,84,0,85},
  1120. {0,0,86,0,87,0,88,0,89,0,90,0,0},
  1121. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  1122. };
  1123. char denverWord[1][11] = {95,0,95,0,95,0,95,0,95,0,95};
  1124. int z;
  1125. cout << "---------------------------------------------------------------" << endl;
  1126. for (int x = 0; x < 8; x++)
  1127. {
  1128. for (int y = 0; y < 18; y++)
  1129. {
  1130. cout << letterSample [x][y];
  1131. }
  1132. cout << endl;
  1133. }
  1134. for (int x = 0; x < 1; x++)
  1135. {
  1136. for (int y = 0; y < 11; y++)
  1137. {
  1138. cout << denverWord [x][y];
  1139. }
  1140. cout << endl;
  1141. }
  1142. cout << " " << endl;
  1143. cout << " _________ \n";
  1144. cout << "| | \n";
  1145. cout << "| \n";
  1146. cout << "| \n";
  1147. cout << "| \n";
  1148. cout << "| \n";
  1149. cout << "| \n";
  1150. cout << " " << endl;
  1151. for (z = 0; z < 1000; z++)
  1152. {
  1153. char guess;
  1154. cout << " " << endl;
  1155. if (token >= 0)
  1156. {
  1157. cout << "-- Token(s) left: " << token << " --" << endl;
  1158. }
  1159. cout << " " << endl;
  1160. cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
  1161. cin >> guess;
  1162. cout << " " << endl;
  1163. cout << "---------------------------------------------------------------" << endl;
  1164. if (guess == 'a' || guess == 'A')
  1165. {
  1166. letterSample[3][0] = 0;
  1167. for (int x = 0; x < 8; x++)
  1168. {
  1169. for (int y = 0; y < 18; y++)
  1170. {
  1171. cout << letterSample [x][y];
  1172. }
  1173. cout << endl;
  1174. }
  1175. cout << " " << endl;
  1176. }
  1177. else if (guess == 'b' || guess == 'B')
  1178. {
  1179. letterSample[3][2] = 0;
  1180. for (int x = 0; x < 8; x++)
  1181. {
  1182. for (int y = 0; y < 18; y++)
  1183. {
  1184. cout << letterSample [x][y];
  1185. }
  1186. cout << endl;
  1187. }
  1188. cout << " " << endl;
  1189. }
  1190. else if (guess == 'c' || guess == 'C')
  1191. {
  1192. letterSample[3][4] = 0;
  1193. for (int x = 0; x < 8; x++)
  1194. {
  1195. for (int y = 0; y < 18; y++)
  1196. {
  1197. cout << letterSample [x][y];
  1198. }
  1199. cout << endl;
  1200. }
  1201. cout << " " << endl;
  1202. }
  1203. else if (guess == 'd' || guess == 'D')
  1204. {
  1205. denverWord[0][0] = 'D';
  1206. cout << " " << endl;
  1207. for (int x = 0; x < 1; x++)
  1208. {
  1209. for (int y = 0; y < 11; y++)
  1210. {
  1211. cout << denverWord [x][y];
  1212. }
  1213. cout << endl;
  1214. }
  1215. letterSample[3][6] = 0;
  1216. for (int x = 0; x < 8; x++)
  1217. {
  1218. for (int y = 0; y < 18; y++)
  1219. {
  1220. cout << letterSample [x][y];
  1221. }
  1222. cout << endl;
  1223. }
  1224. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  1225. }
  1226. else if (guess == 'e' || guess == 'E')
  1227. {
  1228. denverWord[0][2] = 'E';
  1229. denverWord[0][8] = 'E';
  1230. cout << " " << endl;
  1231. for (int x = 0; x < 1; x++)
  1232. {
  1233. for (int y = 0; y < 11; y++)
  1234. {
  1235. cout << denverWord [x][y];
  1236. }
  1237. cout << endl;
  1238. }
  1239. letterSample[3][8] = 0;
  1240. for (int x = 0; x < 8; x++)
  1241. {
  1242. for (int y = 0; y < 18; y++)
  1243. {
  1244. cout << letterSample [x][y];
  1245. }
  1246. cout << endl;
  1247. }
  1248. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  1249. }
  1250. else if (guess == 'f' || guess == 'F')
  1251. {
  1252. letterSample[3][10] = 0;
  1253. for (int x = 0; x < 8; x++)
  1254. {
  1255. for (int y = 0; y < 18; y++)
  1256. {
  1257. cout << letterSample [x][y];
  1258. }
  1259. cout << endl;
  1260. }
  1261. cout << " " << endl;
  1262. }
  1263. else if (guess == 'g' || guess == 'G')
  1264. {
  1265. letterSample[3][12] = 0;
  1266. for (int x = 0; x < 8; x++)
  1267. {
  1268. for (int y = 0; y < 18; y++)
  1269. {
  1270. cout << letterSample [x][y];
  1271. }
  1272. cout << endl;
  1273. }
  1274. cout << " " << endl;
  1275. }
  1276. else if (guess == 'h' || guess == 'H')
  1277. {
  1278. letterSample[4][0] = 0;
  1279. for (int x = 0; x < 8; x++)
  1280. {
  1281. for (int y = 0; y < 18; y++)
  1282. {
  1283. cout << letterSample [x][y];
  1284. }
  1285. cout << endl;
  1286. }
  1287. cout << " " << endl;
  1288. }
  1289. else if (guess == 'i' || guess == 'I')
  1290. {
  1291. letterSample[4][2] = 0;
  1292. for (int x = 0; x < 8; x++)
  1293. {
  1294. for (int y = 0; y < 18; y++)
  1295. {
  1296. cout << letterSample [x][y];
  1297. }
  1298. cout << endl;
  1299. }
  1300. cout << " " << endl;
  1301. }
  1302. else if (guess == 'j' || guess == 'J')
  1303. {
  1304. letterSample[4][4] = 0;
  1305. for (int x = 0; x < 8; x++)
  1306. {
  1307. for (int y = 0; y < 18; y++)
  1308. {
  1309. cout << letterSample [x][y];
  1310. }
  1311. cout << endl;
  1312. }
  1313. cout << " " << endl;
  1314. }
  1315. else if (guess == 'k' || guess == 'K')
  1316. {
  1317. letterSample[4][6] = 0;
  1318. for (int x = 0; x < 8; x++)
  1319. {
  1320. for (int y = 0; y < 18; y++)
  1321. {
  1322. cout << letterSample [x][y];
  1323. }
  1324. cout << endl;
  1325. }
  1326. cout << " " << endl;
  1327. }
  1328. else if (guess == 'l' || guess == 'L')
  1329. {
  1330. letterSample[4][8] = 0;
  1331. for (int x = 0; x < 8; x++)
  1332. {
  1333. for (int y = 0; y < 18; y++)
  1334. {
  1335. cout << letterSample [x][y];
  1336. }
  1337. cout << endl;
  1338. }
  1339. cout << " " << endl;
  1340. }
  1341. else if (guess == 'm' || guess == 'M')
  1342. {
  1343. letterSample[4][10] = 0;
  1344. for (int x = 0; x < 8; x++)
  1345. {
  1346. for (int y = 0; y < 18; y++)
  1347. {
  1348. cout << letterSample [x][y];
  1349. }
  1350. cout << endl;
  1351. }
  1352. cout << " " << endl;
  1353. }
  1354. else if (guess == 'n' || guess == 'N')
  1355. {
  1356. denverWord[0][4] = 'N';
  1357. cout << " " << endl;
  1358. for (int x = 0; x < 1; x++)
  1359. {
  1360. for (int y = 0; y < 11; y++)
  1361. {
  1362. cout << denverWord [x][y];
  1363. }
  1364. cout << endl;
  1365. }
  1366. letterSample[4][12] = 0;
  1367. for (int x = 0; x < 8; x++)
  1368. {
  1369. for (int y = 0; y < 18; y++)
  1370. {
  1371. cout << letterSample [x][y];
  1372. }
  1373. cout << endl;
  1374. }
  1375. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  1376. }
  1377. else if (guess == 'o' || guess == 'O')
  1378. {
  1379. letterSample[5][0] = 0;
  1380. for (int x = 0; x < 8; x++)
  1381. {
  1382. for (int y = 0; y < 18; y++)
  1383. {
  1384. cout << letterSample [x][y];
  1385. }
  1386. cout << endl;
  1387. }
  1388. cout << " " << endl;
  1389. }
  1390. else if (guess == 'p' || guess == 'P')
  1391. {
  1392. letterSample[5][2] = 0;
  1393. for (int x = 0; x < 8; x++)
  1394. {
  1395. for (int y = 0; y < 18; y++)
  1396. {
  1397. cout << letterSample [x][y];
  1398. }
  1399. cout << endl;
  1400. }
  1401. cout << " " << endl;
  1402. }
  1403. else if (guess == 'q' || guess == 'Q')
  1404. {
  1405. letterSample[5][4] = 0;
  1406. for (int x = 0; x < 8; x++)
  1407. {
  1408. for (int y = 0; y < 18; y++)
  1409. {
  1410. cout << letterSample [x][y];
  1411. }
  1412. cout << endl;
  1413. }
  1414. cout << " " << endl;
  1415. }
  1416. else if (guess == 'r' || guess == 'R')
  1417. {
  1418. denverWord[0][10] = 'R';
  1419. cout << " " << endl;
  1420. for (int x = 0; x < 1; x++)
  1421. {
  1422. for (int y = 0; y < 11; y++)
  1423. {
  1424. cout << denverWord [x][y];
  1425. }
  1426. cout << endl;
  1427. }
  1428. letterSample[5][6] = 0;
  1429. for (int x = 0; x < 8; x++)
  1430. {
  1431. for (int y = 0; y < 18; y++)
  1432. {
  1433. cout << letterSample [x][y];
  1434. }
  1435. cout << endl;
  1436. }
  1437. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  1438. }
  1439. else if (guess == 's' || guess == 'S')
  1440. {
  1441. letterSample[5][8] = 0;
  1442. for (int x = 0; x < 8; x++)
  1443. {
  1444. for (int y = 0; y < 18; y++)
  1445. {
  1446. cout << letterSample [x][y];
  1447. }
  1448. cout << endl;
  1449. }
  1450. cout << " " << endl;
  1451. }
  1452. else if (guess == 't' || guess == 'T')
  1453. {
  1454. letterSample[5][10] = 0;
  1455. for (int x = 0; x < 8; x++)
  1456. {
  1457. for (int y = 0; y < 18; y++)
  1458. {
  1459. cout << letterSample [x][y];
  1460. }
  1461. cout << endl;
  1462. }
  1463. cout << " " << endl;
  1464. }
  1465. else if (guess == 'u' || guess == 'U')
  1466. {
  1467. letterSample[5][12] = 0;
  1468. for (int x = 0; x < 8; x++)
  1469. {
  1470. for (int y = 0; y < 18; y++)
  1471. {
  1472. cout << letterSample [x][y];
  1473. }
  1474. cout << endl;
  1475. }
  1476. cout << " " << endl;
  1477. }
  1478. else if (guess == 'v' || guess == 'V')
  1479. {
  1480. denverWord[0][6] = 'V';
  1481. cout << " " << endl;
  1482. for (int x = 0; x < 1; x++)
  1483. {
  1484. for (int y = 0; y < 11; y++)
  1485. {
  1486. cout << denverWord [x][y];
  1487. }
  1488. cout << endl;
  1489. }
  1490. letterSample[6][2] = 0;
  1491. for (int x = 0; x < 8; x++)
  1492. {
  1493. for (int y = 0; y < 18; y++)
  1494. {
  1495. cout << letterSample [x][y];
  1496. }
  1497. cout << endl;
  1498. }
  1499. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  1500. }
  1501. else if (guess == 'w' || guess == 'W')
  1502. {
  1503. letterSample[6][4] = 0;
  1504. for (int x = 0; x < 8; x++)
  1505. {
  1506. for (int y = 0; y < 18; y++)
  1507. {
  1508. cout << letterSample [x][y];
  1509. }
  1510. cout << endl;
  1511. }
  1512. cout << " " << endl;
  1513. }
  1514. else if (guess == 'x' || guess == 'X')
  1515. {
  1516. letterSample[6][6] = 0;
  1517. for (int x = 0; x < 8; x++)
  1518. {
  1519. for (int y = 0; y < 18; y++)
  1520. {
  1521. cout << letterSample [x][y];
  1522. }
  1523. cout << endl;
  1524. }
  1525. cout << " " << endl;
  1526. }
  1527. else if (guess == 'y' || guess == 'Y')
  1528. {
  1529. letterSample[6][8] = 0;
  1530. for (int x = 0; x < 8; x++)
  1531. {
  1532. for (int y = 0; y < 18; y++)
  1533. {
  1534. cout << letterSample [x][y];
  1535. }
  1536. cout << endl;
  1537. }
  1538. cout << " " << endl;
  1539. }
  1540. else if (guess == 'z' || guess == 'Z')
  1541. {
  1542. letterSample[6][10] = 0;
  1543. for (int x = 0; x < 8; x++)
  1544. {
  1545. for (int y = 0; y < 18; y++)
  1546. {
  1547. cout << letterSample [x][y];
  1548. }
  1549. cout << endl;
  1550. }
  1551. cout << " " << endl;
  1552. }
  1553. else if (guess == '0')
  1554. {
  1555. token--;
  1556. if (token == 1)
  1557. {
  1558. for (int x = 0; x < 8; x++)
  1559. {
  1560. for (int y = 0; y < 18; y++)
  1561. {
  1562. cout << letterSample [x][y];
  1563. }
  1564. cout << endl;
  1565. }
  1566. for (int x = 0; x < 1; x++)
  1567. {
  1568. for (int y = 0; y < 11; y++)
  1569. {
  1570. cout << denverWord[x][y];
  1571. }
  1572. cout << endl;
  1573. }
  1574. cout << " " << endl;
  1575. cout << "Hint 1: This city is the capital of a US state." << endl;
  1576. }
  1577. else if (token == 0)
  1578. {
  1579. for (int x = 0; x < 8; x++)
  1580. {
  1581. for (int y = 0; y < 18; y++)
  1582. {
  1583. cout << letterSample [x][y];
  1584. }
  1585. cout << endl;
  1586. }
  1587. for (int x = 0; x < 1; x++)
  1588. {
  1589. for (int y = 0; y < 11; y++)
  1590. {
  1591. cout << denverWord [x][y];
  1592. }
  1593. cout << endl;
  1594. }
  1595. cout << " " << endl;
  1596. cout << "Hint 2: This city includes many ski resorts for the winter time." << endl;
  1597. }
  1598. else
  1599. {
  1600. cout << "You have no more hints/token left. Sorry!" << endl;
  1601. for (int x = 0; x < 8; x++)
  1602. {
  1603. for (int y = 0; y < 18; y++)
  1604. {
  1605. cout << letterSample [x][y];
  1606. }
  1607. cout << endl;
  1608. }
  1609. for (int x = 0; x < 1; x++)
  1610. {
  1611. for (int y = 0; y < 11; y++)
  1612. {
  1613. cout << denverWord [x][y];
  1614. }
  1615. cout << endl;
  1616. }
  1617. }
  1618. }
  1619. if (guess == 'a' || guess == 'A' || guess == 'B' || guess == 'b' || guess == 'c' || guess == 'C' || guess == 'G' || guess == 'g' || guess == 'f' || guess == 'F' || guess == 'H' || guess == 'h' || guess == 'i' || guess == 'I' || guess == 'j' || guess == 'J' || guess == 'K' || guess == 'k' || guess == 'L' || guess == 'l' || guess == 'M' || guess == 'm' || guess == 'O' || guess == 'o' || guess == 'p' || guess == 'P' || guess == 'Q' || guess == 'q' || guess == 't' || guess == 'T' || guess == 'u' || guess == 'U' || guess == 's' || guess == 'S' || guess == 'W' || guess == 'w' || guess == 'X' || guess == 'x' || guess == 'Y' || guess == 'y' || guess == 'Z' || guess == 'z')
  1620. {
  1621. cout << "---------------------------------------------------------------" << endl;
  1622. for (int x = 0; x < 8; x++)
  1623. {
  1624. for (int y = 0; y < 18; y++)
  1625. {
  1626. cout << letterSample [x][y];
  1627. }
  1628. cout << endl;
  1629. }
  1630. for (int x = 0; x < 1; x++)
  1631. {
  1632. for (int y = 0; y < 11; y++)
  1633. {
  1634. cout << denverWord [x][y];
  1635. }
  1636. cout << endl;
  1637. }
  1638. wrongguess++;
  1639. if (wrongguess == 1)
  1640. {
  1641. cout << " _________ \n";
  1642. cout << "| | \n";
  1643. cout << "| 0 \n";
  1644. cout << "| \n";
  1645. cout << "| \n";
  1646. cout << "| \n";
  1647. cout << "| \n";
  1648. cout << " " << endl;
  1649. cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
  1650. }
  1651. else if (wrongguess == 2)
  1652. {
  1653. cout << " _________ \n";
  1654. cout << "| | \n";
  1655. cout << "| 0 \n";
  1656. cout << "| | \n";
  1657. cout << "| \n";
  1658. cout << "| \n";
  1659. cout << "| \n";
  1660. cout << " " << endl;
  1661. cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
  1662. }
  1663. else if (wrongguess == 3)
  1664. {
  1665. cout << " _________ \n";
  1666. cout << "| | \n";
  1667. cout << "| 0 \n";
  1668. cout << "| /| \n";
  1669. cout << "| \n";
  1670. cout << "| \n";
  1671. cout << "| \n";
  1672. cout << " " << endl;
  1673. cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
  1674. }
  1675. else if (wrongguess == 4)
  1676. {
  1677. cout << " _________ \n";
  1678. cout << "| | \n";
  1679. cout << "| 0 \n";
  1680. cout << "| /|\\ \n";
  1681. cout << "| \n";
  1682. cout << "| \n";
  1683. cout << "| \n";
  1684. cout << " " << endl;
  1685. cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
  1686. else if (wrongguess == 5)
  1687. {
  1688. cout << " _________ \n";
  1689. cout << "| | \n";
  1690. cout << "| 0 \n";
  1691. cout << "| /|\\ \n";
  1692. cout << "| / \n";
  1693. cout << "| \n";
  1694. cout << "| \n";
  1695. cout << " " << endl;
  1696. cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
  1697. }
  1698. else if (wrongguess == 6)
  1699. {
  1700. cout << " _________ \n";
  1701. cout << "| | \n";
  1702. cout << "| 0 \n";
  1703. cout << "| /|\\ \n";
  1704. cout << "| / \\ \n";
  1705. cout << "| \n";
  1706. cout << "| \n";
  1707. system("COLOR 0C");
  1708. printf;
  1709. cout << " " << endl;
  1710. cout << " +=====================================================================+ " << endl;
  1711. cout << " | | " << endl;
  1712. cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
  1713. cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
  1714. cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
  1715. cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
  1716. cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
  1717. cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
  1718. cout << " | | " << endl;
  1719. cout << " +=====================================================================+ " << endl;
  1720. cout << " " << endl;
  1721. cout << "You have lost the game, good luck next time!" << endl;
  1722. cout << " " << endl;
  1723. cout << "The correct word was: DENVER." << endl;
  1724. break;
  1725. }
  1726. else
  1727. {
  1728. cout << " " << endl;
  1729. }
  1730. }
  1731. if (denverWord[0][0] == 'D' && denverWord[0][2] == 'E' && denverWord[0][4] == 'N' && denverWord[0][6] == 'V' && denverWord[0][8] == 'E' && denverWord[0][10] == 'R')
  1732. {
  1733. system("COLOR 0A");
  1734. printf;
  1735. cout << " " << endl;
  1736. cout << " +============================================================+ " << endl;
  1737. cout << " | | " << endl;
  1738. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  1739. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  1740. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  1741. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  1742. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  1743. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  1744. cout << " | | " << endl;
  1745. cout << " +============================================================+ " << endl;
  1746. cout << " " << endl;
  1747. cout << "Congratulations! You have won!" << endl;
  1748. cout << " " << endl;
  1749. break;
  1750. }
  1751. }
  1752. }
  1753. else if (randCity == 3) //atlanta
  1754. {
  1755. int category;
  1756. int wrongguess = 0;
  1757. int token = 2;
  1758. char letterSample[8][18] =
  1759. {
  1760. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  1761. {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
  1762. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  1763. {65,0,66,0,67,0,68,0,69,0,70,0,71},
  1764. {72,0,73,0,74,0,75,0,76,0,77,0,78},
  1765. {79,0,80,0,81,0,82,0,83,0,84,0,85},
  1766. {0,0,86,0,87,0,88,0,89,0,90,0,0},
  1767. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  1768. };
  1769. char atlantaWord[1][13] = {95,0,95,0,95,0,95,0,95,0,95,0,95};
  1770. int z;
  1771. cout << "---------------------------------------------------------------" << endl;
  1772. for (int x = 0; x < 8; x++)
  1773. {
  1774. for (int y = 0; y < 18; y++)
  1775. {
  1776. cout << letterSample [x][y];
  1777. }
  1778. cout << endl;
  1779. }
  1780. for (int x = 0; x < 1; x++)
  1781. {
  1782. for (int y = 0; y < 13; y++)
  1783. {
  1784. cout << atlantaWord [x][y];
  1785. }
  1786. cout << endl;
  1787. }
  1788. cout << " " << endl;
  1789. cout << " _________ \n";
  1790. cout << "| | \n";
  1791. cout << "| \n";
  1792. cout << "| \n";
  1793. cout << "| \n";
  1794. cout << "| \n";
  1795. cout << "| \n";
  1796. cout << " " << endl;
  1797. for (z = 0; z < 1000; z++)
  1798. {
  1799. char guess;
  1800. cout << " " << endl;
  1801. if (token >= 0)
  1802. {
  1803. cout << "-- Token(s) left: " << token << " --" << endl;
  1804. }
  1805. cout << " " << endl;
  1806. cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
  1807. cin >> guess;
  1808. cout << " " << endl;
  1809. cout << "---------------------------------------------------------------" << endl;
  1810. if (guess == 'a' || guess == 'A')
  1811. {
  1812. atlantaWord[0][0] = 'A';
  1813. atlantaWord[0][6] = 'A';
  1814. atlantaWord[0][12] = 'A';
  1815. cout << " " << endl;
  1816. for (int x = 0; x < 1; x++)
  1817. {
  1818. for (int y = 0; y < 13; y++)
  1819. {
  1820. cout << atlantaWord [x][y];
  1821. }
  1822. cout << endl;
  1823. }
  1824. letterSample[3][0] = 0;
  1825. for (int x = 0; x < 8; x++)
  1826. {
  1827. for (int y = 0; y < 18; y++)
  1828. {
  1829. cout << letterSample [x][y];
  1830. }
  1831. cout << endl;
  1832. }
  1833. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  1834. }
  1835. else if (guess == 'b' || guess == 'B')
  1836. {
  1837. letterSample[3][2] = 0;
  1838. for (int x = 0; x < 8; x++)
  1839. {
  1840. for (int y = 0; y < 18; y++)
  1841. {
  1842. cout << letterSample [x][y];
  1843. }
  1844. cout << endl;
  1845. }
  1846. cout << " " << endl;
  1847. }
  1848. else if (guess == 'c' || guess == 'C')
  1849. {
  1850. letterSample[3][4] = 0;
  1851. for (int x = 0; x < 8; x++)
  1852. {
  1853. for (int y = 0; y < 18; y++)
  1854. {
  1855. cout << letterSample [x][y];
  1856. }
  1857. cout << endl;
  1858. }
  1859. cout << " " << endl;
  1860. }
  1861. else if (guess == 'd' || guess == 'D')
  1862. {
  1863. letterSample[3][6] = 0;
  1864. for (int x = 0; x < 8; x++)
  1865. {
  1866. for (int y = 0; y < 18; y++)
  1867. {
  1868. cout << letterSample [x][y];
  1869. }
  1870. cout << endl;
  1871. }
  1872. cout << " " << endl;
  1873. }
  1874. else if (guess == 'e' || guess == 'E')
  1875. {
  1876. letterSample[3][8] = 0;
  1877. for (int x = 0; x < 8; x++)
  1878. {
  1879. for (int y = 0; y < 18; y++)
  1880. {
  1881. cout << letterSample [x][y];
  1882. }
  1883. cout << endl;
  1884. }
  1885. cout << " " << endl;
  1886. }
  1887. else if (guess == 'f' || guess == 'F')
  1888. {
  1889. letterSample[3][10] = 0;
  1890. for (int x = 0; x < 8; x++)
  1891. {
  1892. for (int y = 0; y < 18; y++)
  1893. {
  1894. cout << letterSample [x][y];
  1895. }
  1896. cout << endl;
  1897. }
  1898. cout << " " << endl;
  1899. }
  1900. else if (guess == 'g' || guess == 'G')
  1901. {
  1902. letterSample[3][12] = 0;
  1903. for (int x = 0; x < 8; x++)
  1904. {
  1905. for (int y = 0; y < 18; y++)
  1906. {
  1907. cout << letterSample [x][y];
  1908. }
  1909. cout << endl;
  1910. }
  1911. cout << " " << endl;
  1912. }
  1913. else if (guess == 'h' || guess == 'H')
  1914. {
  1915. letterSample[4][0] = 0;
  1916. for (int x = 0; x < 8; x++)
  1917. {
  1918. for (int y = 0; y < 18; y++)
  1919. {
  1920. cout << letterSample [x][y];
  1921. }
  1922. cout << endl;
  1923. }
  1924. cout << " " << endl;
  1925. }
  1926. else if (guess == 'i' || guess == 'I')
  1927. {
  1928. letterSample[4][2] = 0;
  1929. for (int x = 0; x < 8; x++)
  1930. {
  1931. for (int y = 0; y < 18; y++)
  1932. {
  1933. cout << letterSample [x][y];
  1934. }
  1935. cout << endl;
  1936. }
  1937. cout << " " << endl;
  1938. }
  1939. else if (guess == 'j' || guess == 'J')
  1940. {
  1941. letterSample[4][4] = 0;
  1942. for (int x = 0; x < 8; x++)
  1943. {
  1944. for (int y = 0; y < 18; y++)
  1945. {
  1946. cout << letterSample [x][y];
  1947. }
  1948. cout << endl;
  1949. }
  1950. cout << " " << endl;
  1951. }
  1952. else if (guess == 'k' || guess == 'K')
  1953. {
  1954. letterSample[4][6] = 0;
  1955. for (int x = 0; x < 8; x++)
  1956. {
  1957. for (int y = 0; y < 18; y++)
  1958. {
  1959. cout << letterSample [x][y];
  1960. }
  1961. cout << endl;
  1962. }
  1963. cout << " " << endl;
  1964. }
  1965. else if (guess == 'l' || guess == 'L')
  1966. {
  1967. atlantaWord[0][4] = 'L';
  1968. cout << " " << endl;
  1969. for (int x = 0; x < 1; x++)
  1970. {
  1971. for (int y = 0; y < 13; y++)
  1972. {
  1973. cout << atlantaWord [x][y];
  1974. }
  1975. cout << endl;
  1976. }
  1977. letterSample[4][8] = 0;
  1978. for (int x = 0; x < 8; x++)
  1979. {
  1980. for (int y = 0; y < 18; y++)
  1981. {
  1982. cout << letterSample [x][y];
  1983. }
  1984. cout << endl;
  1985. }
  1986. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  1987. }
  1988. else if (guess == 'm' || guess == 'M')
  1989. {
  1990. letterSample[4][10] = 0;
  1991. for (int x = 0; x < 8; x++)
  1992. {
  1993. for (int y = 0; y < 18; y++)
  1994. {
  1995. cout << letterSample [x][y];
  1996. }
  1997. cout << endl;
  1998. }
  1999. cout << " " << endl;
  2000. }
  2001. else if (guess == 'n' || guess == 'N')
  2002. {
  2003. atlantaWord[0][8] = 'N';
  2004. cout << " " << endl;
  2005. for (int x = 0; x < 1; x++)
  2006. {
  2007. for (int y = 0; y < 13; y++)
  2008. {
  2009. cout << atlantaWord [x][y];
  2010. }
  2011. cout << endl;
  2012. }
  2013. letterSample[4][12] = 0;
  2014. for (int x = 0; x < 8; x++)
  2015. {
  2016. for (int y = 0; y < 18; y++)
  2017. {
  2018. cout << letterSample [x][y];
  2019. }
  2020. cout << endl;
  2021. }
  2022. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  2023. }
  2024. else if (guess == 'o' || guess == 'O')
  2025. {
  2026. letterSample[5][0] = 0;
  2027. for (int x = 0; x < 8; x++)
  2028. {
  2029. for (int y = 0; y < 18; y++)
  2030. {
  2031. cout << letterSample [x][y];
  2032. }
  2033. cout << endl;
  2034. }
  2035. cout << " " << endl;
  2036. }
  2037. else if (guess == 'p' || guess == 'P')
  2038. {
  2039. letterSample[5][2] = 0;
  2040. for (int x = 0; x < 8; x++)
  2041. {
  2042. for (int y = 0; y < 18; y++)
  2043. {
  2044. cout << letterSample [x][y];
  2045. }
  2046. cout << endl;
  2047. }
  2048. cout << " " << endl;
  2049. }
  2050. else if (guess == 'q' || guess == 'Q')
  2051. {
  2052. letterSample[5][4] = 0;
  2053. for (int x = 0; x < 8; x++)
  2054. {
  2055. for (int y = 0; y < 18; y++)
  2056. {
  2057. cout << letterSample [x][y];
  2058. }
  2059. cout << endl;
  2060. }
  2061. cout << " " << endl;
  2062. }
  2063. else if (guess == 'r' || guess == 'R')
  2064. {
  2065. letterSample[5][6] = 0;
  2066. for (int x = 0; x < 8; x++)
  2067. {
  2068. for (int y = 0; y < 18; y++)
  2069. {
  2070. cout << letterSample [x][y];
  2071. }
  2072. cout << endl;
  2073. }
  2074. cout << " " << endl;
  2075. }
  2076. else if (guess == 's' || guess == 'S')
  2077. {
  2078. letterSample[5][8] = 0;
  2079. for (int x = 0; x < 8; x++)
  2080. {
  2081. for (int y = 0; y < 18; y++)
  2082. {
  2083. cout << letterSample [x][y];
  2084. }
  2085. cout << endl;
  2086. }
  2087. cout << " " << endl;
  2088. }
  2089. else if (guess == 't' || guess == 'T')
  2090. {
  2091. atlantaWord[0][2] = 'T';
  2092. atlantaWord[0][10] = 'T';
  2093. cout << " " << endl;
  2094. for (int x = 0; x < 1; x++)
  2095. {
  2096. for (int y = 0; y < 13; y++)
  2097. {
  2098. cout << atlantaWord [x][y];
  2099. }
  2100. cout << endl;
  2101. }
  2102. letterSample[5][10] = 0;
  2103. for (int x = 0; x < 8; x++)
  2104. {
  2105. for (int y = 0; y < 18; y++)
  2106. {
  2107. cout << letterSample [x][y];
  2108. }
  2109. cout << endl;
  2110. }
  2111. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  2112. }
  2113. else if (guess == 'u' || guess == 'U')
  2114. {
  2115. letterSample[5][12] = 0;
  2116. for (int x = 0; x < 8; x++)
  2117. {
  2118. for (int y = 0; y < 18; y++)
  2119. {
  2120. cout << letterSample [x][y];
  2121. }
  2122. cout << endl;
  2123. }
  2124. cout << " " << endl;
  2125. }
  2126. else if (guess == 'v' || guess == 'V')
  2127. {
  2128. letterSample[6][2] = 0;
  2129. for (int x = 0; x < 8; x++)
  2130. {
  2131. for (int y = 0; y < 18; y++)
  2132. {
  2133. cout << letterSample [x][y];
  2134. }
  2135. cout << endl;
  2136. }
  2137. cout << " " << endl;
  2138. }
  2139. else if (guess == 'w' || guess == 'W')
  2140. {
  2141. letterSample[6][4] = 0;
  2142. for (int x = 0; x < 8; x++)
  2143. {
  2144. for (int y = 0; y < 18; y++)
  2145. {
  2146. cout << letterSample [x][y];
  2147. }
  2148. cout << endl;
  2149. }
  2150. cout << " " << endl;
  2151. }
  2152. else if (guess == 'x' || guess == 'X')
  2153. {
  2154. letterSample[6][6] = 0;
  2155. for (int x = 0; x < 8; x++)
  2156. {
  2157. for (int y = 0; y < 18; y++)
  2158. {
  2159. cout << letterSample [x][y];
  2160. }
  2161. cout << endl;
  2162. }
  2163. cout << " " << endl;
  2164. }
  2165. else if (guess == 'y' || guess == 'Y')
  2166. {
  2167. letterSample[6][8] = 0;
  2168. for (int x = 0; x < 8; x++)
  2169. {
  2170. for (int y = 0; y < 18; y++)
  2171. {
  2172. cout << letterSample [x][y];
  2173. }
  2174. cout << endl;
  2175. }
  2176. cout << " " << endl;
  2177. }
  2178. else if (guess == 'z' || guess == 'Z')
  2179. {
  2180. letterSample[6][10] = 0;
  2181. for (int x = 0; x < 8; x++)
  2182. {
  2183. for (int y = 0; y < 18; y++)
  2184. {
  2185. cout << letterSample [x][y];
  2186. }
  2187. cout << endl;
  2188. }
  2189. cout << " " << endl;
  2190. }
  2191. else if (guess == '0')
  2192. {
  2193. token--;
  2194. if (token == 1)
  2195. {
  2196. for (int x = 0; x < 8; x++)
  2197. {
  2198. for (int y = 0; y < 18; y++)
  2199. {
  2200. cout << letterSample [x][y];
  2201. }
  2202. cout << endl;
  2203. }
  2204. for (int x = 0; x < 1; x++)
  2205. {
  2206. for (int y = 0; y < 13; y++)
  2207. {
  2208. cout << atlantaWord[x][y];
  2209. }
  2210. cout << endl;
  2211. }
  2212. cout << " " << endl;
  2213. cout << "Hint 1: This city is in the southeast." << endl;
  2214. }
  2215. else if (token == 0)
  2216. {
  2217. for (int x = 0; x < 8; x++)
  2218. {
  2219. for (int y = 0; y < 18; y++)
  2220. {
  2221. cout << letterSample [x][y];
  2222. }
  2223. cout << endl;
  2224. }
  2225. for (int x = 0; x < 1; x++)
  2226. {
  2227. for (int y = 0; y < 13; y++)
  2228. {
  2229. cout << atlantaWord [x][y];
  2230. }
  2231. cout << endl;
  2232. }
  2233. cout << " " << endl;
  2234. cout << "Hint 2: Coca-Cola was founded in the state of this city." << endl;
  2235. }
  2236. else
  2237. {
  2238. cout << "You have no more hints/token left. Sorry!" << endl;
  2239. for (int x = 0; x < 8; x++)
  2240. {
  2241. for (int y = 0; y < 18; y++)
  2242. {
  2243. cout << letterSample [x][y];
  2244. }
  2245. cout << endl;
  2246. }
  2247. for (int x = 0; x < 1; x++)
  2248. {
  2249. for (int y = 0; y < 13; y++)
  2250. {
  2251. cout << atlantaWord [x][y];
  2252. }
  2253. cout << endl;
  2254. }
  2255. }
  2256. }
  2257.  
  2258. if (guess == 'B' || guess == 'b' || guess == 'C' || guess == 'c' || guess == 'D' || guess == 'd' || guess == 'E' || guess == 'e' || guess == 'G' || guess == 'g' || guess == 'f' || guess == 'F' || guess == 'H' || guess == 'h' || guess == 'i' || guess == 'I' || guess == 'j' || guess == 'J' || guess == 'K' || guess == 'k' || guess == 'M' || guess == 'm' || guess == 'P' || guess == 'p' || guess == 'O' || guess == 'o' || guess == 'Q' || guess == 'q' || guess == 'R' || guess == 'r' || guess == 's' || guess == 'S' || guess == 'u' || guess == 'U' || guess == 'v' || guess == 'V' || guess == 'W' || guess == 'w' || guess == 'X' || guess == 'x' || guess == 'Y' || guess == 'y' || guess == 'Z' || guess == 'z')
  2259. {
  2260. cout << "---------------------------------------------------------------" << endl;
  2261. for (int x = 0; x < 8; x++)
  2262. {
  2263. for (int y = 0; y < 18; y++)
  2264. {
  2265. cout << letterSample [x][y];
  2266. }
  2267. cout << endl;
  2268. }
  2269. for (int x = 0; x < 1; x++)
  2270. {
  2271. for (int y = 0; y < 13; y++)
  2272. {
  2273. cout << atlantaWord [x][y];
  2274. }
  2275. cout << endl;
  2276. }
  2277. wrongguess++;
  2278. if (wrongguess == 1)
  2279. {
  2280. cout << " _________ \n";
  2281. cout << "| | \n";
  2282. cout << "| 0 \n";
  2283. cout << "| \n";
  2284. cout << "| \n";
  2285. cout << "| \n";
  2286. cout << "| \n";
  2287. cout << " " << endl;
  2288. cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
  2289. }
  2290. else if (wrongguess == 2)
  2291. {
  2292. cout << " _________ \n";
  2293. cout << "| | \n";
  2294. cout << "| 0 \n";
  2295. cout << "| | \n";
  2296. cout << "| \n";
  2297. cout << "| \n";
  2298. cout << "| \n";
  2299. cout << " " << endl;
  2300. cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
  2301. }
  2302. else if (wrongguess == 3)
  2303. {
  2304. cout << " _________ \n";
  2305. cout << "| | \n";
  2306. cout << "| 0 \n";
  2307. cout << "| /| \n";
  2308. cout << "| \n";
  2309. cout << "| \n";
  2310. cout << "| \n";
  2311. cout << " " << endl;
  2312. cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
  2313. }
  2314. else if (wrongguess == 4)
  2315. {
  2316. cout << " _________ \n";
  2317. cout << "| | \n";
  2318. cout << "| 0 \n";
  2319. cout << "| /|\\ \n";
  2320. cout << "| \n";
  2321. cout << "| \n";
  2322. cout << "| \n";
  2323. cout << " " << endl;
  2324. cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
  2325. else if (wrongguess == 5)
  2326. {
  2327. cout << " _________ \n";
  2328. cout << "| | \n";
  2329. cout << "| 0 \n";
  2330. cout << "| /|\\ \n";
  2331. cout << "| / \n";
  2332. cout << "| \n";
  2333. cout << "| \n";
  2334. cout << " " << endl;
  2335. cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
  2336. }
  2337. else if (wrongguess == 6)
  2338. {
  2339. cout << " _________ \n";
  2340. cout << "| | \n";
  2341. cout << "| 0 \n";
  2342. cout << "| /|\\ \n";
  2343. cout << "| / \\ \n";
  2344. cout << "| \n";
  2345. cout << "| \n";
  2346. system("COLOR 0C");
  2347. printf;
  2348. cout << " " << endl;
  2349. cout << " +=====================================================================+ " << endl;
  2350. cout << " | | " << endl;
  2351. cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
  2352. cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
  2353. cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
  2354. cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
  2355. cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
  2356. cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
  2357. cout << " | | " << endl;
  2358. cout << " +=====================================================================+ " << endl;
  2359. cout << " " << endl;
  2360. cout << "You have lost the game, good luck next time!" << endl;
  2361. cout << " " << endl;
  2362. cout << "The correct word was: ATLANTA." << endl;
  2363. break;
  2364. }
  2365. else
  2366. {
  2367. cout << " " << endl;
  2368. }
  2369. }
  2370. if (atlantaWord[0][0] == 'A' && atlantaWord[0][2] == 'T' && atlantaWord[0][4] == 'L' && atlantaWord[0][6] == 'A' && atlantaWord[0][8] == 'N' && atlantaWord[0][10] == 'T' && atlantaWord[0][12] == 'A')
  2371. {
  2372. system("COLOR 0A");
  2373. printf;
  2374. cout << " " << endl;
  2375. cout << " +============================================================+ " << endl;
  2376. cout << " | | " << endl;
  2377. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  2378. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  2379. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  2380. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  2381. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  2382. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  2383. cout << " | | " << endl;
  2384. cout << " +============================================================+ " << endl;
  2385. cout << " " << endl;
  2386. cout << "Congratulations! You have won!" << endl;
  2387. cout << " " << endl;
  2388. break;
  2389. }
  2390. }
  2391. }
  2392. }
  2393. else if (category == 2)
  2394. {
  2395. cout << "You have chosen the Countries category." << endl;
  2396. srand(time(NULL));
  2397. int randCoun = (rand() % 3) + 1;
  2398. if (randCoun == 1) //chile
  2399. {
  2400. int category;
  2401. int wrongguess = 0;
  2402. int token = 2;
  2403. char letterSample[8][18] =
  2404. {
  2405. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  2406. {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
  2407. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  2408. {65,0,66,0,67,0,68,0,69,0,70,0,71},
  2409. {72,0,73,0,74,0,75,0,76,0,77,0,78},
  2410. {79,0,80,0,81,0,82,0,83,0,84,0,85},
  2411. {0,0,86,0,87,0,88,0,89,0,90,0,0},
  2412. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  2413. };
  2414. char chileWord[1][9] = {95,0,95,0,95,0,95,0,95};
  2415. int z;
  2416. cout << "---------------------------------------------------------------" << endl;
  2417. for (int x = 0; x < 8; x++)
  2418. {
  2419. for (int y = 0; y < 18; y++)
  2420. {
  2421. cout << letterSample [x][y];
  2422. }
  2423. cout << endl;
  2424. }
  2425. for (int x = 0; x < 1; x++)
  2426. {
  2427. for (int y = 0; y < 9; y++)
  2428. {
  2429. cout << chileWord [x][y];
  2430. }
  2431. cout << endl;
  2432. }
  2433. cout << " " << endl;
  2434. cout << " _________ \n";
  2435. cout << "| | \n";
  2436. cout << "| \n";
  2437. cout << "| \n";
  2438. cout << "| \n";
  2439. cout << "| \n";
  2440. cout << "| \n";
  2441. cout << " " << endl;
  2442. for (z = 0; z < 1000; z++)
  2443. {
  2444. char guess;
  2445. cout << " " << endl;
  2446. if (token >= 0)
  2447. {
  2448. cout << "-- Token(s) left: " << token << " --" << endl;
  2449. }
  2450. cout << " " << endl;
  2451. cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
  2452. cin >> guess;
  2453. cout << " " << endl;
  2454. cout << "---------------------------------------------------------------" << endl;
  2455. if (guess == 'a' || guess == 'A')
  2456. {
  2457. letterSample[3][0] = 0;
  2458. for (int x = 0; x < 8; x++)
  2459. {
  2460. for (int y = 0; y < 18; y++)
  2461. {
  2462. cout << letterSample [x][y];
  2463. }
  2464. cout << endl;
  2465. }
  2466. cout << " " << endl;
  2467. }
  2468. else if (guess == 'b' || guess == 'B')
  2469. {
  2470. letterSample[3][2] = 0;
  2471. for (int x = 0; x < 8; x++)
  2472. {
  2473. for (int y = 0; y < 18; y++)
  2474. {
  2475. cout << letterSample [x][y];
  2476. }
  2477. cout << endl;
  2478. }
  2479. cout << " " << endl;
  2480. }
  2481. else if (guess == 'c' || guess == 'C')
  2482. {
  2483. chileWord[0][0] = 'C';
  2484. cout << " " << endl;
  2485. for (int x = 0; x < 1; x++)
  2486. {
  2487. for (int y = 0; y < 9; y++)
  2488. {
  2489. cout << chileWord [x][y];
  2490. }
  2491. cout << endl;
  2492. }
  2493. letterSample[3][4] = 0;
  2494. for (int x = 0; x < 8; x++)
  2495. {
  2496. for (int y = 0; y < 18; y++)
  2497. {
  2498. cout << letterSample [x][y];
  2499. }
  2500. cout << endl;
  2501. }
  2502. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  2503. }
  2504. else if (guess == 'd' || guess == 'D')
  2505. {
  2506. letterSample[3][6] = 0;
  2507. for (int x = 0; x < 8; x++)
  2508. {
  2509. for (int y = 0; y < 18; y++)
  2510. {
  2511. cout << letterSample [x][y];
  2512. }
  2513. cout << endl;
  2514. }
  2515. cout << " " << endl;
  2516. }
  2517. else if (guess == 'e' || guess == 'E')
  2518. {
  2519. chileWord[0][8] = 'E';
  2520. cout << " " << endl;
  2521. for (int x = 0; x < 1; x++)
  2522. {
  2523. for (int y = 0; y < 9; y++)
  2524. {
  2525. cout << chileWord [x][y];
  2526. }
  2527. cout << endl;
  2528. }
  2529. letterSample[3][8] = 0;
  2530. for (int x = 0; x < 8; x++)
  2531. {
  2532. for (int y = 0; y < 18; y++)
  2533. {
  2534. cout << letterSample [x][y];
  2535. }
  2536. cout << endl;
  2537. }
  2538. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  2539. }
  2540. else if (guess == 'f' || guess == 'F')
  2541. {
  2542. letterSample[3][10] = 0;
  2543. for (int x = 0; x < 8; x++)
  2544. {
  2545. for (int y = 0; y < 18; y++)
  2546. {
  2547. cout << letterSample [x][y];
  2548. }
  2549. cout << endl;
  2550. }
  2551. cout << " " << endl;
  2552. }
  2553. else if (guess == 'g' || guess == 'G')
  2554. {
  2555. letterSample[3][12] = 0;
  2556. for (int x = 0; x < 8; x++)
  2557. {
  2558. for (int y = 0; y < 18; y++)
  2559. {
  2560. cout << letterSample [x][y];
  2561. }
  2562. cout << endl;
  2563. }
  2564. cout << " " << endl;
  2565. }
  2566. else if (guess == 'h' || guess == 'H')
  2567. {
  2568. chileWord[0][2] = 'H';
  2569. cout << " " << endl;
  2570. for (int x = 0; x < 1; x++)
  2571. {
  2572. for (int y = 0; y < 9; y++)
  2573. {
  2574. cout << chileWord [x][y];
  2575. }
  2576. cout << endl;
  2577. }
  2578. letterSample[4][0] = 0;
  2579. for (int x = 0; x < 8; x++)
  2580. {
  2581. for (int y = 0; y < 18; y++)
  2582. {
  2583. cout << letterSample [x][y];
  2584. }
  2585. cout << endl;
  2586. }
  2587. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  2588. }
  2589. else if (guess == 'i' || guess == 'I')
  2590. {
  2591. chileWord[0][4] = 'I';
  2592. cout << " " << endl;
  2593. for (int x = 0; x < 1; x++)
  2594. {
  2595. for (int y = 0; y < 9; y++)
  2596. {
  2597. cout << chileWord [x][y];
  2598. }
  2599. cout << endl;
  2600. }
  2601. letterSample[4][2] = 0;
  2602. for (int x = 0; x < 8; x++)
  2603. {
  2604. for (int y = 0; y < 18; y++)
  2605. {
  2606. cout << letterSample [x][y];
  2607. }
  2608. cout << endl;
  2609. }
  2610. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  2611. }
  2612. else if (guess == 'j' || guess == 'J')
  2613. {
  2614. letterSample[4][4] = 0;
  2615. for (int x = 0; x < 8; x++)
  2616. {
  2617. for (int y = 0; y < 18; y++)
  2618. {
  2619. cout << letterSample [x][y];
  2620. }
  2621. cout << endl;
  2622. }
  2623. cout << " " << endl;
  2624. }
  2625. else if (guess == 'k' || guess == 'K')
  2626. {
  2627. letterSample[4][6] = 0;
  2628. for (int x = 0; x < 8; x++)
  2629. {
  2630. for (int y = 0; y < 18; y++)
  2631. {
  2632. cout << letterSample [x][y];
  2633. }
  2634. cout << endl;
  2635. }
  2636. cout << " " << endl;
  2637. }
  2638. else if (guess == 'l' || guess == 'L')
  2639. {
  2640. chileWord[0][6] = 'L';
  2641. cout << " " << endl;
  2642. for (int x = 0; x < 1; x++)
  2643. {
  2644. for (int y = 0; y < 9; y++)
  2645. {
  2646. cout << chileWord [x][y];
  2647. }
  2648. cout << endl;
  2649. }
  2650. letterSample[4][8] = 0;
  2651. for (int x = 0; x < 8; x++)
  2652. {
  2653. for (int y = 0; y < 18; y++)
  2654. {
  2655. cout << letterSample [x][y];
  2656. }
  2657. cout << endl;
  2658. }
  2659. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  2660. }
  2661. else if (guess == 'm' || guess == 'M')
  2662. {
  2663. letterSample[4][10] = 0;
  2664. for (int x = 0; x < 8; x++)
  2665. {
  2666. for (int y = 0; y < 18; y++)
  2667. {
  2668. cout << letterSample [x][y];
  2669. }
  2670. cout << endl;
  2671. }
  2672. cout << " " << endl;
  2673. }
  2674. else if (guess == 'n' || guess == 'N')
  2675. {
  2676. letterSample[4][12] = 0;
  2677. for (int x = 0; x < 8; x++)
  2678. {
  2679. for (int y = 0; y < 18; y++)
  2680. {
  2681. cout << letterSample [x][y];
  2682. }
  2683. cout << endl;
  2684. }
  2685. cout << " " << endl;
  2686. }
  2687. else if (guess == 'o' || guess == 'O')
  2688. {
  2689. letterSample[5][0] = 0;
  2690. for (int x = 0; x < 8; x++)
  2691. {
  2692. for (int y = 0; y < 18; y++)
  2693. {
  2694. cout << letterSample [x][y];
  2695. }
  2696. cout << endl;
  2697. }
  2698. cout << " " << endl;
  2699. }
  2700. else if (guess == 'p' || guess == 'P')
  2701. {
  2702. letterSample[5][2] = 0;
  2703. for (int x = 0; x < 8; x++)
  2704. {
  2705. for (int y = 0; y < 18; y++)
  2706. {
  2707. cout << letterSample [x][y];
  2708. }
  2709. cout << endl;
  2710. }
  2711. cout << " " << endl;
  2712. }
  2713. else if (guess == 'q' || guess == 'Q')
  2714. {
  2715. letterSample[5][4] = 0;
  2716. for (int x = 0; x < 8; x++)
  2717. {
  2718. for (int y = 0; y < 18; y++)
  2719. {
  2720. cout << letterSample [x][y];
  2721. }
  2722. cout << endl;
  2723. }
  2724. cout << " " << endl;
  2725. }
  2726. else if (guess == 'r' || guess == 'R')
  2727. {
  2728. letterSample[5][6] = 0;
  2729. for (int x = 0; x < 8; x++)
  2730. {
  2731. for (int y = 0; y < 18; y++)
  2732. {
  2733. cout << letterSample [x][y];
  2734. }
  2735. cout << endl;
  2736. }
  2737. cout << " " << endl;
  2738. }
  2739. else if (guess == 's' || guess == 'S')
  2740. {
  2741. letterSample[5][8] = 0;
  2742. for (int x = 0; x < 8; x++)
  2743. {
  2744. for (int y = 0; y < 18; y++)
  2745. {
  2746. cout << letterSample [x][y];
  2747. }
  2748. cout << endl;
  2749. }
  2750. cout << " " << endl;
  2751. }
  2752. else if (guess == 't' || guess == 'T')
  2753. {
  2754. letterSample[5][10] = 0;
  2755. for (int x = 0; x < 8; x++)
  2756. {
  2757. for (int y = 0; y < 18; y++)
  2758. {
  2759. cout << letterSample [x][y];
  2760. }
  2761. cout << endl;
  2762. }
  2763. cout << " " << endl;
  2764. }
  2765. else if (guess == 'u' || guess == 'U')
  2766. {
  2767. letterSample[5][12] = 0;
  2768. for (int x = 0; x < 8; x++)
  2769. {
  2770. for (int y = 0; y < 18; y++)
  2771. {
  2772. cout << letterSample [x][y];
  2773. }
  2774. cout << endl;
  2775. }
  2776. cout << " " << endl;
  2777. }
  2778. else if (guess == 'v' || guess == 'V')
  2779. {
  2780. letterSample[6][2] = 0;
  2781. for (int x = 0; x < 8; x++)
  2782. {
  2783. for (int y = 0; y < 18; y++)
  2784. {
  2785. cout << letterSample [x][y];
  2786. }
  2787. cout << endl;
  2788. }
  2789. cout << " " << endl;
  2790. }
  2791. else if (guess == 'w' || guess == 'W')
  2792. {
  2793. letterSample[6][4] = 0;
  2794. for (int x = 0; x < 8; x++)
  2795. {
  2796. for (int y = 0; y < 18; y++)
  2797. {
  2798. cout << letterSample [x][y];
  2799. }
  2800. cout << endl;
  2801. }
  2802. cout << " " << endl;
  2803. }
  2804. else if (guess == 'x' || guess == 'X')
  2805. {
  2806. letterSample[6][6] = 0;
  2807. for (int x = 0; x < 8; x++)
  2808. {
  2809. for (int y = 0; y < 18; y++)
  2810. {
  2811. cout << letterSample [x][y];
  2812. }
  2813. cout << endl;
  2814. }
  2815. cout << " " << endl;
  2816. }
  2817. else if (guess == 'y' || guess == 'Y')
  2818. {
  2819. letterSample[6][8] = 0;
  2820. for (int x = 0; x < 8; x++)
  2821. {
  2822. for (int y = 0; y < 18; y++)
  2823. {
  2824. cout << letterSample [x][y];
  2825. }
  2826. cout << endl;
  2827. }
  2828. cout << " " << endl;
  2829. }
  2830. else if (guess == 'z' || guess == 'Z')
  2831. {
  2832. letterSample[6][10] = 0;
  2833. for (int x = 0; x < 8; x++)
  2834. {
  2835. for (int y = 0; y < 18; y++)
  2836. {
  2837. cout << letterSample [x][y];
  2838. }
  2839. cout << endl;
  2840. }
  2841. cout << " " << endl;
  2842. }
  2843. else if (guess == '0')
  2844. {
  2845. token--;
  2846. if (token == 1)
  2847. {
  2848. for (int x = 0; x < 8; x++)
  2849. {
  2850. for (int y = 0; y < 18; y++)
  2851. {
  2852. cout << letterSample [x][y];
  2853. }
  2854. cout << endl;
  2855. }
  2856. for (int x = 0; x < 1; x++)
  2857. {
  2858. for (int y = 0; y < 9; y++)
  2859. {
  2860. cout << chileWord[x][y];
  2861. }
  2862. cout << endl;
  2863. }
  2864. cout << " " << endl;
  2865. cout << "Hint 1: This country is located in South America." << endl;
  2866. }
  2867. else if (token == 0)
  2868. {
  2869. for (int x = 0; x < 8; x++)
  2870. {
  2871. for (int y = 0; y < 18; y++)
  2872. {
  2873. cout << letterSample [x][y];
  2874. }
  2875. cout << endl;
  2876. }
  2877. for (int x = 0; x < 1; x++)
  2878. {
  2879. for (int y = 0; y < 9; y++)
  2880. {
  2881. cout << chileWord [x][y];
  2882. }
  2883. cout << endl;
  2884. }
  2885. cout << " " << endl;
  2886. cout << "Hint 2: The country includes a big mountain range." << endl;
  2887. }
  2888. else
  2889. {
  2890. cout << "You have no more hints/token left. Sorry!" << endl;
  2891. for (int x = 0; x < 8; x++)
  2892. {
  2893. for (int y = 0; y < 18; y++)
  2894. {
  2895. cout << letterSample [x][y];
  2896. }
  2897. cout << endl;
  2898. }
  2899. for (int x = 0; x < 1; x++)
  2900. {
  2901. for (int y = 0; y < 9; y++)
  2902. {
  2903. cout << chileWord [x][y];
  2904. }
  2905. cout << endl;
  2906. }
  2907. }
  2908. }
  2909. if (guess == 'B' || guess == 'b' || guess == 'A' || guess == 'a' || guess == 'D' || guess == 'd' || guess == 'G' || guess == 'g' || guess == 'f' || guess == 'F' || guess == 'j' || guess == 'J' || guess == 'K' || guess == 'k' || guess == 'M' || guess == 'm' || guess == 'n' || guess == 'N' || guess == 'O' || guess == 'o' || guess == 'p' || guess == 'P' || guess == 'Q' || guess == 'q' || guess == 'r' || guess == 'R' || guess == 't' || guess == 'T' || guess == 'u' || guess == 'U' || guess == 'v' || guess == 'V' || guess == 's' || guess == 'S' || guess == 'W' || guess == 'w' || guess == 'X' || guess == 'x' || guess == 'Y' || guess == 'y' || guess == 'Z' || guess == 'z')
  2910. {
  2911. cout << "---------------------------------------------------------------" << endl;
  2912. for (int x = 0; x < 8; x++)
  2913. {
  2914. for (int y = 0; y < 18; y++)
  2915. {
  2916. cout << letterSample [x][y];
  2917. }
  2918. cout << endl;
  2919. }
  2920. for (int x = 0; x < 1; x++)
  2921. {
  2922. for (int y = 0; y < 9; y++)
  2923. {
  2924. cout << chileWord [x][y];
  2925. }
  2926. cout << endl;
  2927. }
  2928. wrongguess++;
  2929. if (wrongguess == 1)
  2930. {
  2931. cout << " _________ \n";
  2932. cout << "| | \n";
  2933. cout << "| 0 \n";
  2934. cout << "| \n";
  2935. cout << "| \n";
  2936. cout << "| \n";
  2937. cout << "| \n";
  2938. cout << " " << endl;
  2939. cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
  2940. }
  2941. else if (wrongguess == 2)
  2942. {
  2943. cout << " _________ \n";
  2944. cout << "| | \n";
  2945. cout << "| 0 \n";
  2946. cout << "| | \n";
  2947. cout << "| \n";
  2948. cout << "| \n";
  2949. cout << "| \n";
  2950. cout << " " << endl;
  2951. cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
  2952. }
  2953. else if (wrongguess == 3)
  2954. {
  2955. cout << " _________ \n";
  2956. cout << "| | \n";
  2957. cout << "| 0 \n";
  2958. cout << "| /| \n";
  2959. cout << "| \n";
  2960. cout << "| \n";
  2961. cout << "| \n";
  2962. cout << " " << endl;
  2963. cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
  2964. }
  2965. else if (wrongguess == 4)
  2966. {
  2967. cout << " _________ \n";
  2968. cout << "| | \n";
  2969. cout << "| 0 \n";
  2970. cout << "| /|\\ \n";
  2971. cout << "| \n";
  2972. cout << "| \n";
  2973. cout << "| \n";
  2974. cout << " " << endl;
  2975. cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
  2976. else if (wrongguess == 5)
  2977. {
  2978. cout << " _________ \n";
  2979. cout << "| | \n";
  2980. cout << "| 0 \n";
  2981. cout << "| /|\\ \n";
  2982. cout << "| / \n";
  2983. cout << "| \n";
  2984. cout << "| \n";
  2985. cout << " " << endl;
  2986. cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
  2987. }
  2988. else if (wrongguess == 6)
  2989. {
  2990. cout << " _________ \n";
  2991. cout << "| | \n";
  2992. cout << "| 0 \n";
  2993. cout << "| /|\\ \n";
  2994. cout << "| / \\ \n";
  2995. cout << "| \n";
  2996. cout << "| \n";
  2997. system("COLOR 0C");
  2998. printf;
  2999. cout << " " << endl;
  3000. cout << " +=====================================================================+ " << endl;
  3001. cout << " | | " << endl;
  3002. cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
  3003. cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
  3004. cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
  3005. cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
  3006. cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
  3007. cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
  3008. cout << " | | " << endl;
  3009. cout << " +=====================================================================+ " << endl;
  3010. cout << " " << endl;
  3011. cout << "You have lost the game, good luck next time!" << endl;
  3012. cout << " " << endl;
  3013. cout << "The correct word was: CHILE." << endl;
  3014. break;
  3015. }
  3016. else
  3017. {
  3018. cout << " " << endl;
  3019. }
  3020. }
  3021. if (chileWord[0][0] == 'C' && chileWord[0][2] == 'H' && chileWord[0][4] == 'I' && chileWord[0][6] == 'L' && chileWord[0][8] == 'E')
  3022. {
  3023. system("COLOR 0A");
  3024. printf;
  3025. cout << " " << endl;
  3026. cout << " +============================================================+ " << endl;
  3027. cout << " | | " << endl;
  3028. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  3029. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  3030. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  3031. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  3032. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  3033. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  3034. cout << " | | " << endl;
  3035. cout << " +============================================================+ " << endl;
  3036. cout << " " << endl;
  3037. cout << "Congratulations! You have won!" << endl;
  3038. cout << " " << endl;
  3039. break;
  3040. }
  3041. }
  3042. }
  3043. else if (randCoun == 2) //denmark
  3044. {
  3045. int category;
  3046. int wrongguess = 0;
  3047. int token = 2;
  3048. char letterSample[8][18] =
  3049. {
  3050. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  3051. {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
  3052. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  3053. {65,0,66,0,67,0,68,0,69,0,70,0,71},
  3054. {72,0,73,0,74,0,75,0,76,0,77,0,78},
  3055. {79,0,80,0,81,0,82,0,83,0,84,0,85},
  3056. {0,0,86,0,87,0,88,0,89,0,90,0,0},
  3057. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  3058. };
  3059. char denmarkWord[1][13] = {95,0,95,0,95,0,95,0,95,0,95,0,95};
  3060. int z;
  3061. cout << "---------------------------------------------------------------" << endl;
  3062. for (int x = 0; x < 8; x++)
  3063. {
  3064. for (int y = 0; y < 18; y++)
  3065. {
  3066. cout << letterSample [x][y];
  3067. }
  3068. cout << endl;
  3069. }
  3070. for (int x = 0; x < 1; x++)
  3071. {
  3072. for (int y = 0; y < 13; y++)
  3073. {
  3074. cout << denmarkWord [x][y];
  3075. }
  3076. cout << endl;
  3077. }
  3078. cout << " " << endl;
  3079. cout << " _________ \n";
  3080. cout << "| | \n";
  3081. cout << "| \n";
  3082. cout << "| \n";
  3083. cout << "| \n";
  3084. cout << "| \n";
  3085. cout << "| \n";
  3086. cout << " " << endl;
  3087. for (z = 0; z < 1000; z++)
  3088. {
  3089. char guess;
  3090. cout << " " << endl;
  3091. if (token >= 0)
  3092. {
  3093. cout << "-- Token(s) left: " << token << " --" << endl;
  3094. }
  3095. cout << " " << endl;
  3096. cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
  3097. cin >> guess;
  3098. cout << " " << endl;
  3099. cout << "---------------------------------------------------------------" << endl;
  3100. if (guess == 'a' || guess == 'A')
  3101. {
  3102. denmarkWord[0][8] = 'A';
  3103. cout << " " << endl;
  3104. for (int x = 0; x < 1; x++)
  3105. {
  3106. for (int y = 0; y < 13; y++)
  3107. {
  3108. cout << denmarkWord [x][y];
  3109. }
  3110. cout << endl;
  3111. }
  3112. letterSample[3][0] = 0;
  3113. for (int x = 0; x < 8; x++)
  3114. {
  3115. for (int y = 0; y < 18; y++)
  3116. {
  3117. cout << letterSample [x][y];
  3118. }
  3119. cout << endl;
  3120. }
  3121. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3122. }
  3123. else if (guess == 'b' || guess == 'B')
  3124. {
  3125. letterSample[3][2] = 0;
  3126. for (int x = 0; x < 8; x++)
  3127. {
  3128. for (int y = 0; y < 18; y++)
  3129. {
  3130. cout << letterSample [x][y];
  3131. }
  3132. cout << endl;
  3133. }
  3134. cout << " " << endl;
  3135. }
  3136. else if (guess == 'c' || guess == 'C')
  3137. {
  3138. letterSample[3][4] = 0;
  3139. for (int x = 0; x < 8; x++)
  3140. {
  3141. for (int y = 0; y < 18; y++)
  3142. {
  3143. cout << letterSample [x][y];
  3144. }
  3145. cout << endl;
  3146. }
  3147. cout << " " << endl;
  3148. }
  3149. else if (guess == 'd' || guess == 'D')
  3150. {
  3151. denmarkWord[0][0] = 'D';
  3152. cout << " " << endl;
  3153. for (int x = 0; x < 1; x++)
  3154. {
  3155. for (int y = 0; y < 13; y++)
  3156. {
  3157. cout << denmarkWord [x][y];
  3158. }
  3159. cout << endl;
  3160. }
  3161. letterSample[3][6] = 0;
  3162. for (int x = 0; x < 8; x++)
  3163. {
  3164. for (int y = 0; y < 18; y++)
  3165. {
  3166. cout << letterSample [x][y];
  3167. }
  3168. cout << endl;
  3169. }
  3170. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3171. }
  3172. else if (guess == 'e' || guess == 'E')
  3173. {
  3174. denmarkWord[0][2] = 'E';
  3175. cout << " " << endl;
  3176. for (int x = 0; x < 1; x++)
  3177. {
  3178. for (int y = 0; y < 13; y++)
  3179. {
  3180. cout << denmarkWord [x][y];
  3181. }
  3182. cout << endl;
  3183. }
  3184. letterSample[3][8] = 0;
  3185. for (int x = 0; x < 8; x++)
  3186. {
  3187. for (int y = 0; y < 18; y++)
  3188. {
  3189. cout << letterSample [x][y];
  3190. }
  3191. cout << endl;
  3192. }
  3193. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3194. }
  3195. else if (guess == 'f' || guess == 'F')
  3196. {
  3197. letterSample[3][10] = 0;
  3198. for (int x = 0; x < 8; x++)
  3199. {
  3200. for (int y = 0; y < 18; y++)
  3201. {
  3202. cout << letterSample [x][y];
  3203. }
  3204. cout << endl;
  3205. }
  3206. cout << " " << endl;
  3207. }
  3208. else if (guess == 'g' || guess == 'G')
  3209. {
  3210. letterSample[3][12] = 0;
  3211. for (int x = 0; x < 8; x++)
  3212. {
  3213. for (int y = 0; y < 18; y++)
  3214. {
  3215. cout << letterSample [x][y];
  3216. }
  3217. cout << endl;
  3218. }
  3219. cout << " " << endl;
  3220. }
  3221. else if (guess == 'h' || guess == 'H')
  3222. {
  3223. letterSample[4][0] = 0;
  3224. for (int x = 0; x < 8; x++)
  3225. {
  3226. for (int y = 0; y < 18; y++)
  3227. {
  3228. cout << letterSample [x][y];
  3229. }
  3230. cout << endl;
  3231. }
  3232. cout << " " << endl;
  3233. }
  3234. else if (guess == 'i' || guess == 'I')
  3235. {
  3236. letterSample[4][2] = 0;
  3237. for (int x = 0; x < 8; x++)
  3238. {
  3239. for (int y = 0; y < 18; y++)
  3240. {
  3241. cout << letterSample [x][y];
  3242. }
  3243. cout << endl;
  3244. }
  3245. cout << " " << endl;
  3246. }
  3247. else if (guess == 'j' || guess == 'J')
  3248. {
  3249. letterSample[4][4] = 0;
  3250. for (int x = 0; x < 8; x++)
  3251. {
  3252. for (int y = 0; y < 18; y++)
  3253. {
  3254. cout << letterSample [x][y];
  3255. }
  3256. cout << endl;
  3257. }
  3258. cout << " " << endl;
  3259. }
  3260. else if (guess == 'k' || guess == 'K')
  3261. {
  3262. denmarkWord[0][12] = 'K';
  3263. cout << " " << endl;
  3264. for (int x = 0; x < 1; x++)
  3265. {
  3266. for (int y = 0; y < 13; y++)
  3267. {
  3268. cout << denmarkWord [x][y];
  3269. }
  3270. cout << endl;
  3271. }
  3272. letterSample[4][6] = 0;
  3273. for (int x = 0; x < 8; x++)
  3274. {
  3275. for (int y = 0; y < 18; y++)
  3276. {
  3277. cout << letterSample [x][y];
  3278. }
  3279. cout << endl;
  3280. }
  3281. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3282. }
  3283. else if (guess == 'l' || guess == 'L')
  3284. {
  3285. letterSample[4][8] = 0;
  3286. for (int x = 0; x < 8; x++)
  3287. {
  3288. for (int y = 0; y < 18; y++)
  3289. {
  3290. cout << letterSample [x][y];
  3291. }
  3292. cout << endl;
  3293. }
  3294. cout << " " << endl;
  3295. }
  3296. else if (guess == 'm' || guess == 'M')
  3297. {
  3298. denmarkWord[0][6] = 'M';
  3299. cout << " " << endl;
  3300. for (int x = 0; x < 1; x++)
  3301. {
  3302. for (int y = 0; y < 13; y++)
  3303. {
  3304. cout << denmarkWord [x][y];
  3305. }
  3306. cout << endl;
  3307. }
  3308. letterSample[4][10] = 0;
  3309. for (int x = 0; x < 8; x++)
  3310. {
  3311. for (int y = 0; y < 18; y++)
  3312. {
  3313. cout << letterSample [x][y];
  3314. }
  3315. cout << endl;
  3316. }
  3317. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3318. }
  3319. else if (guess == 'n' || guess == 'N')
  3320. {
  3321. denmarkWord[0][4] = 'N';
  3322. cout << " " << endl;
  3323. for (int x = 0; x < 1; x++)
  3324. {
  3325. for (int y = 0; y < 13; y++)
  3326. {
  3327. cout << denmarkWord [x][y];
  3328. }
  3329. cout << endl;
  3330. }
  3331. letterSample[4][12] = 0;
  3332. for (int x = 0; x < 8; x++)
  3333. {
  3334. for (int y = 0; y < 18; y++)
  3335. {
  3336. cout << letterSample [x][y];
  3337. }
  3338. cout << endl;
  3339. }
  3340. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3341. }
  3342. else if (guess == 'o' || guess == 'O')
  3343. {
  3344. letterSample[5][0] = 0;
  3345. for (int x = 0; x < 8; x++)
  3346. {
  3347. for (int y = 0; y < 18; y++)
  3348. {
  3349. cout << letterSample [x][y];
  3350. }
  3351. cout << endl;
  3352. }
  3353. cout << " " << endl;
  3354. }
  3355. else if (guess == 'p' || guess == 'P')
  3356. {
  3357. letterSample[5][2] = 0;
  3358. for (int x = 0; x < 8; x++)
  3359. {
  3360. for (int y = 0; y < 18; y++)
  3361. {
  3362. cout << letterSample [x][y];
  3363. }
  3364. cout << endl;
  3365. }
  3366. cout << " " << endl;
  3367. }
  3368. else if (guess == 'q' || guess == 'Q')
  3369. {
  3370. letterSample[5][4] = 0;
  3371. for (int x = 0; x < 8; x++)
  3372. {
  3373. for (int y = 0; y < 18; y++)
  3374. {
  3375. cout << letterSample [x][y];
  3376. }
  3377. cout << endl;
  3378. }
  3379. cout << " " << endl;
  3380. }
  3381. else if (guess == 'r' || guess == 'R')
  3382. {
  3383. denmarkWord[0][10] = 'R';
  3384. cout << " " << endl;
  3385. for (int x = 0; x < 1; x++)
  3386. {
  3387. for (int y = 0; y < 13; y++)
  3388. {
  3389. cout << denmarkWord [x][y];
  3390. }
  3391. cout << endl;
  3392. }
  3393. letterSample[5][6] = 0;
  3394. for (int x = 0; x < 8; x++)
  3395. {
  3396. for (int y = 0; y < 18; y++)
  3397. {
  3398. cout << letterSample [x][y];
  3399. }
  3400. cout << endl;
  3401. }
  3402. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3403. }
  3404. else if (guess == 's' || guess == 'S')
  3405. {
  3406. letterSample[5][8] = 0;
  3407. for (int x = 0; x < 8; x++)
  3408. {
  3409. for (int y = 0; y < 18; y++)
  3410. {
  3411. cout << letterSample [x][y];
  3412. }
  3413. cout << endl;
  3414. }
  3415. cout << " " << endl;
  3416. }
  3417. else if (guess == 't' || guess == 'T')
  3418. {
  3419. letterSample[5][10] = 0;
  3420. for (int x = 0; x < 8; x++)
  3421. {
  3422. for (int y = 0; y < 18; y++)
  3423. {
  3424. cout << letterSample [x][y];
  3425. }
  3426. cout << endl;
  3427. }
  3428. cout << " " << endl;
  3429. }
  3430. else if (guess == 'u' || guess == 'U')
  3431. {
  3432. letterSample[5][12] = 0;
  3433. for (int x = 0; x < 8; x++)
  3434. {
  3435. for (int y = 0; y < 18; y++)
  3436. {
  3437. cout << letterSample [x][y];
  3438. }
  3439. cout << endl;
  3440. }
  3441. cout << " " << endl;
  3442. }
  3443. else if (guess == 'v' || guess == 'V')
  3444. {
  3445. letterSample[6][2] = 0;
  3446. for (int x = 0; x < 8; x++)
  3447. {
  3448. for (int y = 0; y < 18; y++)
  3449. {
  3450. cout << letterSample [x][y];
  3451. }
  3452. cout << endl;
  3453. }
  3454. cout << " " << endl;
  3455. }
  3456. else if (guess == 'w' || guess == 'W')
  3457. {
  3458. letterSample[6][4] = 0;
  3459. for (int x = 0; x < 8; x++)
  3460. {
  3461. for (int y = 0; y < 18; y++)
  3462. {
  3463. cout << letterSample [x][y];
  3464. }
  3465. cout << endl;
  3466. }
  3467. cout << " " << endl;
  3468. }
  3469. else if (guess == 'x' || guess == 'X')
  3470. {
  3471. letterSample[6][6] = 0;
  3472. for (int x = 0; x < 8; x++)
  3473. {
  3474. for (int y = 0; y < 18; y++)
  3475. {
  3476. cout << letterSample [x][y];
  3477. }
  3478. cout << endl;
  3479. }
  3480. cout << " " << endl;
  3481. }
  3482. else if (guess == 'y' || guess == 'Y')
  3483. {
  3484. letterSample[6][8] = 0;
  3485. for (int x = 0; x < 8; x++)
  3486. {
  3487. for (int y = 0; y < 18; y++)
  3488. {
  3489. cout << letterSample [x][y];
  3490. }
  3491. cout << endl;
  3492. }
  3493. cout << " " << endl;
  3494. }
  3495. else if (guess == 'z' || guess == 'Z')
  3496. {
  3497. letterSample[6][10] = 0;
  3498. for (int x = 0; x < 8; x++)
  3499. {
  3500. for (int y = 0; y < 18; y++)
  3501. {
  3502. cout << letterSample [x][y];
  3503. }
  3504. cout << endl;
  3505. }
  3506. cout << " " << endl;
  3507. }
  3508. else if (guess == '0')
  3509. {
  3510. token--;
  3511. if (token == 1)
  3512. {
  3513. for (int x = 0; x < 8; x++)
  3514. {
  3515. for (int y = 0; y < 18; y++)
  3516. {
  3517. cout << letterSample [x][y];
  3518. }
  3519. cout << endl;
  3520. }
  3521. for (int x = 0; x < 1; x++)
  3522. {
  3523. for (int y = 0; y < 13; y++)
  3524. {
  3525. cout << denmarkWord[x][y];
  3526. }
  3527. cout << endl;
  3528. }
  3529. cout << " " << endl;
  3530. cout << "Hint 1: This country is located in Europe." << endl;
  3531. }
  3532. else if (token == 0)
  3533. {
  3534. for (int x = 0; x < 8; x++)
  3535. {
  3536. for (int y = 0; y < 18; y++)
  3537. {
  3538. cout << letterSample [x][y];
  3539. }
  3540. cout << endl;
  3541. }
  3542. for (int x = 0; x < 1; x++)
  3543. {
  3544. for (int y = 0; y < 13; y++)
  3545. {
  3546. cout << denmarkWord [x][y];
  3547. }
  3548. cout << endl;
  3549. }
  3550. cout << " " << endl;
  3551. cout << "Hint 2: The country's flag has a cross near the center." << endl;
  3552. }
  3553. else
  3554. {
  3555. cout << "You have no more hints/token left. Sorry!" << endl;
  3556. for (int x = 0; x < 8; x++)
  3557. {
  3558. for (int y = 0; y < 18; y++)
  3559. {
  3560. cout << letterSample [x][y];
  3561. }
  3562. cout << endl;
  3563. }
  3564. for (int x = 0; x < 1; x++)
  3565. {
  3566. for (int y = 0; y < 13; y++)
  3567. {
  3568. cout << denmarkWord [x][y];
  3569. }
  3570. cout << endl;
  3571. }
  3572. }
  3573. }
  3574. if (guess == 'B' || guess == 'b' || guess == 'c' || guess == 'C' || guess == 'G' || guess == 'g' || guess == 'f' || guess == 'F' || guess == 'H' || guess == 'h' || guess == 'i' || guess == 'I' || guess == 'j' || guess == 'J' || guess == 'L' || guess == 'l' || guess == 'O' || guess == 'o' || guess == 'p' || guess == 'P' || guess == 'Q' || guess == 'q' || guess == 't' || guess == 'T' || guess == 'u' || guess == 'U' || guess == 'v' || guess == 'V' || guess == 's' || guess == 'S' || guess == 'W' || guess == 'w' || guess == 'X' || guess == 'x' || guess == 'Y' || guess == 'y' || guess == 'Z' || guess == 'z')
  3575. {
  3576. cout << "---------------------------------------------------------------" << endl;
  3577. for (int x = 0; x < 8; x++)
  3578. {
  3579. for (int y = 0; y < 18; y++)
  3580. {
  3581. cout << letterSample [x][y];
  3582. }
  3583. cout << endl;
  3584. }
  3585. for (int x = 0; x < 1; x++)
  3586. {
  3587. for (int y = 0; y < 13; y++)
  3588. {
  3589. cout << denmarkWord [x][y];
  3590. }
  3591. cout << endl;
  3592. }
  3593. wrongguess++;
  3594. if (wrongguess == 1)
  3595. {
  3596. cout << " _________ \n";
  3597. cout << "| | \n";
  3598. cout << "| 0 \n";
  3599. cout << "| \n";
  3600. cout << "| \n";
  3601. cout << "| \n";
  3602. cout << "| \n";
  3603. cout << " " << endl;
  3604. cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
  3605. }
  3606. else if (wrongguess == 2)
  3607. {
  3608. cout << " _________ \n";
  3609. cout << "| | \n";
  3610. cout << "| 0 \n";
  3611. cout << "| | \n";
  3612. cout << "| \n";
  3613. cout << "| \n";
  3614. cout << "| \n";
  3615. cout << " " << endl;
  3616. cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
  3617. }
  3618. else if (wrongguess == 3)
  3619. {
  3620. cout << " _________ \n";
  3621. cout << "| | \n";
  3622. cout << "| 0 \n";
  3623. cout << "| /| \n";
  3624. cout << "| \n";
  3625. cout << "| \n";
  3626. cout << "| \n";
  3627. cout << " " << endl;
  3628. cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
  3629. }
  3630. else if (wrongguess == 4)
  3631. {
  3632. cout << " _________ \n";
  3633. cout << "| | \n";
  3634. cout << "| 0 \n";
  3635. cout << "| /|\\ \n";
  3636. cout << "| \n";
  3637. cout << "| \n";
  3638. cout << "| \n";
  3639. cout << " " << endl;
  3640. cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
  3641. else if (wrongguess == 5)
  3642. {
  3643. cout << " _________ \n";
  3644. cout << "| | \n";
  3645. cout << "| 0 \n";
  3646. cout << "| /|\\ \n";
  3647. cout << "| / \n";
  3648. cout << "| \n";
  3649. cout << "| \n";
  3650. cout << " " << endl;
  3651. cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
  3652. }
  3653. else if (wrongguess == 6)
  3654. {
  3655. cout << " _________ \n";
  3656. cout << "| | \n";
  3657. cout << "| 0 \n";
  3658. cout << "| /|\\ \n";
  3659. cout << "| / \\ \n";
  3660. cout << "| \n";
  3661. cout << "| \n";
  3662. system("COLOR 0C");
  3663. printf;
  3664. cout << " " << endl;
  3665. cout << " +=====================================================================+ " << endl;
  3666. cout << " | | " << endl;
  3667. cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
  3668. cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
  3669. cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
  3670. cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
  3671. cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
  3672. cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
  3673. cout << " | | " << endl;
  3674. cout << " +=====================================================================+ " << endl;
  3675. cout << " " << endl;
  3676. cout << "You have lost the game, good luck next time!" << endl;
  3677. cout << " " << endl;
  3678. cout << "The correct word was: DENMARK." << endl;
  3679. break;
  3680. }
  3681. else
  3682. {
  3683. cout << " " << endl;
  3684. }
  3685. }
  3686. if (denmarkWord[0][0] == 'D' && denmarkWord[0][2] == 'E' && denmarkWord[0][4] == 'N' && denmarkWord[0][6] == 'M' && denmarkWord[0][8] == 'A' && denmarkWord[0][10] == 'R' && denmarkWord[0][12] == 'K')
  3687. {
  3688. system("COLOR 0A");
  3689. printf;
  3690. cout << " " << endl;
  3691. cout << " +============================================================+ " << endl;
  3692. cout << " | | " << endl;
  3693. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  3694. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  3695. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  3696. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  3697. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  3698. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  3699. cout << " | | " << endl;
  3700. cout << " +============================================================+ " << endl;
  3701. cout << " " << endl;
  3702. cout << "Congratulations! You have won!" << endl;
  3703. cout << " " << endl;
  3704. break;
  3705. }
  3706. }
  3707. }
  3708. else if (randCoun == 3) //italy
  3709. {
  3710. int category;
  3711. int wrongguess = 0;
  3712. int token = 2;
  3713. char letterSample[8][18] =
  3714. {
  3715. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  3716. {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
  3717. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  3718. {65,0,66,0,67,0,68,0,69,0,70,0,71},
  3719. {72,0,73,0,74,0,75,0,76,0,77,0,78},
  3720. {79,0,80,0,81,0,82,0,83,0,84,0,85},
  3721. {0,0,86,0,87,0,88,0,89,0,90,0,0},
  3722. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  3723. };
  3724. char italyWord[1][9] = {95,0,95,0,95,0,95,0,95};
  3725. int z;
  3726. cout << "---------------------------------------------------------------" << endl;
  3727. for (int x = 0; x < 8; x++)
  3728. {
  3729. for (int y = 0; y < 18; y++)
  3730. {
  3731. cout << letterSample [x][y];
  3732. }
  3733. cout << endl;
  3734. }
  3735. for (int x = 0; x < 1; x++)
  3736. {
  3737. for (int y = 0; y < 9; y++)
  3738. {
  3739. cout << italyWord [x][y];
  3740. }
  3741. cout << endl;
  3742. }
  3743. cout << " " << endl;
  3744. cout << " _________ \n";
  3745. cout << "| | \n";
  3746. cout << "| \n";
  3747. cout << "| \n";
  3748. cout << "| \n";
  3749. cout << "| \n";
  3750. cout << "| \n";
  3751. cout << " " << endl;
  3752. for (z = 0; z < 1000; z++)
  3753. {
  3754. char guess;
  3755. cout << " " << endl;
  3756. if (token >= 0)
  3757. {
  3758. cout << "-- Token(s) left: " << token << " --" << endl;
  3759. }
  3760. cout << " " << endl;
  3761. cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
  3762. cin >> guess;
  3763. cout << " " << endl;
  3764. cout << "---------------------------------------------------------------" << endl;
  3765. if (guess == 'a' || guess == 'A')
  3766. {
  3767. italyWord[0][4] = 'A';
  3768. cout << " " << endl;
  3769. for (int x = 0; x < 1; x++)
  3770. {
  3771. for (int y = 0; y < 9; y++)
  3772. {
  3773. cout << italyWord [x][y];
  3774. }
  3775. cout << endl;
  3776. }
  3777. letterSample[3][0] = 0;
  3778. for (int x = 0; x < 8; x++)
  3779. {
  3780. for (int y = 0; y < 18; y++)
  3781. {
  3782. cout << letterSample [x][y];
  3783. }
  3784. cout << endl;
  3785. }
  3786. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3787. }
  3788. else if (guess == 'b' || guess == 'B')
  3789. {
  3790. letterSample[3][2] = 0;
  3791. for (int x = 0; x < 8; x++)
  3792. {
  3793. for (int y = 0; y < 18; y++)
  3794. {
  3795. cout << letterSample [x][y];
  3796. }
  3797. cout << endl;
  3798. }
  3799. cout << " " << endl;
  3800. }
  3801. else if (guess == 'c' || guess == 'C')
  3802. {
  3803. letterSample[3][4] = 0;
  3804. for (int x = 0; x < 8; x++)
  3805. {
  3806. for (int y = 0; y < 18; y++)
  3807. {
  3808. cout << letterSample [x][y];
  3809. }
  3810. cout << endl;
  3811. }
  3812. cout << " " << endl;
  3813. }
  3814. else if (guess == 'd' || guess == 'D')
  3815. {
  3816. letterSample[3][6] = 0;
  3817. for (int x = 0; x < 8; x++)
  3818. {
  3819. for (int y = 0; y < 18; y++)
  3820. {
  3821. cout << letterSample [x][y];
  3822. }
  3823. cout << endl;
  3824. }
  3825. cout << " " << endl;
  3826. }
  3827. else if (guess == 'e' || guess == 'E')
  3828. {
  3829. letterSample[3][8] = 0;
  3830. for (int x = 0; x < 8; x++)
  3831. {
  3832. for (int y = 0; y < 18; y++)
  3833. {
  3834. cout << letterSample [x][y];
  3835. }
  3836. cout << endl;
  3837. }
  3838. cout << " " << endl;
  3839. }
  3840. else if (guess == 'f' || guess == 'F')
  3841. {
  3842. letterSample[3][10] = 0;
  3843. for (int x = 0; x < 8; x++)
  3844. {
  3845. for (int y = 0; y < 18; y++)
  3846. {
  3847. cout << letterSample [x][y];
  3848. }
  3849. cout << endl;
  3850. }
  3851. cout << " " << endl;
  3852. }
  3853. else if (guess == 'g' || guess == 'G')
  3854. {
  3855. letterSample[3][12] = 0;
  3856. for (int x = 0; x < 8; x++)
  3857. {
  3858. for (int y = 0; y < 18; y++)
  3859. {
  3860. cout << letterSample [x][y];
  3861. }
  3862. cout << endl;
  3863. }
  3864. cout << " " << endl;
  3865. }
  3866. else if (guess == 'h' || guess == 'H')
  3867. {
  3868. letterSample[4][0] = 0;
  3869. for (int x = 0; x < 8; x++)
  3870. {
  3871. for (int y = 0; y < 18; y++)
  3872. {
  3873. cout << letterSample [x][y];
  3874. }
  3875. cout << endl;
  3876. }
  3877. cout << " " << endl;
  3878. }
  3879. else if (guess == 'i' || guess == 'I')
  3880. {
  3881. italyWord[0][0] = 'I';
  3882. cout << " " << endl;
  3883. for (int x = 0; x < 1; x++)
  3884. {
  3885. for (int y = 0; y < 9; y++)
  3886. {
  3887. cout << italyWord [x][y];
  3888. }
  3889. cout << endl;
  3890. }
  3891. letterSample[4][2] = 0;
  3892. for (int x = 0; x < 8; x++)
  3893. {
  3894. for (int y = 0; y < 18; y++)
  3895. {
  3896. cout << letterSample [x][y];
  3897. }
  3898. cout << endl;
  3899. }
  3900. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3901. }
  3902. else if (guess == 'j' || guess == 'J')
  3903. {
  3904. letterSample[4][4] = 0;
  3905. for (int x = 0; x < 8; x++)
  3906. {
  3907. for (int y = 0; y < 18; y++)
  3908. {
  3909. cout << letterSample [x][y];
  3910. }
  3911. cout << endl;
  3912. }
  3913. cout << " " << endl;
  3914. }
  3915. else if (guess == 'k' || guess == 'K')
  3916. {
  3917. letterSample[4][6] = 0;
  3918. for (int x = 0; x < 8; x++)
  3919. {
  3920. for (int y = 0; y < 18; y++)
  3921. {
  3922. cout << letterSample [x][y];
  3923. }
  3924. cout << endl;
  3925. }
  3926. cout << " " << endl;
  3927. }
  3928. else if (guess == 'l' || guess == 'L')
  3929. {
  3930. italyWord[0][6] = 'L';
  3931. cout << " " << endl;
  3932. for (int x = 0; x < 1; x++)
  3933. {
  3934. for (int y = 0; y < 9; y++)
  3935. {
  3936. cout << italyWord [x][y];
  3937. }
  3938. cout << endl;
  3939. }
  3940. letterSample[4][8] = 0;
  3941. for (int x = 0; x < 8; x++)
  3942. {
  3943. for (int y = 0; y < 18; y++)
  3944. {
  3945. cout << letterSample [x][y];
  3946. }
  3947. cout << endl;
  3948. }
  3949. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  3950. }
  3951. else if (guess == 'm' || guess == 'M')
  3952. {
  3953. letterSample[4][10] = 0;
  3954. for (int x = 0; x < 8; x++)
  3955. {
  3956. for (int y = 0; y < 18; y++)
  3957. {
  3958. cout << letterSample [x][y];
  3959. }
  3960. cout << endl;
  3961. }
  3962. cout << " " << endl;
  3963. }
  3964. else if (guess == 'n' || guess == 'N')
  3965. {
  3966. letterSample[4][12] = 0;
  3967. for (int x = 0; x < 8; x++)
  3968. {
  3969. for (int y = 0; y < 18; y++)
  3970. {
  3971. cout << letterSample [x][y];
  3972. }
  3973. cout << endl;
  3974. }
  3975. cout << " " << endl;
  3976. }
  3977. else if (guess == 'o' || guess == 'O')
  3978. {
  3979. letterSample[5][0] = 0;
  3980. for (int x = 0; x < 8; x++)
  3981. {
  3982. for (int y = 0; y < 18; y++)
  3983. {
  3984. cout << letterSample [x][y];
  3985. }
  3986. cout << endl;
  3987. }
  3988. cout << " " << endl;
  3989. }
  3990. else if (guess == 'p' || guess == 'P')
  3991. {
  3992. letterSample[5][2] = 0;
  3993. for (int x = 0; x < 8; x++)
  3994. {
  3995. for (int y = 0; y < 18; y++)
  3996. {
  3997. cout << letterSample [x][y];
  3998. }
  3999. cout << endl;
  4000. }
  4001. cout << " " << endl;
  4002. }
  4003. else if (guess == 'q' || guess == 'Q')
  4004. {
  4005. letterSample[5][4] = 0;
  4006. for (int x = 0; x < 8; x++)
  4007. {
  4008. for (int y = 0; y < 18; y++)
  4009. {
  4010. cout << letterSample [x][y];
  4011. }
  4012. cout << endl;
  4013. }
  4014. cout << " " << endl;
  4015. }
  4016. else if (guess == 'r' || guess == 'R')
  4017. {
  4018. letterSample[5][6] = 0;
  4019. for (int x = 0; x < 8; x++)
  4020. {
  4021. for (int y = 0; y < 18; y++)
  4022. {
  4023. cout << letterSample [x][y];
  4024. }
  4025. cout << endl;
  4026. }
  4027. cout << " " << endl;
  4028. }
  4029. else if (guess == 's' || guess == 'S')
  4030. {
  4031. letterSample[5][8] = 0;
  4032. for (int x = 0; x < 8; x++)
  4033. {
  4034. for (int y = 0; y < 18; y++)
  4035. {
  4036. cout << letterSample [x][y];
  4037. }
  4038. cout << endl;
  4039. }
  4040. cout << " " << endl;
  4041. }
  4042. else if (guess == 't' || guess == 'T')
  4043. {
  4044. italyWord[0][2] = 'T';
  4045. cout << " " << endl;
  4046. for (int x = 0; x < 1; x++)
  4047. {
  4048. for (int y = 0; y < 9; y++)
  4049. {
  4050. cout << italyWord [x][y];
  4051. }
  4052. cout << endl;
  4053. }
  4054. letterSample[5][10] = 0;
  4055. for (int x = 0; x < 8; x++)
  4056. {
  4057. for (int y = 0; y < 18; y++)
  4058. {
  4059. cout << letterSample [x][y];
  4060. }
  4061. cout << endl;
  4062. }
  4063. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  4064. }
  4065. else if (guess == 'u' || guess == 'U')
  4066. {
  4067. letterSample[5][12] = 0;
  4068. for (int x = 0; x < 8; x++)
  4069. {
  4070. for (int y = 0; y < 18; y++)
  4071. {
  4072. cout << letterSample [x][y];
  4073. }
  4074. cout << endl;
  4075. }
  4076. cout << " " << endl;
  4077. }
  4078. else if (guess == 'v' || guess == 'V')
  4079. {
  4080. letterSample[6][2] = 0;
  4081. for (int x = 0; x < 8; x++)
  4082. {
  4083. for (int y = 0; y < 18; y++)
  4084. {
  4085. cout << letterSample [x][y];
  4086. }
  4087. cout << endl;
  4088. }
  4089. cout << " " << endl;
  4090. }
  4091. else if (guess == 'w' || guess == 'W')
  4092. {
  4093. letterSample[6][4] = 0;
  4094. for (int x = 0; x < 8; x++)
  4095. {
  4096. for (int y = 0; y < 18; y++)
  4097. {
  4098. cout << letterSample [x][y];
  4099. }
  4100. cout << endl;
  4101. }
  4102. cout << " " << endl;
  4103. }
  4104. else if (guess == 'x' || guess == 'X')
  4105. {
  4106. letterSample[6][6] = 0;
  4107. for (int x = 0; x < 8; x++)
  4108. {
  4109. for (int y = 0; y < 18; y++)
  4110. {
  4111. cout << letterSample [x][y];
  4112. }
  4113. cout << endl;
  4114. }
  4115. cout << " " << endl;
  4116. }
  4117. else if (guess == 'y' || guess == 'Y')
  4118. {
  4119. italyWord[0][8] = 'Y';
  4120. cout << " " << endl;
  4121. for (int x = 0; x < 1; x++)
  4122. {
  4123. for (int y = 0; y < 9; y++)
  4124. {
  4125. cout << italyWord [x][y];
  4126. }
  4127. cout << endl;
  4128. }
  4129. letterSample[6][8] = 0;
  4130. for (int x = 0; x < 8; x++)
  4131. {
  4132. for (int y = 0; y < 18; y++)
  4133. {
  4134. cout << letterSample [x][y];
  4135. }
  4136. cout << endl;
  4137. }
  4138. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  4139. }
  4140. else if (guess == 'z' || guess == 'Z')
  4141. {
  4142. letterSample[6][10] = 0;
  4143. for (int x = 0; x < 8; x++)
  4144. {
  4145. for (int y = 0; y < 18; y++)
  4146. {
  4147. cout << letterSample [x][y];
  4148. }
  4149. cout << endl;
  4150. }
  4151. cout << " " << endl;
  4152. }
  4153. else if (guess == '0')
  4154. {
  4155. token--;
  4156. if (token == 1)
  4157. {
  4158. for (int x = 0; x < 8; x++)
  4159. {
  4160. for (int y = 0; y < 18; y++)
  4161. {
  4162. cout << letterSample [x][y];
  4163. }
  4164. cout << endl;
  4165. }
  4166. for (int x = 0; x < 1; x++)
  4167. {
  4168. for (int y = 0; y < 9; y++)
  4169. {
  4170. cout << italyWord[x][y];
  4171. }
  4172. cout << endl;
  4173. }
  4174. cout << " " << endl;
  4175. cout << "Hint 1: This country is located in Europe." << endl;
  4176. }
  4177. else if (token == 0)
  4178. {
  4179. for (int x = 0; x < 8; x++)
  4180. {
  4181. for (int y = 0; y < 18; y++)
  4182. {
  4183. cout << letterSample [x][y];
  4184. }
  4185. cout << endl;
  4186. }
  4187. for (int x = 0; x < 1; x++)
  4188. {
  4189. for (int y = 0; y < 9; y++)
  4190. {
  4191. cout << italyWord [x][y];
  4192. }
  4193. cout << endl;
  4194. }
  4195. cout << " " << endl;
  4196. cout << "Hint 2: The country's flag consists of 3 vertical stripes." << endl;
  4197. }
  4198. else
  4199. {
  4200. cout << "You have no more hints/token left. Sorry!" << endl;
  4201. for (int x = 0; x < 8; x++)
  4202. {
  4203. for (int y = 0; y < 18; y++)
  4204. {
  4205. cout << letterSample [x][y];
  4206. }
  4207. cout << endl;
  4208. }
  4209. for (int x = 0; x < 1; x++)
  4210. {
  4211. for (int y = 0; y < 9; y++)
  4212. {
  4213. cout << italyWord [x][y];
  4214. }
  4215. cout << endl;
  4216. }
  4217. }
  4218. }
  4219. if (guess == 'B' || guess == 'b' || guess == 'C' || guess == 'c' || guess == 'D' || guess == 'd' || guess == 'E' || guess == 'e' || guess == 'G' || guess == 'g' || guess == 'f' || guess == 'F' || guess == 'H' || guess == 'h' || guess == 'j' || guess == 'J' || guess == 'K' || guess == 'k' || guess == 'M' || guess == 'm' || guess == 'n' || guess == 'N' || guess == 'O' || guess == 'o' || guess == 'p' || guess == 'P' || guess == 'Q' || guess == 'q' || guess == 'r' || guess == 'R' || guess == 's' || guess == 'S' || guess == 'u' || guess == 'U' || guess == 'v' || guess == 'V' || guess == 'W' || guess == 'w' || guess == 'X' || guess == 'x' || guess == 'Z' || guess == 'z')
  4220. {
  4221. cout << "---------------------------------------------------------------" << endl;
  4222. for (int x = 0; x < 8; x++)
  4223. {
  4224. for (int y = 0; y < 18; y++)
  4225. {
  4226. cout << letterSample [x][y];
  4227. }
  4228. cout << endl;
  4229. }
  4230. for (int x = 0; x < 1; x++)
  4231. {
  4232. for (int y = 0; y < 9; y++)
  4233. {
  4234. cout << italyWord [x][y];
  4235. }
  4236. cout << endl;
  4237. }
  4238. wrongguess++;
  4239. if (wrongguess == 1)
  4240. {
  4241. cout << " _________ \n";
  4242. cout << "| | \n";
  4243. cout << "| 0 \n";
  4244. cout << "| \n";
  4245. cout << "| \n";
  4246. cout << "| \n";
  4247. cout << "| \n";
  4248. cout << " " << endl;
  4249. cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
  4250. }
  4251. else if (wrongguess == 2)
  4252. {
  4253. cout << " _________ \n";
  4254. cout << "| | \n";
  4255. cout << "| 0 \n";
  4256. cout << "| | \n";
  4257. cout << "| \n";
  4258. cout << "| \n";
  4259. cout << "| \n";
  4260. cout << " " << endl;
  4261. cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
  4262. }
  4263. else if (wrongguess == 3)
  4264. {
  4265. cout << " _________ \n";
  4266. cout << "| | \n";
  4267. cout << "| 0 \n";
  4268. cout << "| /| \n";
  4269. cout << "| \n";
  4270. cout << "| \n";
  4271. cout << "| \n";
  4272. cout << " " << endl;
  4273. cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
  4274. }
  4275. else if (wrongguess == 4)
  4276. {
  4277. cout << " _________ \n";
  4278. cout << "| | \n";
  4279. cout << "| 0 \n";
  4280. cout << "| /|\\ \n";
  4281. cout << "| \n";
  4282. cout << "| \n";
  4283. cout << "| \n";
  4284. cout << " " << endl;
  4285. cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
  4286. else if (wrongguess == 5)
  4287. {
  4288. cout << " _________ \n";
  4289. cout << "| | \n";
  4290. cout << "| 0 \n";
  4291. cout << "| /|\\ \n";
  4292. cout << "| / \n";
  4293. cout << "| \n";
  4294. cout << "| \n";
  4295. cout << " " << endl;
  4296. cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
  4297. }
  4298. else if (wrongguess == 6)
  4299. {
  4300. cout << " _________ \n";
  4301. cout << "| | \n";
  4302. cout << "| 0 \n";
  4303. cout << "| /|\\ \n";
  4304. cout << "| / \\ \n";
  4305. cout << "| \n";
  4306. cout << "| \n";
  4307. system("COLOR 0C");
  4308. printf;
  4309. cout << " " << endl;
  4310. cout << " +=====================================================================+ " << endl;
  4311. cout << " | | " << endl;
  4312. cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
  4313. cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
  4314. cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
  4315. cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
  4316. cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
  4317. cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
  4318. cout << " | | " << endl;
  4319. cout << " +=====================================================================+ " << endl;
  4320. cout << " " << endl;
  4321. cout << "You have lost the game, good luck next time!" << endl;
  4322. cout << " " << endl;
  4323. cout << "The correct word was: ITALY." << endl;
  4324. break;
  4325. }
  4326. else
  4327. {
  4328. cout << " " << endl;
  4329. }
  4330. }
  4331. if (italyWord[0][0] == 'I' && italyWord[0][2] == 'T' && italyWord[0][4] == 'A' && italyWord[0][6] == 'L' && italyWord[0][8] == 'Y')
  4332. {
  4333. system("COLOR 0A");
  4334. printf;
  4335. cout << " " << endl;
  4336. cout << " +============================================================+ " << endl;
  4337. cout << " | | " << endl;
  4338. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  4339. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  4340. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  4341. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  4342. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  4343. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  4344. cout << " | | " << endl;
  4345. cout << " +============================================================+ " << endl;
  4346. cout << " " << endl;
  4347. cout << "Congratulations! You have won!" << endl;
  4348. cout << " " << endl;
  4349. break;
  4350. }
  4351. }
  4352. }
  4353. }
  4354. else if (category == 3)
  4355. {
  4356. cout << "You have chosen the Animals category." << endl;
  4357. srand(time(NULL));
  4358. int randAni = (rand() % 3) + 1;
  4359. cin >> wordANI;
  4360. if (randAni == 1) //panther
  4361. {
  4362. int category;
  4363. int wrongguess = 0;
  4364. int token = 2;
  4365. char letterSample[8][18] =
  4366. {
  4367. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  4368. {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
  4369. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  4370. {65,0,66,0,67,0,68,0,69,0,70,0,71},
  4371. {72,0,73,0,74,0,75,0,76,0,77,0,78},
  4372. {79,0,80,0,81,0,82,0,83,0,84,0,85},
  4373. {0,0,86,0,87,0,88,0,89,0,90,0,0},
  4374. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  4375. };
  4376. char pantherWord[1][13] = {95,0,95,0,95,0,95,0,95,0,95,0,95};
  4377. int z;
  4378. cout << "---------------------------------------------------------------" << endl;
  4379. for (int x = 0; x < 8; x++)
  4380. {
  4381. for (int y = 0; y < 18; y++)
  4382. {
  4383. cout << letterSample [x][y];
  4384. }
  4385. cout << endl;
  4386. }
  4387. for (int x = 0; x < 1; x++)
  4388. {
  4389. for (int y = 0; y < 13; y++)
  4390. {
  4391. cout << pantherWord [x][y];
  4392. }
  4393. cout << endl;
  4394. }
  4395. cout << " " << endl;
  4396. cout << " _________ \n";
  4397. cout << "| | \n";
  4398. cout << "| \n";
  4399. cout << "| \n";
  4400. cout << "| \n";
  4401. cout << "| \n";
  4402. cout << "| \n";
  4403. cout << " " << endl;
  4404. for (z = 0; z < 1000; z++)
  4405. {
  4406. char guess;
  4407. cout << " " << endl;
  4408. if (token >= 0)
  4409. {
  4410. cout << "-- Token(s) left: " << token << " --" << endl;
  4411. }
  4412. cout << " " << endl;
  4413. cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
  4414. cin >> guess;
  4415. cout << " " << endl;
  4416. cout << "---------------------------------------------------------------" << endl;
  4417. if (guess == 'a' || guess == 'A')
  4418. {
  4419. pantherWord[0][2] = 'A';
  4420. cout << " " << endl;
  4421. for (int x = 0; x < 1; x++)
  4422. {
  4423. for (int y = 0; y < 13; y++)
  4424. {
  4425. cout << pantherWord [x][y];
  4426. }
  4427. cout << endl;
  4428. }
  4429. letterSample[3][0] = 0;
  4430. for (int x = 0; x < 8; x++)
  4431. {
  4432. for (int y = 0; y < 18; y++)
  4433. {
  4434. cout << letterSample [x][y];
  4435. }
  4436. cout << endl;
  4437. }
  4438. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  4439. }
  4440. else if (guess == 'b' || guess == 'B')
  4441. {
  4442. letterSample[3][2] = 0;
  4443. for (int x = 0; x < 8; x++)
  4444. {
  4445. for (int y = 0; y < 18; y++)
  4446. {
  4447. cout << letterSample [x][y];
  4448. }
  4449. cout << endl;
  4450. }
  4451. cout << " " << endl;
  4452. }
  4453. else if (guess == 'c' || guess == 'C')
  4454. {
  4455. letterSample[3][4] = 0;
  4456. for (int x = 0; x < 8; x++)
  4457. {
  4458. for (int y = 0; y < 18; y++)
  4459. {
  4460. cout << letterSample [x][y];
  4461. }
  4462. cout << endl;
  4463. }
  4464. cout << " " << endl;
  4465. }
  4466. else if (guess == 'd' || guess == 'D')
  4467. {
  4468. letterSample[3][6] = 0;
  4469. for (int x = 0; x < 8; x++)
  4470. {
  4471. for (int y = 0; y < 18; y++)
  4472. {
  4473. cout << letterSample [x][y];
  4474. }
  4475. cout << endl;
  4476. }
  4477. cout << " " << endl;
  4478. }
  4479. else if (guess == 'e' || guess == 'E')
  4480. {
  4481. pantherWord[0][10] = 'E';
  4482. cout << " " << endl;
  4483. for (int x = 0; x < 1; x++)
  4484. {
  4485. for (int y = 0; y < 13; y++)
  4486. {
  4487. cout << pantherWord [x][y];
  4488. }
  4489. cout << endl;
  4490. }
  4491. letterSample[3][8] = 0;
  4492. for (int x = 0; x < 8; x++)
  4493. {
  4494. for (int y = 0; y < 18; y++)
  4495. {
  4496. cout << letterSample [x][y];
  4497. }
  4498. cout << endl;
  4499. }
  4500. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  4501. }
  4502. else if (guess == 'f' || guess == 'F')
  4503. {
  4504. letterSample[3][10] = 0;
  4505. for (int x = 0; x < 8; x++)
  4506. {
  4507. for (int y = 0; y < 18; y++)
  4508. {
  4509. cout << letterSample [x][y];
  4510. }
  4511. cout << endl;
  4512. }
  4513. cout << " " << endl;
  4514. }
  4515. else if (guess == 'g' || guess == 'G')
  4516. {
  4517. letterSample[3][12] = 0;
  4518. for (int x = 0; x < 8; x++)
  4519. {
  4520. for (int y = 0; y < 18; y++)
  4521. {
  4522. cout << letterSample [x][y];
  4523. }
  4524. cout << endl;
  4525. }
  4526. cout << " " << endl;
  4527. }
  4528. else if (guess == 'h' || guess == 'H')
  4529. {
  4530. pantherWord[0][8] = 'H';
  4531. cout << " " << endl;
  4532. for (int x = 0; x < 1; x++)
  4533. {
  4534. for (int y = 0; y < 13; y++)
  4535. {
  4536. cout << pantherWord [x][y];
  4537. }
  4538. cout << endl;
  4539. }
  4540. letterSample[4][0] = 0;
  4541. for (int x = 0; x < 8; x++)
  4542. {
  4543. for (int y = 0; y < 18; y++)
  4544. {
  4545. cout << letterSample [x][y];
  4546. }
  4547. cout << endl;
  4548. }
  4549. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  4550. }
  4551. else if (guess == 'i' || guess == 'I')
  4552. {
  4553. letterSample[4][2] = 0;
  4554. for (int x = 0; x < 8; x++)
  4555. {
  4556. for (int y = 0; y < 18; y++)
  4557. {
  4558. cout << letterSample [x][y];
  4559. }
  4560. cout << endl;
  4561. }
  4562. cout << " " << endl;
  4563. }
  4564. else if (guess == 'j' || guess == 'J')
  4565. {
  4566. letterSample[4][4] = 0;
  4567. for (int x = 0; x < 8; x++)
  4568. {
  4569. for (int y = 0; y < 18; y++)
  4570. {
  4571. cout << letterSample [x][y];
  4572. }
  4573. cout << endl;
  4574. }
  4575. cout << " " << endl;
  4576. }
  4577. else if (guess == 'k' || guess == 'K')
  4578. {
  4579. letterSample[4][6] = 0;
  4580. for (int x = 0; x < 8; x++)
  4581. {
  4582. for (int y = 0; y < 18; y++)
  4583. {
  4584. cout << letterSample [x][y];
  4585. }
  4586. cout << endl;
  4587. }
  4588. cout << " " << endl;
  4589. }
  4590. else if (guess == 'l' || guess == 'L')
  4591. {
  4592. letterSample[4][8] = 0;
  4593. for (int x = 0; x < 8; x++)
  4594. {
  4595. for (int y = 0; y < 18; y++)
  4596. {
  4597. cout << letterSample [x][y];
  4598. }
  4599. cout << endl;
  4600. }
  4601. cout << " " << endl;
  4602. }
  4603. else if (guess == 'm' || guess == 'M')
  4604. {
  4605. letterSample[4][10] = 0;
  4606. for (int x = 0; x < 8; x++)
  4607. {
  4608. for (int y = 0; y < 18; y++)
  4609. {
  4610. cout << letterSample [x][y];
  4611. }
  4612. cout << endl;
  4613. }
  4614. cout << " " << endl;
  4615. }
  4616. else if (guess == 'n' || guess == 'N')
  4617. {
  4618. pantherWord[0][4] = 'N';
  4619. cout << " " << endl;
  4620. for (int x = 0; x < 1; x++)
  4621. {
  4622. for (int y = 0; y < 13; y++)
  4623. {
  4624. cout << pantherWord [x][y];
  4625. }
  4626. cout << endl;
  4627. }
  4628. letterSample[4][12] = 0;
  4629. for (int x = 0; x < 8; x++)
  4630. {
  4631. for (int y = 0; y < 18; y++)
  4632. {
  4633. cout << letterSample [x][y];
  4634. }
  4635. cout << endl;
  4636. }
  4637. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  4638. }
  4639. else if (guess == 'o' || guess == 'O')
  4640. {
  4641. letterSample[5][0] = 0;
  4642. for (int x = 0; x < 8; x++)
  4643. {
  4644. for (int y = 0; y < 18; y++)
  4645. {
  4646. cout << letterSample [x][y];
  4647. }
  4648. cout << endl;
  4649. }
  4650. cout << " " << endl;
  4651. }
  4652. else if (guess == 'p' || guess == 'P')
  4653. {
  4654. pantherWord[0][0] = 'P';
  4655. cout << " " << endl;
  4656. for (int x = 0; x < 1; x++)
  4657. {
  4658. for (int y = 0; y < 13; y++)
  4659. {
  4660. cout << pantherWord [x][y];
  4661. }
  4662. cout << endl;
  4663. }
  4664. letterSample[5][2] = 0;
  4665. for (int x = 0; x < 8; x++)
  4666. {
  4667. for (int y = 0; y < 18; y++)
  4668. {
  4669. cout << letterSample [x][y];
  4670. }
  4671. cout << endl;
  4672. }
  4673. cout << "Correct - Congratulations! You have entered a correct letter." << endl;cout << " " << endl;
  4674. }
  4675. else if (guess == 'q' || guess == 'Q')
  4676. {
  4677. letterSample[5][4] = 0;
  4678. for (int x = 0; x < 8; x++)
  4679. {
  4680. for (int y = 0; y < 18; y++)
  4681. {
  4682. cout << letterSample [x][y];
  4683. }
  4684. cout << endl;
  4685. }
  4686. cout << " " << endl;
  4687. }
  4688. else if (guess == 'r' || guess == 'R')
  4689. {
  4690. pantherWord[0][12] = 'R';
  4691. cout << " " << endl;
  4692. for (int x = 0; x < 1; x++)
  4693. {
  4694. for (int y = 0; y < 13; y++)
  4695. {
  4696. cout << pantherWord [x][y];
  4697. }
  4698. cout << endl;
  4699. }
  4700. letterSample[5][6] = 0;
  4701. for (int x = 0; x < 8; x++)
  4702. {
  4703. for (int y = 0; y < 18; y++)
  4704. {
  4705. cout << letterSample [x][y];
  4706. }
  4707. cout << endl;
  4708. }
  4709. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  4710. }
  4711. else if (guess == 's' || guess == 'S')
  4712. {
  4713. letterSample[5][8] = 0;
  4714. for (int x = 0; x < 8; x++)
  4715. {
  4716. for (int y = 0; y < 18; y++)
  4717. {
  4718. cout << letterSample [x][y];
  4719. }
  4720. cout << endl;
  4721. }
  4722. cout << " " << endl;
  4723. }
  4724. else if (guess == 't' || guess == 'T')
  4725. {
  4726. pantherWord[0][6] = 'T';
  4727. cout << " " << endl;
  4728. for (int x = 0; x < 1; x++)
  4729. {
  4730. for (int y = 0; y < 13; y++)
  4731. {
  4732. cout << pantherWord [x][y];
  4733. }
  4734. cout << endl;
  4735. }
  4736. letterSample[5][10] = 0;
  4737. for (int x = 0; x < 8; x++)
  4738. {
  4739. for (int y = 0; y < 18; y++)
  4740. {
  4741. cout << letterSample [x][y];
  4742. }
  4743. cout << endl;
  4744. }
  4745. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  4746. }
  4747. else if (guess == 'u' || guess == 'U')
  4748. {
  4749. letterSample[5][12] = 0;
  4750. for (int x = 0; x < 8; x++)
  4751. {
  4752. for (int y = 0; y < 18; y++)
  4753. {
  4754. cout << letterSample [x][y];
  4755. }
  4756. cout << endl;
  4757. }
  4758. cout << " " << endl;
  4759. }
  4760. else if (guess == 'v' || guess == 'V')
  4761. {
  4762. letterSample[6][2] = 0;
  4763. for (int x = 0; x < 8; x++)
  4764. {
  4765. for (int y = 0; y < 18; y++)
  4766. {
  4767. cout << letterSample [x][y];
  4768. }
  4769. cout << endl;
  4770. }
  4771. cout << " " << endl;
  4772. }
  4773. else if (guess == 'w' || guess == 'W')
  4774. {
  4775. letterSample[6][4] = 0;
  4776. for (int x = 0; x < 8; x++)
  4777. {
  4778. for (int y = 0; y < 18; y++)
  4779. {
  4780. cout << letterSample [x][y];
  4781. }
  4782. cout << endl;
  4783. }
  4784. cout << " " << endl;
  4785. }
  4786. else if (guess == 'x' || guess == 'X')
  4787. {
  4788. letterSample[6][6] = 0;
  4789. for (int x = 0; x < 8; x++)
  4790. {
  4791. for (int y = 0; y < 18; y++)
  4792. {
  4793. cout << letterSample [x][y];
  4794. }
  4795. cout << endl;
  4796. }
  4797. cout << " " << endl;
  4798. }
  4799. else if (guess == 'y' || guess == 'Y')
  4800. {
  4801. letterSample[6][8] = 0;
  4802. for (int x = 0; x < 8; x++)
  4803. {
  4804. for (int y = 0; y < 18; y++)
  4805. {
  4806. cout << letterSample [x][y];
  4807. }
  4808. cout << endl;
  4809. }
  4810. cout << " " << endl;
  4811. }
  4812. else if (guess == 'z' || guess == 'Z')
  4813. {
  4814. letterSample[6][10] = 0;
  4815. for (int x = 0; x < 8; x++)
  4816. {
  4817. for (int y = 0; y < 18; y++)
  4818. {
  4819. cout << letterSample [x][y];
  4820. }
  4821. cout << endl;
  4822. }
  4823. cout << " " << endl;
  4824. }
  4825. else if (guess == '0')
  4826. {
  4827. token--;
  4828. if (token == 1)
  4829. {
  4830. for (int x = 0; x < 8; x++)
  4831. {
  4832. for (int y = 0; y < 18; y++)
  4833. {
  4834. cout << letterSample [x][y];
  4835. }
  4836. cout << endl;
  4837. }
  4838. for (int x = 0; x < 1; x++)
  4839. {
  4840. for (int y = 0; y < 13; y++)
  4841. {
  4842. cout << pantherWord[x][y];
  4843. }
  4844. cout << endl;
  4845. }
  4846. cout << " " << endl;
  4847. cout << "Hint 1: The animal is part of the cat family." << endl;
  4848. }
  4849. else if (token == 0)
  4850. {
  4851. for (int x = 0; x < 8; x++)
  4852. {
  4853. for (int y = 0; y < 18; y++)
  4854. {
  4855. cout << letterSample [x][y];
  4856. }
  4857. cout << endl;
  4858. }
  4859. for (int x = 0; x < 1; x++)
  4860. {
  4861. for (int y = 0; y < 13; y++)
  4862. {
  4863. cout << pantherWord [x][y];
  4864. }
  4865. cout << endl;
  4866. }
  4867. cout << " " << endl;
  4868. cout << "Hint 2: The animal is the mascot of an NFL team." << endl;
  4869. }
  4870. else
  4871. {
  4872. cout << "You have no more hints/token left. Sorry!" << endl;
  4873. for (int x = 0; x < 8; x++)
  4874. {
  4875. for (int y = 0; y < 18; y++)
  4876. {
  4877. cout << letterSample [x][y];
  4878. }
  4879. cout << endl;
  4880. }
  4881. for (int x = 0; x < 1; x++)
  4882. {
  4883. for (int y = 0; y < 13; y++)
  4884. {
  4885. cout << pantherWord [x][y];
  4886. }
  4887. cout << endl;
  4888. }
  4889. }
  4890. }
  4891.  
  4892. if (guess == 'B' || guess == 'b' || guess == 'C' || guess == 'c' || guess == 'D' || guess == 'd' || guess == 'G' || guess == 'g' || guess == 'f' || guess == 'F' || guess == 'i' || guess == 'I' || guess == 'j' || guess == 'J' || guess == 'K' || guess == 'k' || guess == 'M' || guess == 'm' || guess == 'l' || guess == 'L' || guess == 'O' || guess == 'o' || guess == 'Q' || guess == 'q' || guess == 's' || guess == 'S' || guess == 'u' || guess == 'U' || guess == 'v' || guess == 'V' || guess == 'W' || guess == 'w' || guess == 'X' || guess == 'x' || guess == 'Y' || guess == 'y' || guess == 'Z' || guess == 'z')
  4893. {
  4894. cout << "---------------------------------------------------------------" << endl;
  4895. for (int x = 0; x < 8; x++)
  4896. {
  4897. for (int y = 0; y < 18; y++)
  4898. {
  4899. cout << letterSample [x][y];
  4900. }
  4901. cout << endl;
  4902. }
  4903. for (int x = 0; x < 1; x++)
  4904. {
  4905. for (int y = 0; y < 13; y++)
  4906. {
  4907. cout << pantherWord [x][y];
  4908. }
  4909. cout << endl;
  4910. }
  4911. wrongguess++;
  4912. if (wrongguess == 1)
  4913. {
  4914. cout << " _________ \n";
  4915. cout << "| | \n";
  4916. cout << "| 0 \n";
  4917. cout << "| \n";
  4918. cout << "| \n";
  4919. cout << "| \n";
  4920. cout << "| \n";
  4921. cout << " " << endl;
  4922. cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
  4923. }
  4924. else if (wrongguess == 2)
  4925. {
  4926. cout << " _________ \n";
  4927. cout << "| | \n";
  4928. cout << "| 0 \n";
  4929. cout << "| | \n";
  4930. cout << "| \n";
  4931. cout << "| \n";
  4932. cout << "| \n";
  4933. cout << " " << endl;
  4934. cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
  4935. }
  4936. else if (wrongguess == 3)
  4937. {
  4938. cout << " _________ \n";
  4939. cout << "| | \n";
  4940. cout << "| 0 \n";
  4941. cout << "| /| \n";
  4942. cout << "| \n";
  4943. cout << "| \n";
  4944. cout << "| \n";
  4945. cout << " " << endl;
  4946. cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
  4947. }
  4948. else if (wrongguess == 4)
  4949. {
  4950. cout << " _________ \n";
  4951. cout << "| | \n";
  4952. cout << "| 0 \n";
  4953. cout << "| /|\\ \n";
  4954. cout << "| \n";
  4955. cout << "| \n";
  4956. cout << "| \n";
  4957. cout << " " << endl;
  4958. cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
  4959. else if (wrongguess == 5)
  4960. {
  4961. cout << " _________ \n";
  4962. cout << "| | \n";
  4963. cout << "| 0 \n";
  4964. cout << "| /|\\ \n";
  4965. cout << "| / \n";
  4966. cout << "| \n";
  4967. cout << "| \n";
  4968. cout << " " << endl;
  4969. cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
  4970. }
  4971. else if (wrongguess == 6)
  4972. {
  4973. cout << " _________ \n";
  4974. cout << "| | \n";
  4975. cout << "| 0 \n";
  4976. cout << "| /|\\ \n";
  4977. cout << "| / \\ \n";
  4978. cout << "| \n";
  4979. cout << "| \n";
  4980. system("COLOR 0C");
  4981. printf;
  4982. cout << " " << endl;
  4983. cout << " +=====================================================================+ " << endl;
  4984. cout << " | | " << endl;
  4985. cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
  4986. cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
  4987. cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
  4988. cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
  4989. cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
  4990. cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
  4991. cout << " | | " << endl;
  4992. cout << " +=====================================================================+ " << endl;
  4993. cout << " " << endl;
  4994. cout << "You have lost the game, good luck next time!" << endl;
  4995. cout << " " << endl;
  4996. cout << "The correct word was: PANTHER." << endl;
  4997. break;
  4998. }
  4999. else
  5000. {
  5001. cout << " " << endl;
  5002. }
  5003. }
  5004. if (pantherWord[0][0] == 'P' && pantherWord[0][2] == 'A' && pantherWord[0][4] == 'N' && pantherWord[0][6] == 'T' && pantherWord[0][8] == 'H' && pantherWord[0][10] == 'E' && pantherWord[0][12] == 'R')
  5005. {
  5006. system("COLOR 0A");
  5007. printf;
  5008. cout << " " << endl;
  5009. cout << " +============================================================+ " << endl;
  5010. cout << " | | " << endl;
  5011. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  5012. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  5013. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  5014. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  5015. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  5016. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  5017. cout << " | | " << endl;
  5018. cout << " +============================================================+ " << endl;
  5019. cout << " " << endl;
  5020. cout << "Congratulations! You have won!" << endl;
  5021. cout << " " << endl;
  5022. break;
  5023. }
  5024. }
  5025. }
  5026. else if (randAni == 2) //jaguar
  5027. {
  5028. int category;
  5029. int wrongguess = 0;
  5030. int token = 2;
  5031. char letterSample[8][18] =
  5032. {
  5033. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  5034. {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
  5035. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  5036. {65,0,66,0,67,0,68,0,69,0,70,0,71},
  5037. {72,0,73,0,74,0,75,0,76,0,77,0,78},
  5038. {79,0,80,0,81,0,82,0,83,0,84,0,85},
  5039. {0,0,86,0,87,0,88,0,89,0,90,0,0},
  5040. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  5041. };
  5042. char jaguarWord[1][11] = {95,0,95,0,95,0,95,0,95,0,95};
  5043. int z;
  5044. cout << "---------------------------------------------------------------" << endl;
  5045. for (int x = 0; x < 8; x++)
  5046. {
  5047. for (int y = 0; y < 18; y++)
  5048. {
  5049. cout << letterSample [x][y];
  5050. }
  5051. cout << endl;
  5052. }
  5053. for (int x = 0; x < 1; x++)
  5054. {
  5055. for (int y = 0; y < 11; y++)
  5056. {
  5057. cout << jaguarWord [x][y];
  5058. }
  5059. cout << endl;
  5060. }
  5061. cout << " " << endl;
  5062. cout << " _________ \n";
  5063. cout << "| | \n";
  5064. cout << "| \n";
  5065. cout << "| \n";
  5066. cout << "| \n";
  5067. cout << "| \n";
  5068. cout << "| \n";
  5069. cout << " " << endl;
  5070. for (z = 0; z < 1000; z++)
  5071. {
  5072. char guess;
  5073. cout << " " << endl;
  5074. if (token >= 0)
  5075. {
  5076. cout << "-- Token(s) left: " << token << " --" << endl;
  5077. }
  5078. cout << " " << endl;
  5079. cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
  5080. cin >> guess;
  5081. cout << " " << endl;
  5082. cout << "---------------------------------------------------------------" << endl;
  5083. if (guess == 'a' || guess == 'A')
  5084. {
  5085. jaguarWord[0][2] = 'A';
  5086. jaguarWord[0][8] = 'A';
  5087. cout << " " << endl;
  5088. for (int x = 0; x < 1; x++)
  5089. {
  5090. for (int y = 0; y < 11; y++)
  5091. {
  5092. cout << jaguarWord [x][y];
  5093. }
  5094. cout << endl;
  5095. }
  5096. letterSample[3][0] = 0;
  5097. for (int x = 0; x < 8; x++)
  5098. {
  5099. for (int y = 0; y < 18; y++)
  5100. {
  5101. cout << letterSample [x][y];
  5102. }
  5103. cout << endl;
  5104. }
  5105. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  5106. }
  5107. else if (guess == 'b' || guess == 'B')
  5108. {
  5109. letterSample[3][2] = 0;
  5110. for (int x = 0; x < 8; x++)
  5111. {
  5112. for (int y = 0; y < 18; y++)
  5113. {
  5114. cout << letterSample [x][y];
  5115. }
  5116. cout << endl;
  5117. }
  5118. cout << " " << endl;
  5119. }
  5120. else if (guess == 'c' || guess == 'C')
  5121. {
  5122. letterSample[3][4] = 0;
  5123. for (int x = 0; x < 8; x++)
  5124. {
  5125. for (int y = 0; y < 18; y++)
  5126. {
  5127. cout << letterSample [x][y];
  5128. }
  5129. cout << endl;
  5130. }
  5131. cout << " " << endl;
  5132. }
  5133. else if (guess == 'd' || guess == 'D')
  5134. {
  5135. letterSample[3][6] = 0;
  5136. for (int x = 0; x < 8; x++)
  5137. {
  5138. for (int y = 0; y < 18; y++)
  5139. {
  5140. cout << letterSample [x][y];
  5141. }
  5142. cout << endl;
  5143. }
  5144. cout << " " << endl;
  5145. }
  5146. else if (guess == 'e' || guess == 'E')
  5147. {
  5148. letterSample[3][8] = 0;
  5149. for (int x = 0; x < 8; x++)
  5150. {
  5151. for (int y = 0; y < 18; y++)
  5152. {
  5153. cout << letterSample [x][y];
  5154. }
  5155. cout << endl;
  5156. }
  5157. cout << " " << endl;
  5158. }
  5159. else if (guess == 'f' || guess == 'F')
  5160. {
  5161. letterSample[3][10] = 0;
  5162. for (int x = 0; x < 8; x++)
  5163. {
  5164. for (int y = 0; y < 18; y++)
  5165. {
  5166. cout << letterSample [x][y];
  5167. }
  5168. cout << endl;
  5169. }
  5170. cout << " " << endl;
  5171. }
  5172. else if (guess == 'g' || guess == 'G')
  5173. {
  5174. jaguarWord[0][4] = 'G';
  5175. cout << " " << endl;
  5176. for (int x = 0; x < 1; x++)
  5177. {
  5178. for (int y = 0; y < 11; y++)
  5179. {
  5180. cout << jaguarWord [x][y];
  5181. }
  5182. cout << endl;
  5183. }
  5184. letterSample[3][12] = 0;
  5185. for (int x = 0; x < 8; x++)
  5186. {
  5187. for (int y = 0; y < 18; y++)
  5188. {
  5189. cout << letterSample [x][y];
  5190. }
  5191. cout << endl;
  5192. }
  5193. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  5194. }
  5195. else if (guess == 'h' || guess == 'H')
  5196. {
  5197. letterSample[4][0] = 0;
  5198. for (int x = 0; x < 8; x++)
  5199. {
  5200. for (int y = 0; y < 18; y++)
  5201. {
  5202. cout << letterSample [x][y];
  5203. }
  5204. cout << endl;
  5205. }
  5206. cout << " " << endl;
  5207. }
  5208. else if (guess == 'i' || guess == 'I')
  5209. {
  5210. letterSample[4][2] = 0;
  5211. for (int x = 0; x < 8; x++)
  5212. {
  5213. for (int y = 0; y < 18; y++)
  5214. {
  5215. cout << letterSample [x][y];
  5216. }
  5217. cout << endl;
  5218. }
  5219. cout << " " << endl;
  5220. }
  5221. else if (guess == 'j' || guess == 'J')
  5222. {
  5223. jaguarWord[0][0] = 'J';
  5224. cout << " " << endl;
  5225. for (int x = 0; x < 1; x++)
  5226. {
  5227. for (int y = 0; y < 11; y++)
  5228. {
  5229. cout << jaguarWord [x][y];
  5230. }
  5231. cout << endl;
  5232. }
  5233. letterSample[4][4] = 0;
  5234. for (int x = 0; x < 8; x++)
  5235. {
  5236. for (int y = 0; y < 18; y++)
  5237. {
  5238. cout << letterSample [x][y];
  5239. }
  5240. cout << endl;
  5241. }
  5242. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  5243. }
  5244. else if (guess == 'k' || guess == 'K')
  5245. {
  5246. letterSample[4][6] = 0;
  5247. for (int x = 0; x < 8; x++)
  5248. {
  5249. for (int y = 0; y < 18; y++)
  5250. {
  5251. cout << letterSample [x][y];
  5252. }
  5253. cout << endl;
  5254. }
  5255. cout << " " << endl;
  5256. }
  5257. else if (guess == 'l' || guess == 'L')
  5258. {
  5259. letterSample[4][8] = 0;
  5260. for (int x = 0; x < 8; x++)
  5261. {
  5262. for (int y = 0; y < 18; y++)
  5263. {
  5264. cout << letterSample [x][y];
  5265. }
  5266. cout << endl;
  5267. }
  5268. cout << " " << endl;
  5269. }
  5270. else if (guess == 'm' || guess == 'M')
  5271. {
  5272. letterSample[4][10] = 0;
  5273. for (int x = 0; x < 8; x++)
  5274. {
  5275. for (int y = 0; y < 18; y++)
  5276. {
  5277. cout << letterSample [x][y];
  5278. }
  5279. cout << endl;
  5280. }
  5281. cout << " " << endl;
  5282. }
  5283. else if (guess == 'n' || guess == 'N')
  5284. {
  5285. letterSample[4][12] = 0;
  5286. for (int x = 0; x < 8; x++)
  5287. {
  5288. for (int y = 0; y < 18; y++)
  5289. {
  5290. cout << letterSample [x][y];
  5291. }
  5292. cout << endl;
  5293. }
  5294. cout << " " << endl;
  5295. }
  5296. else if (guess == 'o' || guess == 'O')
  5297. {
  5298. letterSample[5][0] = 0;
  5299. for (int x = 0; x < 8; x++)
  5300. {
  5301. for (int y = 0; y < 18; y++)
  5302. {
  5303. cout << letterSample [x][y];
  5304. }
  5305. cout << endl;
  5306. }
  5307. cout << " " << endl;
  5308. }
  5309. else if (guess == 'p' || guess == 'P')
  5310. {
  5311. letterSample[5][2] = 0;
  5312. for (int x = 0; x < 8; x++)
  5313. {
  5314. for (int y = 0; y < 18; y++)
  5315. {
  5316. cout << letterSample [x][y];
  5317. }
  5318. cout << endl;
  5319. }
  5320. cout << " " << endl;
  5321. }
  5322. else if (guess == 'q' || guess == 'Q')
  5323. {
  5324. letterSample[5][4] = 0;
  5325. for (int x = 0; x < 8; x++)
  5326. {
  5327. for (int y = 0; y < 18; y++)
  5328. {
  5329. cout << letterSample [x][y];
  5330. }
  5331. cout << endl;
  5332. }
  5333. cout << " " << endl;
  5334. }
  5335. else if (guess == 'r' || guess == 'R')
  5336. {
  5337. jaguarWord[0][10] = 'R';
  5338. cout << " " << endl;
  5339. for (int x = 0; x < 1; x++)
  5340. {
  5341. for (int y = 0; y < 11; y++)
  5342. {
  5343. cout << jaguarWord [x][y];
  5344. }
  5345. cout << endl;
  5346. }
  5347. letterSample[5][6] = 0;
  5348. for (int x = 0; x < 8; x++)
  5349. {
  5350. for (int y = 0; y < 18; y++)
  5351. {
  5352. cout << letterSample [x][y];
  5353. }
  5354. cout << endl;
  5355. }
  5356. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  5357. }
  5358. else if (guess == 's' || guess == 'S')
  5359. {
  5360. letterSample[5][8] = 0;
  5361. for (int x = 0; x < 8; x++)
  5362. {
  5363. for (int y = 0; y < 18; y++)
  5364. {
  5365. cout << letterSample [x][y];
  5366. }
  5367. cout << endl;
  5368. }
  5369. cout << " " << endl;
  5370. }
  5371. else if (guess == 't' || guess == 'T')
  5372. {
  5373. letterSample[5][10] = 0;
  5374. for (int x = 0; x < 8; x++)
  5375. {
  5376. for (int y = 0; y < 18; y++)
  5377. {
  5378. cout << letterSample [x][y];
  5379. }
  5380. cout << endl;
  5381. }
  5382. cout << " " << endl;
  5383. }
  5384. else if (guess == 'u' || guess == 'U')
  5385. {
  5386. jaguarWord[0][6] = 'U';
  5387. cout << " " << endl;
  5388. for (int x = 0; x < 1; x++)
  5389. {
  5390. for (int y = 0; y < 11; y++)
  5391. {
  5392. cout << jaguarWord [x][y];
  5393. }
  5394. cout << endl;
  5395. }
  5396. letterSample[5][12] = 0;
  5397. for (int x = 0; x < 8; x++)
  5398. {
  5399. for (int y = 0; y < 18; y++)
  5400. {
  5401. cout << letterSample [x][y];
  5402. }
  5403. cout << endl;
  5404. }
  5405. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  5406. }
  5407. else if (guess == 'v' || guess == 'V')
  5408. {
  5409. letterSample[6][2] = 0;
  5410. for (int x = 0; x < 8; x++)
  5411. {
  5412. for (int y = 0; y < 18; y++)
  5413. {
  5414. cout << letterSample [x][y];
  5415. }
  5416. cout << endl;
  5417. }
  5418. cout << " " << endl;
  5419. }
  5420. else if (guess == 'w' || guess == 'W')
  5421. {
  5422. letterSample[6][4] = 0;
  5423. for (int x = 0; x < 8; x++)
  5424. {
  5425. for (int y = 0; y < 18; y++)
  5426. {
  5427. cout << letterSample [x][y];
  5428. }
  5429. cout << endl;
  5430. }
  5431. cout << " " << endl;
  5432. }
  5433. else if (guess == 'x' || guess == 'X')
  5434. {
  5435. letterSample[6][6] = 0;
  5436. for (int x = 0; x < 8; x++)
  5437. {
  5438. for (int y = 0; y < 18; y++)
  5439. {
  5440. cout << letterSample [x][y];
  5441. }
  5442. cout << endl;
  5443. }
  5444. cout << " " << endl;
  5445. }
  5446. else if (guess == 'y' || guess == 'Y')
  5447. {
  5448. letterSample[6][8] = 0;
  5449. for (int x = 0; x < 8; x++)
  5450. {
  5451. for (int y = 0; y < 18; y++)
  5452. {
  5453. cout << letterSample [x][y];
  5454. }
  5455. cout << endl;
  5456. }
  5457. cout << " " << endl;
  5458. }
  5459. else if (guess == 'z' || guess == 'Z')
  5460. {
  5461. letterSample[6][10] = 0;
  5462. for (int x = 0; x < 8; x++)
  5463. {
  5464. for (int y = 0; y < 18; y++)
  5465. {
  5466. cout << letterSample [x][y];
  5467. }
  5468. cout << endl;
  5469. }
  5470. cout << " " << endl;
  5471. }
  5472. else if (guess == '0')
  5473. {
  5474. token--;
  5475. if (token == 1)
  5476. {
  5477. for (int x = 0; x < 8; x++)
  5478. {
  5479. for (int y = 0; y < 18; y++)
  5480. {
  5481. cout << letterSample [x][y];
  5482. }
  5483. cout << endl;
  5484. }
  5485. for (int x = 0; x < 1; x++)
  5486. {
  5487. for (int y = 0; y < 11; y++)
  5488. {
  5489. cout << jaguarWord[x][y];
  5490. }
  5491. cout << endl;
  5492. }
  5493. cout << " " << endl;
  5494. cout << "Hint 1: The animal is a mammal." << endl;
  5495. }
  5496. else if (token == 0)
  5497. {
  5498. for (int x = 0; x < 8; x++)
  5499. {
  5500. for (int y = 0; y < 18; y++)
  5501. {
  5502. cout << letterSample [x][y];
  5503. }
  5504. cout << endl;
  5505. }
  5506. for (int x = 0; x < 1; x++)
  5507. {
  5508. for (int y = 0; y < 11; y++)
  5509. {
  5510. cout << jaguarWord [x][y];
  5511. }
  5512. cout << endl;
  5513. }
  5514. cout << " " << endl;
  5515. cout << "Hint 2: The animal is the mascot of an NFL team." << endl;
  5516. }
  5517. else
  5518. {
  5519. cout << "You have no more hints/token left. Sorry!" << endl;
  5520. for (int x = 0; x < 8; x++)
  5521. {
  5522. for (int y = 0; y < 18; y++)
  5523. {
  5524. cout << letterSample [x][y];
  5525. }
  5526. cout << endl;
  5527. }
  5528. for (int x = 0; x < 1; x++)
  5529. {
  5530. for (int y = 0; y < 11; y++)
  5531. {
  5532. cout << jaguarWord [x][y];
  5533. }
  5534. cout << endl;
  5535. }
  5536. }
  5537. }
  5538.  
  5539. if (guess == 'B' || guess == 'b' || guess == 'C' || guess == 'c' || guess == 'D' || guess == 'd' || guess == 'E' || guess == 'e' || guess == 'h' || guess == 'H' || guess == 'f' || guess == 'F' || guess == 'i' || guess == 'I' || guess == 'K' || guess == 'k' || guess == 'M' || guess == 'm' || guess == 'n' || guess == 'N' || guess == 'l' || guess == 'L' || guess == 'O' || guess == 'o' || guess == 'P' || guess == 'p' || guess == 'Q' || guess == 'q' || guess == 's' || guess == 'S' || guess == 't' || guess == 'T' || guess == 'v' || guess == 'V' || guess == 'W' || guess == 'w' || guess == 'X' || guess == 'x' || guess == 'Y' || guess == 'y' || guess == 'Z' || guess == 'z')
  5540. {
  5541. cout << "---------------------------------------------------------------" << endl;
  5542. for (int x = 0; x < 8; x++)
  5543. {
  5544. for (int y = 0; y < 18; y++)
  5545. {
  5546. cout << letterSample [x][y];
  5547. }
  5548. cout << endl;
  5549. }
  5550. for (int x = 0; x < 1; x++)
  5551. {
  5552. for (int y = 0; y < 11; y++)
  5553. {
  5554. cout << jaguarWord [x][y];
  5555. }
  5556. cout << endl;
  5557. }
  5558. wrongguess++;
  5559. if (wrongguess == 1)
  5560. {
  5561. cout << " _________ \n";
  5562. cout << "| | \n";
  5563. cout << "| 0 \n";
  5564. cout << "| \n";
  5565. cout << "| \n";
  5566. cout << "| \n";
  5567. cout << "| \n";
  5568. cout << " " << endl;
  5569. cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
  5570. }
  5571. else if (wrongguess == 2)
  5572. {
  5573. cout << " _________ \n";
  5574. cout << "| | \n";
  5575. cout << "| 0 \n";
  5576. cout << "| | \n";
  5577. cout << "| \n";
  5578. cout << "| \n";
  5579. cout << "| \n";
  5580. cout << " " << endl;
  5581. cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
  5582. }
  5583. else if (wrongguess == 3)
  5584. {
  5585. cout << " _________ \n";
  5586. cout << "| | \n";
  5587. cout << "| 0 \n";
  5588. cout << "| /| \n";
  5589. cout << "| \n";
  5590. cout << "| \n";
  5591. cout << "| \n";
  5592. cout << " " << endl;
  5593. cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
  5594. }
  5595. else if (wrongguess == 4)
  5596. {
  5597. cout << " _________ \n";
  5598. cout << "| | \n";
  5599. cout << "| 0 \n";
  5600. cout << "| /|\\ \n";
  5601. cout << "| \n";
  5602. cout << "| \n";
  5603. cout << "| \n";
  5604. cout << " " << endl;
  5605. cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
  5606. else if (wrongguess == 5)
  5607. {
  5608. cout << " _________ \n";
  5609. cout << "| | \n";
  5610. cout << "| 0 \n";
  5611. cout << "| /|\\ \n";
  5612. cout << "| / \n";
  5613. cout << "| \n";
  5614. cout << "| \n";
  5615. cout << " " << endl;
  5616. cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
  5617. }
  5618. else if (wrongguess == 6)
  5619. {
  5620. cout << " _________ \n";
  5621. cout << "| | \n";
  5622. cout << "| 0 \n";
  5623. cout << "| /|\\ \n";
  5624. cout << "| / \\ \n";
  5625. cout << "| \n";
  5626. cout << "| \n";
  5627. system("COLOR 0C");
  5628. printf;
  5629. cout << " " << endl;
  5630. cout << " +=====================================================================+ " << endl;
  5631. cout << " | | " << endl;
  5632. cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
  5633. cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
  5634. cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
  5635. cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
  5636. cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
  5637. cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
  5638. cout << " | | " << endl;
  5639. cout << " +=====================================================================+ " << endl;
  5640. cout << " " << endl;
  5641. cout << "You have lost the game, good luck next time!" << endl;
  5642. cout << " " << endl;
  5643. cout << "The correct word was: JAGUAR." << endl;
  5644. break;
  5645. }
  5646. else
  5647. {
  5648. cout << " " << endl;
  5649. }
  5650. }
  5651. if (jaguarWord[0][0] == 'J' && jaguarWord[0][2] == 'A' && jaguarWord[0][4] == 'G' && jaguarWord[0][6] == 'U' && jaguarWord[0][8] == 'A' && jaguarWord[0][10] == 'R')
  5652. {
  5653. system("COLOR 0A");
  5654. printf;
  5655. cout << " " << endl;
  5656. cout << " +============================================================+ " << endl;
  5657. cout << " | | " << endl;
  5658. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  5659. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  5660. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  5661. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  5662. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  5663. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  5664. cout << " | | " << endl;
  5665. cout << " +============================================================+ " << endl;
  5666. cout << " " << endl;
  5667. cout << "Congratulations! You have won!" << endl;
  5668. cout << " " << endl;
  5669. break;
  5670. }
  5671. }
  5672. }
  5673. else if (randAni == 3) //shark
  5674. {
  5675. int category;
  5676. int wrongguess = 0;
  5677. int token = 2;
  5678. char letterSample[8][18] =
  5679. {
  5680. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  5681. {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
  5682. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  5683. {65,0,66,0,67,0,68,0,69,0,70,0,71},
  5684. {72,0,73,0,74,0,75,0,76,0,77,0,78},
  5685. {79,0,80,0,81,0,82,0,83,0,84,0,85},
  5686. {0,0,86,0,87,0,88,0,89,0,90,0,0},
  5687. {0,0,0,0,0,0,0,0,0,0,0,0,0},
  5688. };
  5689. char sharkWord[1][9] = {95,0,95,0,95,0,95,0,95};
  5690. int z;
  5691. cout << "---------------------------------------------------------------" << endl;
  5692. for (int x = 0; x < 8; x++)
  5693. {
  5694. for (int y = 0; y < 18; y++)
  5695. {
  5696. cout << letterSample [x][y];
  5697. }
  5698. cout << endl;
  5699. }
  5700. for (int x = 0; x < 1; x++)
  5701. {
  5702. for (int y = 0; y < 9; y++)
  5703. {
  5704. cout << sharkWord [x][y];
  5705. }
  5706. cout << endl;
  5707. }
  5708. cout << " " << endl;
  5709. cout << " _________ \n";
  5710. cout << "| | \n";
  5711. cout << "| \n";
  5712. cout << "| \n";
  5713. cout << "| \n";
  5714. cout << "| \n";
  5715. cout << "| \n";
  5716. cout << " " << endl;
  5717. for (z = 0; z < 1000; z++)
  5718. {
  5719. char guess;
  5720. cout << " " << endl;
  5721. if (token >= 0)
  5722. {
  5723. cout << "-- Token(s) left: " << token << " --" << endl;
  5724. }
  5725. cout << " " << endl;
  5726. cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
  5727. cin >> guess;
  5728. cout << " " << endl;
  5729. cout << "---------------------------------------------------------------" << endl;
  5730. if (guess == 'a' || guess == 'A')
  5731. {
  5732. sharkWord[0][4] = 'A';
  5733. cout << " " << endl;
  5734. for (int x = 0; x < 1; x++)
  5735. {
  5736. for (int y = 0; y < 9; y++)
  5737. {
  5738. cout << sharkWord [x][y];
  5739. }
  5740. cout << endl;
  5741. }
  5742. letterSample[3][0] = 0;
  5743. for (int x = 0; x < 8; x++)
  5744. {
  5745. for (int y = 0; y < 18; y++)
  5746. {
  5747. cout << letterSample [x][y];
  5748. }
  5749. cout << endl;
  5750. }
  5751. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  5752. }
  5753. else if (guess == 'b' || guess == 'B')
  5754. {
  5755. letterSample[3][2] = 0;
  5756. for (int x = 0; x < 8; x++)
  5757. {
  5758. for (int y = 0; y < 18; y++)
  5759. {
  5760. cout << letterSample [x][y];
  5761. }
  5762. cout << endl;
  5763. }
  5764. cout << " " << endl;
  5765. }
  5766. else if (guess == 'c' || guess == 'C')
  5767. {
  5768. letterSample[3][4] = 0;
  5769. for (int x = 0; x < 8; x++)
  5770. {
  5771. for (int y = 0; y < 18; y++)
  5772. {
  5773. cout << letterSample [x][y];
  5774. }
  5775. cout << endl;
  5776. }
  5777. cout << " " << endl;
  5778. }
  5779. else if (guess == 'd' || guess == 'D')
  5780. {
  5781. letterSample[3][6] = 0;
  5782. for (int x = 0; x < 8; x++)
  5783. {
  5784. for (int y = 0; y < 18; y++)
  5785. {
  5786. cout << letterSample [x][y];
  5787. }
  5788. cout << endl;
  5789. }
  5790. cout << " " << endl;
  5791. }
  5792. else if (guess == 'e' || guess == 'E')
  5793. {
  5794. letterSample[3][8] = 0;
  5795. for (int x = 0; x < 8; x++)
  5796. {
  5797. for (int y = 0; y < 18; y++)
  5798. {
  5799. cout << letterSample [x][y];
  5800. }
  5801. cout << endl;
  5802. }
  5803. cout << " " << endl;
  5804. }
  5805. else if (guess == 'f' || guess == 'F')
  5806. {
  5807. letterSample[3][10] = 0;
  5808. for (int x = 0; x < 8; x++)
  5809. {
  5810. for (int y = 0; y < 18; y++)
  5811. {
  5812. cout << letterSample [x][y];
  5813. }
  5814. cout << endl;
  5815. }
  5816. cout << " " << endl;
  5817. }
  5818. else if (guess == 'g' || guess == 'G')
  5819. {
  5820. letterSample[3][12] = 0;
  5821. for (int x = 0; x < 8; x++)
  5822. {
  5823. for (int y = 0; y < 18; y++)
  5824. {
  5825. cout << letterSample [x][y];
  5826. }
  5827. cout << endl;
  5828. }
  5829. cout << " " << endl;
  5830. }
  5831. else if (guess == 'h' || guess == 'H')
  5832. {
  5833. sharkWord[0][2] = 'H';
  5834. cout << " " << endl;
  5835. for (int x = 0; x < 1; x++)
  5836. {
  5837. for (int y = 0; y < 9; y++)
  5838. {
  5839. cout << sharkWord [x][y];
  5840. }
  5841. cout << endl;
  5842. }
  5843. letterSample[4][0] = 0;
  5844. for (int x = 0; x < 8; x++)
  5845. {
  5846. for (int y = 0; y < 18; y++)
  5847. {
  5848. cout << letterSample [x][y];
  5849. }
  5850. cout << endl;
  5851. }
  5852. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  5853. }
  5854. else if (guess == 'i' || guess == 'I')
  5855. {
  5856. letterSample[4][2] = 0;
  5857. for (int x = 0; x < 8; x++)
  5858. {
  5859. for (int y = 0; y < 18; y++)
  5860. {
  5861. cout << letterSample [x][y];
  5862. }
  5863. cout << endl;
  5864. }
  5865. cout << " " << endl;
  5866. }
  5867. else if (guess == 'j' || guess == 'J')
  5868. {
  5869. letterSample[4][4] = 0;
  5870. for (int x = 0; x < 8; x++)
  5871. {
  5872. for (int y = 0; y < 18; y++)
  5873. {
  5874. cout << letterSample [x][y];
  5875. }
  5876. cout << endl;
  5877. }
  5878. cout << " " << endl;
  5879. }
  5880. else if (guess == 'k' || guess == 'K')
  5881. {
  5882. sharkWord[0][8] = 'K';
  5883. cout << " " << endl;
  5884. for (int x = 0; x < 1; x++)
  5885. {
  5886. for (int y = 0; y < 9; y++)
  5887. {
  5888. cout << sharkWord [x][y];
  5889. }
  5890. cout << endl;
  5891. }
  5892. letterSample[4][6] = 0;
  5893. for (int x = 0; x < 8; x++)
  5894. {
  5895. for (int y = 0; y < 18; y++)
  5896. {
  5897. cout << letterSample [x][y];
  5898. }
  5899. cout << endl;
  5900. }
  5901. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  5902. }
  5903. else if (guess == 'l' || guess == 'L')
  5904. {
  5905. letterSample[4][8] = 0;
  5906. for (int x = 0; x < 8; x++)
  5907. {
  5908. for (int y = 0; y < 18; y++)
  5909. {
  5910. cout << letterSample [x][y];
  5911. }
  5912. cout << endl;
  5913. }
  5914. cout << " " << endl;
  5915. }
  5916. else if (guess == 'm' || guess == 'M')
  5917. {
  5918. letterSample[4][10] = 0;
  5919. for (int x = 0; x < 8; x++)
  5920. {
  5921. for (int y = 0; y < 18; y++)
  5922. {
  5923. cout << letterSample [x][y];
  5924. }
  5925. cout << endl;
  5926. }
  5927. cout << " " << endl;
  5928. }
  5929. else if (guess == 'n' || guess == 'N')
  5930. {
  5931. letterSample[4][12] = 0;
  5932. for (int x = 0; x < 8; x++)
  5933. {
  5934. for (int y = 0; y < 18; y++)
  5935. {
  5936. cout << letterSample [x][y];
  5937. }
  5938. cout << endl;
  5939. }
  5940. cout << " " << endl;
  5941. }
  5942. else if (guess == 'o' || guess == 'O')
  5943. {
  5944. letterSample[5][0] = 0;
  5945. for (int x = 0; x < 8; x++)
  5946. {
  5947. for (int y = 0; y < 18; y++)
  5948. {
  5949. cout << letterSample [x][y];
  5950. }
  5951. cout << endl;
  5952. }
  5953. cout << " " << endl;
  5954. }
  5955. else if (guess == 'p' || guess == 'P')
  5956. {
  5957. letterSample[5][2] = 0;
  5958. for (int x = 0; x < 8; x++)
  5959. {
  5960. for (int y = 0; y < 18; y++)
  5961. {
  5962. cout << letterSample [x][y];
  5963. }
  5964. cout << endl;
  5965. }
  5966. cout << " " << endl;
  5967. }
  5968. else if (guess == 'q' || guess == 'Q')
  5969. {
  5970. letterSample[5][4] = 0;
  5971. for (int x = 0; x < 8; x++)
  5972. {
  5973. for (int y = 0; y < 18; y++)
  5974. {
  5975. cout << letterSample [x][y];
  5976. }
  5977. cout << endl;
  5978. }
  5979. cout << " " << endl;
  5980. }
  5981. else if (guess == 'r' || guess == 'R')
  5982. {
  5983. sharkWord[0][6] = 'R';
  5984. cout << " " << endl;
  5985. for (int x = 0; x < 1; x++)
  5986. {
  5987. for (int y = 0; y < 9; y++)
  5988. {
  5989. cout << sharkWord [x][y];
  5990. }
  5991. cout << endl;
  5992. }
  5993. letterSample[5][6] = 0;
  5994. for (int x = 0; x < 8; x++)
  5995. {
  5996. for (int y = 0; y < 18; y++)
  5997. {
  5998. cout << letterSample [x][y];
  5999. }
  6000. cout << endl;
  6001. }
  6002. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  6003. }
  6004. else if (guess == 's' || guess == 'S')
  6005. {
  6006. sharkWord[0][0] = 'S';
  6007. cout << " " << endl;
  6008. for (int x = 0; x < 1; x++)
  6009. {
  6010. for (int y = 0; y < 9; y++)
  6011. {
  6012. cout << sharkWord [x][y];
  6013. }
  6014. cout << endl;
  6015. }
  6016. letterSample[5][8] = 0;
  6017. for (int x = 0; x < 8; x++)
  6018. {
  6019. for (int y = 0; y < 18; y++)
  6020. {
  6021. cout << letterSample [x][y];
  6022. }
  6023. cout << endl;
  6024. }
  6025. cout << "Correct - Congratulations! You have entered a correct letter." << endl;
  6026. }
  6027. else if (guess == 't' || guess == 'T')
  6028. {
  6029. letterSample[5][10] = 0;
  6030. for (int x = 0; x < 8; x++)
  6031. {
  6032. for (int y = 0; y < 18; y++)
  6033. {
  6034. cout << letterSample [x][y];
  6035. }
  6036. cout << endl;
  6037. }
  6038. cout << " " << endl;
  6039. }
  6040. else if (guess == 'u' || guess == 'U')
  6041. {
  6042. letterSample[5][12] = 0;
  6043. for (int x = 0; x < 8; x++)
  6044. {
  6045. for (int y = 0; y < 18; y++)
  6046. {
  6047. cout << letterSample [x][y];
  6048. }
  6049. cout << endl;
  6050. }
  6051. cout << " " << endl;
  6052. }
  6053. else if (guess == 'v' || guess == 'V')
  6054. {
  6055. letterSample[6][2] = 0;
  6056. for (int x = 0; x < 8; x++)
  6057. {
  6058. for (int y = 0; y < 18; y++)
  6059. {
  6060. cout << letterSample [x][y];
  6061. }
  6062. cout << endl;
  6063. }
  6064. cout << " " << endl;
  6065. }
  6066. else if (guess == 'w' || guess == 'W')
  6067. {
  6068. letterSample[6][4] = 0;
  6069. for (int x = 0; x < 8; x++)
  6070. {
  6071. for (int y = 0; y < 18; y++)
  6072. {
  6073. cout << letterSample [x][y];
  6074. }
  6075. cout << endl;
  6076. }
  6077. cout << " " << endl;
  6078. }
  6079. else if (guess == 'x' || guess == 'X')
  6080. {
  6081. letterSample[6][6] = 0;
  6082. for (int x = 0; x < 8; x++)
  6083. {
  6084. for (int y = 0; y < 18; y++)
  6085. {
  6086. cout << letterSample [x][y];
  6087. }
  6088. cout << endl;
  6089. }
  6090. cout << " " << endl;
  6091. }
  6092. else if (guess == 'y' || guess == 'Y')
  6093. {
  6094. letterSample[6][8] = 0;
  6095. for (int x = 0; x < 8; x++)
  6096. {
  6097. for (int y = 0; y < 18; y++)
  6098. {
  6099. cout << letterSample [x][y];
  6100. }
  6101. cout << endl;
  6102. }
  6103. cout << " " << endl;
  6104. }
  6105. else if (guess == 'z' || guess == 'Z')
  6106. {
  6107. letterSample[6][10] = 0;
  6108. for (int x = 0; x < 8; x++)
  6109. {
  6110. for (int y = 0; y < 18; y++)
  6111. {
  6112. cout << letterSample [x][y];
  6113. }
  6114. cout << endl;
  6115. }
  6116. cout << " " << endl;
  6117. }
  6118. else if (guess == '0')
  6119. {
  6120. token--;
  6121. if (token == 1)
  6122. {
  6123. for (int x = 0; x < 8; x++)
  6124. {
  6125. for (int y = 0; y < 18; y++)
  6126. {
  6127. cout << letterSample [x][y];
  6128. }
  6129. cout << endl;
  6130. }
  6131. for (int x = 0; x < 1; x++)
  6132. {
  6133. for (int y = 0; y < 9; y++)
  6134. {
  6135. cout << sharkWord[x][y];
  6136. }
  6137. cout << endl;
  6138. }
  6139. cout << " " << endl;
  6140. cout << "Hint 1: This animal has very sharp teeth." << endl;
  6141. }
  6142. else if (token == 0)
  6143. {
  6144. for (int x = 0; x < 8; x++)
  6145. {
  6146. for (int y = 0; y < 18; y++)
  6147. {
  6148. cout << letterSample [x][y];
  6149. }
  6150. cout << endl;
  6151. }
  6152. for (int x = 0; x < 1; x++)
  6153. {
  6154. for (int y = 0; y < 9; y++)
  6155. {
  6156. cout << sharkWord [x][y];
  6157. }
  6158. cout << endl;
  6159. }
  6160. cout << " " << endl;
  6161. cout << "Hint 2: This animal lives in the water." << endl;
  6162. }
  6163. else
  6164. {
  6165. cout << "You have no more hints/token left. Sorry!" << endl;
  6166. for (int x = 0; x < 8; x++)
  6167. {
  6168. for (int y = 0; y < 18; y++)
  6169. {
  6170. cout << letterSample [x][y];
  6171. }
  6172. cout << endl;
  6173. }
  6174. for (int x = 0; x < 1; x++)
  6175. {
  6176. for (int y = 0; y < 9; y++)
  6177. {
  6178. cout << sharkWord [x][y];
  6179. }
  6180. cout << endl;
  6181. }
  6182. }
  6183. }
  6184. if (guess == 'B' || guess == 'b' || guess == 'C' || guess == 'c' || guess == 'D' || guess == 'd' || guess == 'E' || guess == 'e' || guess == 'G' || guess == 'g' || guess == 'f' || guess == 'F' || guess == 'I' || guess == 'i' || guess == 'j' || guess == 'J' || guess == 'l' || guess == 'L' || guess == 'M' || guess == 'm' || guess == 'n' || guess == 'N' || guess == 'O' || guess == 'o' || guess == 'p' || guess == 'P' || guess == 'Q' || guess == 'q' || guess == 'y' || guess == 'Y' || guess == 't' || guess == 'T' || guess == 'u' || guess == 'U' || guess == 'v' || guess == 'V' || guess == 'W' || guess == 'w' || guess == 'X' || guess == 'x' || guess == 'Z' || guess == 'z')
  6185. {
  6186. cout << "---------------------------------------------------------------" << endl;
  6187. for (int x = 0; x < 8; x++)
  6188. {
  6189. for (int y = 0; y < 18; y++)
  6190. {
  6191. cout << letterSample [x][y];
  6192. }
  6193. cout << endl;
  6194. }
  6195. for (int x = 0; x < 1; x++)
  6196. {
  6197. for (int y = 0; y < 9; y++)
  6198. {
  6199. cout << sharkWord [x][y];
  6200. }
  6201. cout << endl;
  6202. }
  6203. wrongguess++;
  6204. if (wrongguess == 1)
  6205. {
  6206. cout << " _________ \n";
  6207. cout << "| | \n";
  6208. cout << "| 0 \n";
  6209. cout << "| \n";
  6210. cout << "| \n";
  6211. cout << "| \n";
  6212. cout << "| \n";
  6213. cout << " " << endl;
  6214. cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
  6215. }
  6216. else if (wrongguess == 2)
  6217. {
  6218. cout << " _________ \n";
  6219. cout << "| | \n";
  6220. cout << "| 0 \n";
  6221. cout << "| | \n";
  6222. cout << "| \n";
  6223. cout << "| \n";
  6224. cout << "| \n";
  6225. cout << " " << endl;
  6226. cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
  6227. }
  6228. else if (wrongguess == 3)
  6229. {
  6230. cout << " _________ \n";
  6231. cout << "| | \n";
  6232. cout << "| 0 \n";
  6233. cout << "| /| \n";
  6234. cout << "| \n";
  6235. cout << "| \n";
  6236. cout << "| \n";
  6237. cout << " " << endl;
  6238. cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
  6239. }
  6240. else if (wrongguess == 4)
  6241. {
  6242. cout << " _________ \n";
  6243. cout << "| | \n";
  6244. cout << "| 0 \n";
  6245. cout << "| /|\\ \n";
  6246. cout << "| \n";
  6247. cout << "| \n";
  6248. cout << "| \n";
  6249. cout << " " << endl;
  6250. cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
  6251. else if (wrongguess == 5)
  6252. {
  6253. cout << " _________ \n";
  6254. cout << "| | \n";
  6255. cout << "| 0 \n";
  6256. cout << "| /|\\ \n";
  6257. cout << "| / \n";
  6258. cout << "| \n";
  6259. cout << "| \n";
  6260. cout << " " << endl;
  6261. cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
  6262. }
  6263. else if (wrongguess == 6)
  6264. {
  6265. cout << " _________ \n";
  6266. cout << "| | \n";
  6267. cout << "| 0 \n";
  6268. cout << "| /|\\ \n";
  6269. cout << "| / \\ \n";
  6270. cout << "| \n";
  6271. cout << "| \n";
  6272. system("COLOR 0C");
  6273. printf;
  6274. cout << " " << endl;
  6275. cout << " +=====================================================================+ " << endl;
  6276. cout << " | | " << endl;
  6277. cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
  6278. cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
  6279. cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
  6280. cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
  6281. cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
  6282. cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
  6283. cout << " | | " << endl;
  6284. cout << " +=====================================================================+ " << endl;
  6285. cout << " " << endl;
  6286. cout << "You have lost the game, good luck next time!" << endl;
  6287. cout << " " << endl;
  6288. cout << "The correct word was: SHARK." << endl;
  6289. break;
  6290. }
  6291. else
  6292. {
  6293. cout << " " << endl;
  6294. }
  6295. }
  6296. if (sharkWord[0][0] == 'S' && sharkWord[0][2] == 'H' && sharkWord[0][4] == 'A' && sharkWord[0][6] == 'R' && sharkWord[0][8] == 'K')
  6297. {
  6298. system("COLOR 0A");
  6299. printf;
  6300. cout << " " << endl;
  6301. cout << " +============================================================+ " << endl;
  6302. cout << " | | " << endl;
  6303. cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
  6304. cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
  6305. cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
  6306. cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
  6307. cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
  6308. cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
  6309. cout << " | | " << endl;
  6310. cout << " +============================================================+ " << endl;
  6311. cout << " " << endl;
  6312. cout << "Congratulations! You have won!" << endl;
  6313. cout << " " << endl;
  6314. break;
  6315. }
  6316. }
  6317. }
  6318. }
  6319. else
  6320. {
  6321. cout << " " << endl;
  6322. cout << "Error: You have typed an invalid number. Please try again." << endl;
  6323. }
  6324. } while (category < 1 || category > 3);
  6325.  
  6326. }
  6327.  
  6328. int main()
  6329. {
  6330. int option;
  6331. do
  6332. {
  6333. int tttchoice;
  6334. int hangchoice;
  6335. string hangoption;
  6336. int playAgain;
  6337. system("COLOR 0b");
  6338. printf;
  6339. cout << " " << endl;
  6340. cout << " +==========================================================================+" << endl;
  6341. cout << " | ____ _ ____ ____ ____ _ ____ ____ ____ _ _ ____ ____ ____ ___ |" << endl;
  6342. cout << " | | | |__| [__ [__ | | | __ |__| |\\/| |___ [__ |___ | | " << endl;
  6343. cout << " | |___ |___ | | ___] ___] | |___ |__] | | | | |___ ___] |___ | |" << endl;
  6344. cout << " | |" << endl;
  6345. cout << " +==========================================================================+" << endl;
  6346. cout << " " << endl;
  6347. cout << "Welcome to the Classic Game Set!" << endl;
  6348. cout << " " << endl;
  6349. cout << "1. Tic-Tac-Toe (Multi-player)" << endl;
  6350. cout << "2. Hangman (Single-player)" << endl;
  6351. cout << "3. Quit Program" << endl;
  6352. cout << " " << endl;
  6353. cout << "Please select the game or action you would like to take place. Choose the corresponding number." << endl;
  6354. cin >> option;
  6355. cout << " " << endl;
  6356.  
  6357. if (option == 1)
  6358. {
  6359. do
  6360. {
  6361. system("COLOR fc");
  6362. printf;
  6363. int tttchoice;
  6364. char TTToption;
  6365. cout << " " << endl;
  6366. cout << " +============================================================+ " << endl;
  6367. cout << " | | " << endl;
  6368. cout << " | 88888 w 88888 88888 | " << endl;
  6369. cout << " | 8 w .d8b 8 .d88 .d8b 8 .d8b. .d88b | " << endl;
  6370. cout << " | 8 8 8 wwww 8 8 8 8 wwww 8 8' .8 8.dP' | " << endl;
  6371. cout << " | 8 8 `Y8P 8 `Y88 `Y8P 8 `Y8P' `Y88P | " << endl;
  6372. cout << " | | " << endl;
  6373. cout << " +============================================================+ " << endl;
  6374. cout << " " << endl;
  6375. cout << "1. Start the game" << endl;
  6376. cout << "2. Read the instructions" << endl;
  6377. cout << "3. Quit Program" << endl;
  6378. cout << " " << endl;
  6379. cout << "Please select what you would like to to with the game. Choose the corresponding number." << endl;
  6380. cin >> tttchoice;
  6381. if (tttchoice == 1)
  6382. {
  6383. ticGame();
  6384. break;
  6385. }
  6386. else if (tttchoice == 2)
  6387. {
  6388. instructionsTTT();
  6389. string TTToption;
  6390. cout << "Please press and enter any key when you are ready to continue to the game." << endl;
  6391. cin >> TTToption;
  6392. ticGame();
  6393. break;
  6394. }
  6395. else if (tttchoice == 3)
  6396. {
  6397. exit(1);
  6398. }
  6399. else
  6400. {
  6401. cout << " " << endl;
  6402. cout << "An invalid number was entered, please try again!" << endl;
  6403. }
  6404. } while (tttchoice > 3 || tttchoice < 1);
  6405. }
  6406. else if (option == 2)
  6407. {
  6408. do
  6409. {
  6410. system("COLOR fc");
  6411. printf;
  6412. int hangchoice;
  6413. cout << " " << endl;
  6414. cout << " +==============================================+ " << endl;
  6415. cout << " | | " << endl;
  6416. cout << " | 8 8 | " << endl;
  6417. cout << " | 8www8 .d88 8d8b. .d88 8d8b.d8b. .d88 8d8b. | " << endl;
  6418. cout << " | 8 8 8 8 8P Y8 8 8 8P Y8P Y8 8 8 8P Y8 | " << endl;
  6419. cout << " | 8 8 `Y88 8 8 `Y88 8 8 8 `Y88 8 8 | " << endl;
  6420. cout << " | wwdP | " << endl;
  6421. cout << " +==============================================+ " << endl;
  6422. cout << " " << endl;
  6423. cout << "1. Start the game" << endl;
  6424. cout << "2. Read the instructions" << endl;
  6425. cout << "3. Quit Program" << endl;
  6426. cout << " " << endl;
  6427. cout << "Please select what you would like to to with the game. Choose the corresponding number." << endl;
  6428. cin >> hangchoice;
  6429. if (hangchoice == 1)
  6430. {
  6431. hangGame();
  6432. break;
  6433. }
  6434. else if (hangchoice == 2)
  6435. {
  6436. instructionsHang();
  6437. string hangoption;
  6438. cout << "Please press and enter any key when you are ready to continue to the game." << endl;
  6439. cin >> hangoption;
  6440. hangGame();
  6441. break;
  6442. }
  6443. else if (hangchoice == 3)
  6444. {
  6445. exit(1);
  6446. }
  6447. else
  6448. {
  6449. cout << " " << endl;
  6450. cout << "An invalid number was entered, please try again!" << endl;
  6451. }
  6452. } while (hangchoice > 3 || hangchoice < 1);
  6453. }
  6454. else if (option == 3)
  6455. {
  6456. exit(1);
  6457. }
  6458. else
  6459. {
  6460. cout << "An invalid number was entered, please try again!" << endl;
  6461. }
  6462. } while (option > 3 || option < 1);
  6463. return 0;
  6464. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement