Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <stdlib.h>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- void ticGame()
- {
- system("COLOR 0f");
- printf;
- int boxnum;
- char player1 = 'X';
- char player2 = 'O';
- string p1, p2;
- cout << "--------------------------------------------------------------------------------" << endl;
- cout << "Welcome to tic-tac-toe! Enjoy!" << endl;
- cout << " " << endl;
- cout << "Player 1, enter your name:" << endl;
- cin >> p1;
- cout << p1 << ": Your character is X." << endl;;
- cout << " " << endl;
- do {
- cout << "Player 2, enter your name:" << endl;
- cin >> p2;
- cout << p2 << ": Your character is O." << endl;
- if (p1 == p2)
- {
- cout << " " << endl;
- cout << "Error: Please choose a name that is different than the other person." << endl;
- cout << " " << endl;
- }
- } while (p1 == p2);
- do
- {
- cout << " " << endl;
- char ticGrid [11][12] =
- {
- {0,0,0,0,179,0,0,0,179,0,0,0},
- {0,0,49,0,179,0,50,0,179,0,51,0},
- {0,0,0,0,179,0,0,0,179,0,0,0},
- {0,196,196,196,197,196,196,196,197,196,196,196},
- {0,0,0,0,179,0,0,0,179,0,0,0},
- {0,0,52,0,179,0,53,0,179,0,54,0},
- {0,0,0,0,179,0,0,0,179,0,0,0},
- {0,196,196,196,197,196,196,196,197,196,196,196},
- {0,0,0,0,179,0,0,0,179,0,0,0},
- {0,0,55,0,179,0,56,0,179,0,57,0},
- {0,0,0,0,179,0,0,0,179,0,0,0},
- };
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Use the key above to say which box you would like to put your character in." << endl;
- int x;
- for (x = 1; x < 10; x++)
- {
- if (x % 2 != 0)
- {
- cout << " " << endl;
- cout << p1 << ", it is your turn, please choose the box you would like to put the character in (number)." << endl;
- cin >> boxnum;
- if (boxnum == 1)
- {
- ticGrid[1][2] = 'X';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 2)
- {
- ticGrid[1][6] = 'X';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 3)
- {
- ticGrid[1][10] = 'X';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 4)
- {
- ticGrid[5][2] = 'X';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 5)
- {
- ticGrid[5][6] = 'X';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 6)
- {
- ticGrid[5][10] = 'X';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 7)
- {
- ticGrid[9][2] = 'X';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 8)
- {
- ticGrid[9][6] = 'X';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 9)
- {
- ticGrid[9][10] = 'X';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else
- {
- cout << " " << endl;
- cout << "An invalid number was entered, please try again!" << endl;
- cout << " " << endl;
- }
- 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')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! " << p1 << ", you have won!" << endl;
- cout << " " << endl;
- break;
- }
- 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'))
- {
- system("COLOR 0d");
- printf;
- cout << " " << endl;
- cout << " +=========================================+ " << endl;
- cout << " | | " << endl;
- cout << " | d8888b. d8888b. .d8b. db d8b db | " << endl;
- cout << " | 88 `8D 88 `8D d8' `8b 88 I8I 88 | " << endl;
- cout << " | 88 88 88oobY' 88ooo88 88 I8I 88 | " << endl;
- cout << " | 88 88 88`8b 88~~~88 Y8 I8I 88 | " << endl;
- cout << " | 88 .8D 88 `88. 88 88 `8b d8'8b d8' | " << endl;
- cout << " | Y8888D' 88 YD YP YP `8b8' `8d8' | " << endl;
- cout << " | | " << endl;
- cout << " +=========================================+ " << endl;
- cout << " " << endl;
- cout << "The game concludes as a draw." << endl;
- cout << " " << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- else
- {
- cout << " " << endl;
- cout << p2 << ", it is your turn, please choose the box you would like to put the character in (number)." << endl;
- cin >> boxnum;
- if (boxnum == 1)
- {
- ticGrid[1][2] = 'O';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 2)
- {
- ticGrid[1][6] = 'O';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 3)
- {
- ticGrid[1][10] = 'O';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 4)
- {
- ticGrid[5][2] = 'O';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 5)
- {
- ticGrid[5][6] = 'O';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 6)
- {
- ticGrid[5][10] = 'O';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 7)
- {
- ticGrid[9][2] = 'O';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 8)
- {
- ticGrid[9][6] = 'O';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else if (boxnum == 9)
- {
- ticGrid[9][10] = 'O';
- for (int x = 0; x < 11; x++)
- {
- for (int y = 0; y < 12; y++)
- {
- cout << ticGrid [x][y];
- }
- cout << endl;
- }
- }
- else
- {
- cout << " " << endl;
- cout << "An invalid number was entered, please try again!" << endl;
- cout << " " << endl;
- }
- 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')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! " << p2 << ", you have won!" << endl;
- cout << " " << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- }
- } while (boxnum > 9 || boxnum < 1);
- }
- void instructionsTTT()
- {
- system("COLOR f1");
- printf;
- cout << " " << endl;
- cout << " +===============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | 888 w w w | " << endl;
- cout << " | 8 8d8b. d88b w8ww 8d8b 8 8 .d8b w8ww w .d8b. 8d8b. d88b | " << endl;
- cout << " | 8 8P Y8 `Yb. 8 8P 8b d8 8 8 8 8' .8 8P Y8 `Yb. | " << endl;
- cout << " | 888 8 8 Y88P Y8P 8 `Y8P8 `Y8P Y8P 8 `Y8P' 8 8 Y88P | " << endl;
- cout << " | | " << endl;
- cout << " +===============================================================+ " << endl;
- cout << " " << endl;
- cout << "1. Take out a 3x3 grid of squares (this will be provided for you here)." << endl;
- cout << "2. Player 1 (X character) goes first, player 2 (O character) goes second." << endl;
- 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;
- cout << "4. The player that is able to get 3 of his or her character in-a-row wins." << endl;
- cout << "5. If all spaces (9) are filled and nobody has 3 in-a-row, the game results as a draw." << endl;
- cout << " " << endl;
- 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;
- cout << " " << endl;
- }
- void instructionsHang()
- {
- system("COLOR f1");
- printf;
- cout << " " << endl;
- cout << " +===============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | 888 w w w | " << endl;
- cout << " | 8 8d8b. d88b w8ww 8d8b 8 8 .d8b w8ww w .d8b. 8d8b. d88b | " << endl;
- cout << " | 8 8P Y8 `Yb. 8 8P 8b d8 8 8 8 8' .8 8P Y8 `Yb. | " << endl;
- cout << " | 888 8 8 Y88P Y8P 8 `Y8P8 `Y8P Y8P 8 `Y8P' 8 8 Y88P | " << endl;
- cout << " | | " << endl;
- cout << " +===============================================================+ " << endl;
- cout << " " << endl;
- cout << "1. Choose the category you would like to choose a word from." << endl;
- cout << "2. A secret word will be chosen from that category for you to guess." << endl;
- cout << "3. Blank spaces will be shown, showing the number of letters in the word." << endl;
- cout << "4. A letter bank will also show up, showing the letters you have available." << endl;
- cout << "5. Start guessing letters you think that will be in the word. Correct guesses will show up in the blank spaces." << endl;
- 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;
- 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;
- 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;
- cout << "9. If you get 6 incorrect letters, you lose. If you guess the word before that, you win." << endl;
- cout << "10. If you repeat a letter, then you will add another body part (if the letter is wrong)." << endl;
- cout << " " << endl;
- cout << "Tips: Try to get rid of the vowels first." << endl;
- cout << " " << endl;
- }
- void hangGame()
- {
- int category;
- string wordUS, wordCOUN, wordANI;
- system("COLOR 0f");
- printf;
- cout << "--------------------------------------------------------------------------------" << endl;
- cout << "Welcome to hangman! Enjoy!" << endl;
- do {
- cout << " " << endl;
- cout << "From what category would you like to guess a word from?" << endl;
- cout << "1. US Cities" << endl;
- cout << "2. Countries" << endl;
- cout << "3. Animals" << endl;
- cout << " " << endl;
- cout << "Please choose the number corresponding to the category you would like to guess from." << endl;
- cin >> category;
- if (category == 1)
- {
- cout << "You have chosen the US Cities category." << endl;
- srand(time(NULL));
- int randCity = (rand() % 3) + 1;
- if (randCity == 1) //lansing
- {
- int category;
- int wrongguess = 0;
- int token = 2;
- char letterSample[8][18] =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {65,0,66,0,67,0,68,0,69,0,70,0,71},
- {72,0,73,0,74,0,75,0,76,0,77,0,78},
- {79,0,80,0,81,0,82,0,83,0,84,0,85},
- {0,0,86,0,87,0,88,0,89,0,90,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- char lansingWord[1][13] = {95,0,95,0,95,0,95,0,95,0,95,0,95};
- int z;
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- for (z = 0; z < 1000; z++)
- {
- char guess;
- cout << " " << endl;
- if (token >= 0)
- {
- cout << "-- Token(s) left: " << token << " --" << endl;
- }
- cout << " " << endl;
- cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
- cin >> guess;
- cout << " " << endl;
- cout << "---------------------------------------------------------------" << endl;
- if (guess == 'a' || guess == 'A')
- {
- lansingWord[0][2] = 'A';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'b' || guess == 'B')
- {
- letterSample[3][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'c' || guess == 'C')
- {
- letterSample[3][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'd' || guess == 'D')
- {
- letterSample[3][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'e' || guess == 'E')
- {
- letterSample[3][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'f' || guess == 'F')
- {
- letterSample[3][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'g' || guess == 'G')
- {
- lansingWord[0][12] = 'G';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'h' || guess == 'H')
- {
- letterSample[4][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'i' || guess == 'I')
- {
- lansingWord[0][8] = 'I';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'j' || guess == 'J')
- {
- letterSample[4][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'k' || guess == 'K')
- {
- letterSample[4][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'l' || guess == 'L')
- {
- lansingWord[0][0] = 'L';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'm' || guess == 'M')
- {
- letterSample[4][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'n' || guess == 'N')
- {
- lansingWord[0][4] = 'N';
- lansingWord[0][10] = 'N';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'o' || guess == 'O')
- {
- letterSample[5][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'p' || guess == 'P')
- {
- letterSample[5][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'q' || guess == 'Q')
- {
- letterSample[5][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'r' || guess == 'R')
- {
- letterSample[5][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 's' || guess == 'S')
- {
- lansingWord[0][6] = 'S';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 't' || guess == 'T')
- {
- letterSample[5][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'u' || guess == 'U')
- {
- letterSample[5][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'v' || guess == 'V')
- {
- letterSample[6][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'w' || guess == 'W')
- {
- letterSample[6][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'x' || guess == 'X')
- {
- letterSample[6][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'y' || guess == 'Y')
- {
- letterSample[6][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'z' || guess == 'Z')
- {
- letterSample[6][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == '0')
- {
- token--;
- if (token == 1)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 1: This city is the capital of a US state." << endl;
- }
- else if (token == 0)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 2: The capital is in US state that is in the midwest." << endl;
- }
- else
- {
- cout << "You have no more hints/token left. Sorry!" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- }
- }
- 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')
- {
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << lansingWord [x][y];
- }
- cout << endl;
- }
- wrongguess++;
- if (wrongguess == 1)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
- }
- else if (wrongguess == 2)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
- }
- else if (wrongguess == 3)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
- }
- else if (wrongguess == 4)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
- else if (wrongguess == 5)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
- }
- else if (wrongguess == 6)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \\ \n";
- cout << "| \n";
- cout << "| \n";
- system("COLOR 0C");
- printf;
- cout << " " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
- cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
- cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
- cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
- cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
- cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
- cout << " | | " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " " << endl;
- cout << "You have lost the game, good luck next time!" << endl;
- cout << " " << endl;
- cout << "The correct word was: LANSING." << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- 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')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! You have won!" << endl;
- cout << " " << endl;
- break;
- }
- }
- }
- else if (randCity == 2) //denver
- {
- int category;
- int wrongguess = 0;
- int token = 2;
- char letterSample[8][18] =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {65,0,66,0,67,0,68,0,69,0,70,0,71},
- {72,0,73,0,74,0,75,0,76,0,77,0,78},
- {79,0,80,0,81,0,82,0,83,0,84,0,85},
- {0,0,86,0,87,0,88,0,89,0,90,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- char denverWord[1][11] = {95,0,95,0,95,0,95,0,95,0,95};
- int z;
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- for (z = 0; z < 1000; z++)
- {
- char guess;
- cout << " " << endl;
- if (token >= 0)
- {
- cout << "-- Token(s) left: " << token << " --" << endl;
- }
- cout << " " << endl;
- cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
- cin >> guess;
- cout << " " << endl;
- cout << "---------------------------------------------------------------" << endl;
- if (guess == 'a' || guess == 'A')
- {
- letterSample[3][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'b' || guess == 'B')
- {
- letterSample[3][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'c' || guess == 'C')
- {
- letterSample[3][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'd' || guess == 'D')
- {
- denverWord[0][0] = 'D';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'e' || guess == 'E')
- {
- denverWord[0][2] = 'E';
- denverWord[0][8] = 'E';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'f' || guess == 'F')
- {
- letterSample[3][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'g' || guess == 'G')
- {
- letterSample[3][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'h' || guess == 'H')
- {
- letterSample[4][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'i' || guess == 'I')
- {
- letterSample[4][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'j' || guess == 'J')
- {
- letterSample[4][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'k' || guess == 'K')
- {
- letterSample[4][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'l' || guess == 'L')
- {
- letterSample[4][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'm' || guess == 'M')
- {
- letterSample[4][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'n' || guess == 'N')
- {
- denverWord[0][4] = 'N';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'o' || guess == 'O')
- {
- letterSample[5][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'p' || guess == 'P')
- {
- letterSample[5][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'q' || guess == 'Q')
- {
- letterSample[5][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'r' || guess == 'R')
- {
- denverWord[0][10] = 'R';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 's' || guess == 'S')
- {
- letterSample[5][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 't' || guess == 'T')
- {
- letterSample[5][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'u' || guess == 'U')
- {
- letterSample[5][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'v' || guess == 'V')
- {
- denverWord[0][6] = 'V';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord [x][y];
- }
- cout << endl;
- }
- letterSample[6][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'w' || guess == 'W')
- {
- letterSample[6][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'x' || guess == 'X')
- {
- letterSample[6][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'y' || guess == 'Y')
- {
- letterSample[6][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'z' || guess == 'Z')
- {
- letterSample[6][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == '0')
- {
- token--;
- if (token == 1)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord[x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 1: This city is the capital of a US state." << endl;
- }
- else if (token == 0)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 2: This city includes many ski resorts for the winter time." << endl;
- }
- else
- {
- cout << "You have no more hints/token left. Sorry!" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord [x][y];
- }
- cout << endl;
- }
- }
- }
- 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')
- {
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << denverWord [x][y];
- }
- cout << endl;
- }
- wrongguess++;
- if (wrongguess == 1)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
- }
- else if (wrongguess == 2)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
- }
- else if (wrongguess == 3)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
- }
- else if (wrongguess == 4)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
- else if (wrongguess == 5)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
- }
- else if (wrongguess == 6)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \\ \n";
- cout << "| \n";
- cout << "| \n";
- system("COLOR 0C");
- printf;
- cout << " " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
- cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
- cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
- cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
- cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
- cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
- cout << " | | " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " " << endl;
- cout << "You have lost the game, good luck next time!" << endl;
- cout << " " << endl;
- cout << "The correct word was: DENVER." << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- 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')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! You have won!" << endl;
- cout << " " << endl;
- break;
- }
- }
- }
- else if (randCity == 3) //atlanta
- {
- int category;
- int wrongguess = 0;
- int token = 2;
- char letterSample[8][18] =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {65,0,66,0,67,0,68,0,69,0,70,0,71},
- {72,0,73,0,74,0,75,0,76,0,77,0,78},
- {79,0,80,0,81,0,82,0,83,0,84,0,85},
- {0,0,86,0,87,0,88,0,89,0,90,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- char atlantaWord[1][13] = {95,0,95,0,95,0,95,0,95,0,95,0,95};
- int z;
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << atlantaWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- for (z = 0; z < 1000; z++)
- {
- char guess;
- cout << " " << endl;
- if (token >= 0)
- {
- cout << "-- Token(s) left: " << token << " --" << endl;
- }
- cout << " " << endl;
- cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
- cin >> guess;
- cout << " " << endl;
- cout << "---------------------------------------------------------------" << endl;
- if (guess == 'a' || guess == 'A')
- {
- atlantaWord[0][0] = 'A';
- atlantaWord[0][6] = 'A';
- atlantaWord[0][12] = 'A';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << atlantaWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'b' || guess == 'B')
- {
- letterSample[3][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'c' || guess == 'C')
- {
- letterSample[3][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'd' || guess == 'D')
- {
- letterSample[3][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'e' || guess == 'E')
- {
- letterSample[3][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'f' || guess == 'F')
- {
- letterSample[3][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'g' || guess == 'G')
- {
- letterSample[3][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'h' || guess == 'H')
- {
- letterSample[4][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'i' || guess == 'I')
- {
- letterSample[4][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'j' || guess == 'J')
- {
- letterSample[4][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'k' || guess == 'K')
- {
- letterSample[4][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'l' || guess == 'L')
- {
- atlantaWord[0][4] = 'L';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << atlantaWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'm' || guess == 'M')
- {
- letterSample[4][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'n' || guess == 'N')
- {
- atlantaWord[0][8] = 'N';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << atlantaWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'o' || guess == 'O')
- {
- letterSample[5][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'p' || guess == 'P')
- {
- letterSample[5][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'q' || guess == 'Q')
- {
- letterSample[5][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'r' || guess == 'R')
- {
- letterSample[5][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 's' || guess == 'S')
- {
- letterSample[5][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 't' || guess == 'T')
- {
- atlantaWord[0][2] = 'T';
- atlantaWord[0][10] = 'T';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << atlantaWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'u' || guess == 'U')
- {
- letterSample[5][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'v' || guess == 'V')
- {
- letterSample[6][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'w' || guess == 'W')
- {
- letterSample[6][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'x' || guess == 'X')
- {
- letterSample[6][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'y' || guess == 'Y')
- {
- letterSample[6][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'z' || guess == 'Z')
- {
- letterSample[6][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == '0')
- {
- token--;
- if (token == 1)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << atlantaWord[x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 1: This city is in the southeast." << endl;
- }
- else if (token == 0)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << atlantaWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 2: Coca-Cola was founded in the state of this city." << endl;
- }
- else
- {
- cout << "You have no more hints/token left. Sorry!" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << atlantaWord [x][y];
- }
- cout << endl;
- }
- }
- }
- 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')
- {
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << atlantaWord [x][y];
- }
- cout << endl;
- }
- wrongguess++;
- if (wrongguess == 1)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
- }
- else if (wrongguess == 2)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
- }
- else if (wrongguess == 3)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
- }
- else if (wrongguess == 4)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
- else if (wrongguess == 5)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
- }
- else if (wrongguess == 6)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \\ \n";
- cout << "| \n";
- cout << "| \n";
- system("COLOR 0C");
- printf;
- cout << " " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
- cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
- cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
- cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
- cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
- cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
- cout << " | | " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " " << endl;
- cout << "You have lost the game, good luck next time!" << endl;
- cout << " " << endl;
- cout << "The correct word was: ATLANTA." << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- 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')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! You have won!" << endl;
- cout << " " << endl;
- break;
- }
- }
- }
- }
- else if (category == 2)
- {
- cout << "You have chosen the Countries category." << endl;
- srand(time(NULL));
- int randCoun = (rand() % 3) + 1;
- if (randCoun == 1) //chile
- {
- int category;
- int wrongguess = 0;
- int token = 2;
- char letterSample[8][18] =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {65,0,66,0,67,0,68,0,69,0,70,0,71},
- {72,0,73,0,74,0,75,0,76,0,77,0,78},
- {79,0,80,0,81,0,82,0,83,0,84,0,85},
- {0,0,86,0,87,0,88,0,89,0,90,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- char chileWord[1][9] = {95,0,95,0,95,0,95,0,95};
- int z;
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- for (z = 0; z < 1000; z++)
- {
- char guess;
- cout << " " << endl;
- if (token >= 0)
- {
- cout << "-- Token(s) left: " << token << " --" << endl;
- }
- cout << " " << endl;
- cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
- cin >> guess;
- cout << " " << endl;
- cout << "---------------------------------------------------------------" << endl;
- if (guess == 'a' || guess == 'A')
- {
- letterSample[3][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'b' || guess == 'B')
- {
- letterSample[3][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'c' || guess == 'C')
- {
- chileWord[0][0] = 'C';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'd' || guess == 'D')
- {
- letterSample[3][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'e' || guess == 'E')
- {
- chileWord[0][8] = 'E';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'f' || guess == 'F')
- {
- letterSample[3][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'g' || guess == 'G')
- {
- letterSample[3][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'h' || guess == 'H')
- {
- chileWord[0][2] = 'H';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'i' || guess == 'I')
- {
- chileWord[0][4] = 'I';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'j' || guess == 'J')
- {
- letterSample[4][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'k' || guess == 'K')
- {
- letterSample[4][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'l' || guess == 'L')
- {
- chileWord[0][6] = 'L';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'm' || guess == 'M')
- {
- letterSample[4][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'n' || guess == 'N')
- {
- letterSample[4][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'o' || guess == 'O')
- {
- letterSample[5][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'p' || guess == 'P')
- {
- letterSample[5][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'q' || guess == 'Q')
- {
- letterSample[5][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'r' || guess == 'R')
- {
- letterSample[5][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 's' || guess == 'S')
- {
- letterSample[5][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 't' || guess == 'T')
- {
- letterSample[5][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'u' || guess == 'U')
- {
- letterSample[5][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'v' || guess == 'V')
- {
- letterSample[6][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'w' || guess == 'W')
- {
- letterSample[6][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'x' || guess == 'X')
- {
- letterSample[6][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'y' || guess == 'Y')
- {
- letterSample[6][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'z' || guess == 'Z')
- {
- letterSample[6][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == '0')
- {
- token--;
- if (token == 1)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord[x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 1: This country is located in South America." << endl;
- }
- else if (token == 0)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 2: The country includes a big mountain range." << endl;
- }
- else
- {
- cout << "You have no more hints/token left. Sorry!" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord [x][y];
- }
- cout << endl;
- }
- }
- }
- 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')
- {
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << chileWord [x][y];
- }
- cout << endl;
- }
- wrongguess++;
- if (wrongguess == 1)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
- }
- else if (wrongguess == 2)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
- }
- else if (wrongguess == 3)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
- }
- else if (wrongguess == 4)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
- else if (wrongguess == 5)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
- }
- else if (wrongguess == 6)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \\ \n";
- cout << "| \n";
- cout << "| \n";
- system("COLOR 0C");
- printf;
- cout << " " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
- cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
- cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
- cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
- cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
- cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
- cout << " | | " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " " << endl;
- cout << "You have lost the game, good luck next time!" << endl;
- cout << " " << endl;
- cout << "The correct word was: CHILE." << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- if (chileWord[0][0] == 'C' && chileWord[0][2] == 'H' && chileWord[0][4] == 'I' && chileWord[0][6] == 'L' && chileWord[0][8] == 'E')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! You have won!" << endl;
- cout << " " << endl;
- break;
- }
- }
- }
- else if (randCoun == 2) //denmark
- {
- int category;
- int wrongguess = 0;
- int token = 2;
- char letterSample[8][18] =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {65,0,66,0,67,0,68,0,69,0,70,0,71},
- {72,0,73,0,74,0,75,0,76,0,77,0,78},
- {79,0,80,0,81,0,82,0,83,0,84,0,85},
- {0,0,86,0,87,0,88,0,89,0,90,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- char denmarkWord[1][13] = {95,0,95,0,95,0,95,0,95,0,95,0,95};
- int z;
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- for (z = 0; z < 1000; z++)
- {
- char guess;
- cout << " " << endl;
- if (token >= 0)
- {
- cout << "-- Token(s) left: " << token << " --" << endl;
- }
- cout << " " << endl;
- cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
- cin >> guess;
- cout << " " << endl;
- cout << "---------------------------------------------------------------" << endl;
- if (guess == 'a' || guess == 'A')
- {
- denmarkWord[0][8] = 'A';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'b' || guess == 'B')
- {
- letterSample[3][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'c' || guess == 'C')
- {
- letterSample[3][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'd' || guess == 'D')
- {
- denmarkWord[0][0] = 'D';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'e' || guess == 'E')
- {
- denmarkWord[0][2] = 'E';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'f' || guess == 'F')
- {
- letterSample[3][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'g' || guess == 'G')
- {
- letterSample[3][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'h' || guess == 'H')
- {
- letterSample[4][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'i' || guess == 'I')
- {
- letterSample[4][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'j' || guess == 'J')
- {
- letterSample[4][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'k' || guess == 'K')
- {
- denmarkWord[0][12] = 'K';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'l' || guess == 'L')
- {
- letterSample[4][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'm' || guess == 'M')
- {
- denmarkWord[0][6] = 'M';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'n' || guess == 'N')
- {
- denmarkWord[0][4] = 'N';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'o' || guess == 'O')
- {
- letterSample[5][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'p' || guess == 'P')
- {
- letterSample[5][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'q' || guess == 'Q')
- {
- letterSample[5][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'r' || guess == 'R')
- {
- denmarkWord[0][10] = 'R';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 's' || guess == 'S')
- {
- letterSample[5][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 't' || guess == 'T')
- {
- letterSample[5][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'u' || guess == 'U')
- {
- letterSample[5][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'v' || guess == 'V')
- {
- letterSample[6][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'w' || guess == 'W')
- {
- letterSample[6][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'x' || guess == 'X')
- {
- letterSample[6][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'y' || guess == 'Y')
- {
- letterSample[6][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'z' || guess == 'Z')
- {
- letterSample[6][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == '0')
- {
- token--;
- if (token == 1)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord[x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 1: This country is located in Europe." << endl;
- }
- else if (token == 0)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 2: The country's flag has a cross near the center." << endl;
- }
- else
- {
- cout << "You have no more hints/token left. Sorry!" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- }
- }
- 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')
- {
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << denmarkWord [x][y];
- }
- cout << endl;
- }
- wrongguess++;
- if (wrongguess == 1)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
- }
- else if (wrongguess == 2)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
- }
- else if (wrongguess == 3)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
- }
- else if (wrongguess == 4)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
- else if (wrongguess == 5)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
- }
- else if (wrongguess == 6)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \\ \n";
- cout << "| \n";
- cout << "| \n";
- system("COLOR 0C");
- printf;
- cout << " " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
- cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
- cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
- cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
- cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
- cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
- cout << " | | " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " " << endl;
- cout << "You have lost the game, good luck next time!" << endl;
- cout << " " << endl;
- cout << "The correct word was: DENMARK." << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- 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')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! You have won!" << endl;
- cout << " " << endl;
- break;
- }
- }
- }
- else if (randCoun == 3) //italy
- {
- int category;
- int wrongguess = 0;
- int token = 2;
- char letterSample[8][18] =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {65,0,66,0,67,0,68,0,69,0,70,0,71},
- {72,0,73,0,74,0,75,0,76,0,77,0,78},
- {79,0,80,0,81,0,82,0,83,0,84,0,85},
- {0,0,86,0,87,0,88,0,89,0,90,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- char italyWord[1][9] = {95,0,95,0,95,0,95,0,95};
- int z;
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- for (z = 0; z < 1000; z++)
- {
- char guess;
- cout << " " << endl;
- if (token >= 0)
- {
- cout << "-- Token(s) left: " << token << " --" << endl;
- }
- cout << " " << endl;
- cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
- cin >> guess;
- cout << " " << endl;
- cout << "---------------------------------------------------------------" << endl;
- if (guess == 'a' || guess == 'A')
- {
- italyWord[0][4] = 'A';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'b' || guess == 'B')
- {
- letterSample[3][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'c' || guess == 'C')
- {
- letterSample[3][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'd' || guess == 'D')
- {
- letterSample[3][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'e' || guess == 'E')
- {
- letterSample[3][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'f' || guess == 'F')
- {
- letterSample[3][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'g' || guess == 'G')
- {
- letterSample[3][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'h' || guess == 'H')
- {
- letterSample[4][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'i' || guess == 'I')
- {
- italyWord[0][0] = 'I';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'j' || guess == 'J')
- {
- letterSample[4][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'k' || guess == 'K')
- {
- letterSample[4][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'l' || guess == 'L')
- {
- italyWord[0][6] = 'L';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'm' || guess == 'M')
- {
- letterSample[4][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'n' || guess == 'N')
- {
- letterSample[4][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'o' || guess == 'O')
- {
- letterSample[5][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'p' || guess == 'P')
- {
- letterSample[5][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'q' || guess == 'Q')
- {
- letterSample[5][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'r' || guess == 'R')
- {
- letterSample[5][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 's' || guess == 'S')
- {
- letterSample[5][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 't' || guess == 'T')
- {
- italyWord[0][2] = 'T';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'u' || guess == 'U')
- {
- letterSample[5][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'v' || guess == 'V')
- {
- letterSample[6][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'w' || guess == 'W')
- {
- letterSample[6][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'x' || guess == 'X')
- {
- letterSample[6][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'y' || guess == 'Y')
- {
- italyWord[0][8] = 'Y';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord [x][y];
- }
- cout << endl;
- }
- letterSample[6][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'z' || guess == 'Z')
- {
- letterSample[6][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == '0')
- {
- token--;
- if (token == 1)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord[x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 1: This country is located in Europe." << endl;
- }
- else if (token == 0)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 2: The country's flag consists of 3 vertical stripes." << endl;
- }
- else
- {
- cout << "You have no more hints/token left. Sorry!" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord [x][y];
- }
- cout << endl;
- }
- }
- }
- 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')
- {
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << italyWord [x][y];
- }
- cout << endl;
- }
- wrongguess++;
- if (wrongguess == 1)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
- }
- else if (wrongguess == 2)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
- }
- else if (wrongguess == 3)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
- }
- else if (wrongguess == 4)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
- else if (wrongguess == 5)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
- }
- else if (wrongguess == 6)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \\ \n";
- cout << "| \n";
- cout << "| \n";
- system("COLOR 0C");
- printf;
- cout << " " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
- cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
- cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
- cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
- cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
- cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
- cout << " | | " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " " << endl;
- cout << "You have lost the game, good luck next time!" << endl;
- cout << " " << endl;
- cout << "The correct word was: ITALY." << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- if (italyWord[0][0] == 'I' && italyWord[0][2] == 'T' && italyWord[0][4] == 'A' && italyWord[0][6] == 'L' && italyWord[0][8] == 'Y')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! You have won!" << endl;
- cout << " " << endl;
- break;
- }
- }
- }
- }
- else if (category == 3)
- {
- cout << "You have chosen the Animals category." << endl;
- srand(time(NULL));
- int randAni = (rand() % 3) + 1;
- cin >> wordANI;
- if (randAni == 1) //panther
- {
- int category;
- int wrongguess = 0;
- int token = 2;
- char letterSample[8][18] =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {65,0,66,0,67,0,68,0,69,0,70,0,71},
- {72,0,73,0,74,0,75,0,76,0,77,0,78},
- {79,0,80,0,81,0,82,0,83,0,84,0,85},
- {0,0,86,0,87,0,88,0,89,0,90,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- char pantherWord[1][13] = {95,0,95,0,95,0,95,0,95,0,95,0,95};
- int z;
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- for (z = 0; z < 1000; z++)
- {
- char guess;
- cout << " " << endl;
- if (token >= 0)
- {
- cout << "-- Token(s) left: " << token << " --" << endl;
- }
- cout << " " << endl;
- cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
- cin >> guess;
- cout << " " << endl;
- cout << "---------------------------------------------------------------" << endl;
- if (guess == 'a' || guess == 'A')
- {
- pantherWord[0][2] = 'A';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'b' || guess == 'B')
- {
- letterSample[3][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'c' || guess == 'C')
- {
- letterSample[3][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'd' || guess == 'D')
- {
- letterSample[3][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'e' || guess == 'E')
- {
- pantherWord[0][10] = 'E';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'f' || guess == 'F')
- {
- letterSample[3][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'g' || guess == 'G')
- {
- letterSample[3][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'h' || guess == 'H')
- {
- pantherWord[0][8] = 'H';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'i' || guess == 'I')
- {
- letterSample[4][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'j' || guess == 'J')
- {
- letterSample[4][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'k' || guess == 'K')
- {
- letterSample[4][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'l' || guess == 'L')
- {
- letterSample[4][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'm' || guess == 'M')
- {
- letterSample[4][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'n' || guess == 'N')
- {
- pantherWord[0][4] = 'N';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'o' || guess == 'O')
- {
- letterSample[5][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'p' || guess == 'P')
- {
- pantherWord[0][0] = 'P';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;cout << " " << endl;
- }
- else if (guess == 'q' || guess == 'Q')
- {
- letterSample[5][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'r' || guess == 'R')
- {
- pantherWord[0][12] = 'R';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 's' || guess == 'S')
- {
- letterSample[5][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 't' || guess == 'T')
- {
- pantherWord[0][6] = 'T';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'u' || guess == 'U')
- {
- letterSample[5][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'v' || guess == 'V')
- {
- letterSample[6][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'w' || guess == 'W')
- {
- letterSample[6][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'x' || guess == 'X')
- {
- letterSample[6][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'y' || guess == 'Y')
- {
- letterSample[6][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'z' || guess == 'Z')
- {
- letterSample[6][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == '0')
- {
- token--;
- if (token == 1)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord[x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 1: The animal is part of the cat family." << endl;
- }
- else if (token == 0)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 2: The animal is the mascot of an NFL team." << endl;
- }
- else
- {
- cout << "You have no more hints/token left. Sorry!" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- }
- }
- 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')
- {
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 13; y++)
- {
- cout << pantherWord [x][y];
- }
- cout << endl;
- }
- wrongguess++;
- if (wrongguess == 1)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
- }
- else if (wrongguess == 2)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
- }
- else if (wrongguess == 3)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
- }
- else if (wrongguess == 4)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
- else if (wrongguess == 5)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
- }
- else if (wrongguess == 6)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \\ \n";
- cout << "| \n";
- cout << "| \n";
- system("COLOR 0C");
- printf;
- cout << " " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
- cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
- cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
- cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
- cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
- cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
- cout << " | | " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " " << endl;
- cout << "You have lost the game, good luck next time!" << endl;
- cout << " " << endl;
- cout << "The correct word was: PANTHER." << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- 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')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! You have won!" << endl;
- cout << " " << endl;
- break;
- }
- }
- }
- else if (randAni == 2) //jaguar
- {
- int category;
- int wrongguess = 0;
- int token = 2;
- char letterSample[8][18] =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {65,0,66,0,67,0,68,0,69,0,70,0,71},
- {72,0,73,0,74,0,75,0,76,0,77,0,78},
- {79,0,80,0,81,0,82,0,83,0,84,0,85},
- {0,0,86,0,87,0,88,0,89,0,90,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- char jaguarWord[1][11] = {95,0,95,0,95,0,95,0,95,0,95};
- int z;
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- for (z = 0; z < 1000; z++)
- {
- char guess;
- cout << " " << endl;
- if (token >= 0)
- {
- cout << "-- Token(s) left: " << token << " --" << endl;
- }
- cout << " " << endl;
- cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
- cin >> guess;
- cout << " " << endl;
- cout << "---------------------------------------------------------------" << endl;
- if (guess == 'a' || guess == 'A')
- {
- jaguarWord[0][2] = 'A';
- jaguarWord[0][8] = 'A';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'b' || guess == 'B')
- {
- letterSample[3][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'c' || guess == 'C')
- {
- letterSample[3][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'd' || guess == 'D')
- {
- letterSample[3][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'e' || guess == 'E')
- {
- letterSample[3][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'f' || guess == 'F')
- {
- letterSample[3][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'g' || guess == 'G')
- {
- jaguarWord[0][4] = 'G';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'h' || guess == 'H')
- {
- letterSample[4][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'i' || guess == 'I')
- {
- letterSample[4][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'j' || guess == 'J')
- {
- jaguarWord[0][0] = 'J';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'k' || guess == 'K')
- {
- letterSample[4][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'l' || guess == 'L')
- {
- letterSample[4][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'm' || guess == 'M')
- {
- letterSample[4][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'n' || guess == 'N')
- {
- letterSample[4][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'o' || guess == 'O')
- {
- letterSample[5][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'p' || guess == 'P')
- {
- letterSample[5][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'q' || guess == 'Q')
- {
- letterSample[5][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'r' || guess == 'R')
- {
- jaguarWord[0][10] = 'R';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 's' || guess == 'S')
- {
- letterSample[5][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 't' || guess == 'T')
- {
- letterSample[5][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'u' || guess == 'U')
- {
- jaguarWord[0][6] = 'U';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'v' || guess == 'V')
- {
- letterSample[6][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'w' || guess == 'W')
- {
- letterSample[6][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'x' || guess == 'X')
- {
- letterSample[6][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'y' || guess == 'Y')
- {
- letterSample[6][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'z' || guess == 'Z')
- {
- letterSample[6][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == '0')
- {
- token--;
- if (token == 1)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord[x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 1: The animal is a mammal." << endl;
- }
- else if (token == 0)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 2: The animal is the mascot of an NFL team." << endl;
- }
- else
- {
- cout << "You have no more hints/token left. Sorry!" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord [x][y];
- }
- cout << endl;
- }
- }
- }
- 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')
- {
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 11; y++)
- {
- cout << jaguarWord [x][y];
- }
- cout << endl;
- }
- wrongguess++;
- if (wrongguess == 1)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
- }
- else if (wrongguess == 2)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
- }
- else if (wrongguess == 3)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
- }
- else if (wrongguess == 4)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
- else if (wrongguess == 5)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
- }
- else if (wrongguess == 6)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \\ \n";
- cout << "| \n";
- cout << "| \n";
- system("COLOR 0C");
- printf;
- cout << " " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
- cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
- cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
- cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
- cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
- cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
- cout << " | | " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " " << endl;
- cout << "You have lost the game, good luck next time!" << endl;
- cout << " " << endl;
- cout << "The correct word was: JAGUAR." << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- 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')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! You have won!" << endl;
- cout << " " << endl;
- break;
- }
- }
- }
- else if (randAni == 3) //shark
- {
- int category;
- int wrongguess = 0;
- int token = 2;
- char letterSample[8][18] =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {82,101,109,97,105,110,105,110,103,0,76,101,116,116,101,114,115,58},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- {65,0,66,0,67,0,68,0,69,0,70,0,71},
- {72,0,73,0,74,0,75,0,76,0,77,0,78},
- {79,0,80,0,81,0,82,0,83,0,84,0,85},
- {0,0,86,0,87,0,88,0,89,0,90,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- char sharkWord[1][9] = {95,0,95,0,95,0,95,0,95};
- int z;
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- for (z = 0; z < 1000; z++)
- {
- char guess;
- cout << " " << endl;
- if (token >= 0)
- {
- cout << "-- Token(s) left: " << token << " --" << endl;
- }
- cout << " " << endl;
- cout << "Press the 0 key to request a hint, it uses a token. Otherwise, please guess a letter:" << endl;
- cin >> guess;
- cout << " " << endl;
- cout << "---------------------------------------------------------------" << endl;
- if (guess == 'a' || guess == 'A')
- {
- sharkWord[0][4] = 'A';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord [x][y];
- }
- cout << endl;
- }
- letterSample[3][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'b' || guess == 'B')
- {
- letterSample[3][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'c' || guess == 'C')
- {
- letterSample[3][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'd' || guess == 'D')
- {
- letterSample[3][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'e' || guess == 'E')
- {
- letterSample[3][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'f' || guess == 'F')
- {
- letterSample[3][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'g' || guess == 'G')
- {
- letterSample[3][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'h' || guess == 'H')
- {
- sharkWord[0][2] = 'H';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'i' || guess == 'I')
- {
- letterSample[4][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'j' || guess == 'J')
- {
- letterSample[4][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'k' || guess == 'K')
- {
- sharkWord[0][8] = 'K';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord [x][y];
- }
- cout << endl;
- }
- letterSample[4][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 'l' || guess == 'L')
- {
- letterSample[4][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'm' || guess == 'M')
- {
- letterSample[4][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'n' || guess == 'N')
- {
- letterSample[4][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'o' || guess == 'O')
- {
- letterSample[5][0] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'p' || guess == 'P')
- {
- letterSample[5][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'q' || guess == 'Q')
- {
- letterSample[5][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'r' || guess == 'R')
- {
- sharkWord[0][6] = 'R';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 's' || guess == 'S')
- {
- sharkWord[0][0] = 'S';
- cout << " " << endl;
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord [x][y];
- }
- cout << endl;
- }
- letterSample[5][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << "Correct - Congratulations! You have entered a correct letter." << endl;
- }
- else if (guess == 't' || guess == 'T')
- {
- letterSample[5][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'u' || guess == 'U')
- {
- letterSample[5][12] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'v' || guess == 'V')
- {
- letterSample[6][2] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'w' || guess == 'W')
- {
- letterSample[6][4] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'x' || guess == 'X')
- {
- letterSample[6][6] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'y' || guess == 'Y')
- {
- letterSample[6][8] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == 'z' || guess == 'Z')
- {
- letterSample[6][10] = 0;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- }
- else if (guess == '0')
- {
- token--;
- if (token == 1)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord[x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 1: This animal has very sharp teeth." << endl;
- }
- else if (token == 0)
- {
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord [x][y];
- }
- cout << endl;
- }
- cout << " " << endl;
- cout << "Hint 2: This animal lives in the water." << endl;
- }
- else
- {
- cout << "You have no more hints/token left. Sorry!" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord [x][y];
- }
- cout << endl;
- }
- }
- }
- 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')
- {
- cout << "---------------------------------------------------------------" << endl;
- for (int x = 0; x < 8; x++)
- {
- for (int y = 0; y < 18; y++)
- {
- cout << letterSample [x][y];
- }
- cout << endl;
- }
- for (int x = 0; x < 1; x++)
- {
- for (int y = 0; y < 9; y++)
- {
- cout << sharkWord [x][y];
- }
- cout << endl;
- }
- wrongguess++;
- if (wrongguess == 1)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 1 incorrect letter. Please try again, you have 5 more body parts left before losing." << endl;
- }
- else if (wrongguess == 2)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| | \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 2 incorrect letters. Please try again, you have 4 more body parts left before losing." << endl;
- }
- else if (wrongguess == 3)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /| \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 3 incorrect letters. Please try again, you have 3 more body parts left before losing." << endl;
- }
- else if (wrongguess == 4)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 4 incorrect letters. Please try again, you have 2 more body parts left before losing." << endl; }
- else if (wrongguess == 5)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \n";
- cout << "| \n";
- cout << "| \n";
- cout << " " << endl;
- cout << "Incorrect - You have entered 5 incorrect letter. Please try again, you have 1 more body part before losing." << endl;
- }
- else if (wrongguess == 6)
- {
- cout << " _________ \n";
- cout << "| | \n";
- cout << "| 0 \n";
- cout << "| /|\\ \n";
- cout << "| / \\ \n";
- cout << "| \n";
- cout << "| \n";
- system("COLOR 0C");
- printf;
- cout << " " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db db .d88b. db db db .d88b. .d8888. d888888b | " << endl;
- cout << " | `8b d8' .8P Y8. 88 88 88 .8P Y8. 88' YP `~~88~~' | " << endl;
- cout << " | `8bd8' 88 88 88 88 88 88 88 `8bo. 88 | " << endl;
- cout << " | 88 88 88 88 88 88 88 88 `Y8b. 88 | " << endl;
- cout << " | 88 `8b d8' 88b d88 88booo. `8b d8' db 8D 88 | " << endl;
- cout << " | YP `Y88P' ~Y8888P' Y88888P `Y88P' `8888Y' YP | " << endl;
- cout << " | | " << endl;
- cout << " +=====================================================================+ " << endl;
- cout << " " << endl;
- cout << "You have lost the game, good luck next time!" << endl;
- cout << " " << endl;
- cout << "The correct word was: SHARK." << endl;
- break;
- }
- else
- {
- cout << " " << endl;
- }
- }
- if (sharkWord[0][0] == 'S' && sharkWord[0][2] == 'H' && sharkWord[0][4] == 'A' && sharkWord[0][6] == 'R' && sharkWord[0][8] == 'K')
- {
- system("COLOR 0A");
- printf;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | db d8b db d888888b d8b db d8b db d88888b d8888b. | " << endl;
- cout << " | 88 I8I 88 `88' 888o 88 888o 88 88' 88 `8D | " << endl;
- cout << " | 88 I8I 88 88 88V8o 88 88V8o 88 88ooooo 88oobY' | " << endl;
- cout << " | Y8 I8I 88 88 88 V8o88 88 V8o88 88ooooo 88`8b | " << endl;
- cout << " | `8b d8'8b d8' .88. 88 V888 88 V888 88. 88 `88. | " << endl;
- cout << " | `8b8' `8d8' Y888888P VP V8P VP V8P Y88888P 88 YD | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "Congratulations! You have won!" << endl;
- cout << " " << endl;
- break;
- }
- }
- }
- }
- else
- {
- cout << " " << endl;
- cout << "Error: You have typed an invalid number. Please try again." << endl;
- }
- } while (category < 1 || category > 3);
- }
- int main()
- {
- int option;
- do
- {
- int tttchoice;
- int hangchoice;
- string hangoption;
- int playAgain;
- system("COLOR 0b");
- printf;
- cout << " " << endl;
- cout << " +==========================================================================+" << endl;
- cout << " | ____ _ ____ ____ ____ _ ____ ____ ____ _ _ ____ ____ ____ ___ |" << endl;
- cout << " | | | |__| [__ [__ | | | __ |__| |\\/| |___ [__ |___ | | " << endl;
- cout << " | |___ |___ | | ___] ___] | |___ |__] | | | | |___ ___] |___ | |" << endl;
- cout << " | |" << endl;
- cout << " +==========================================================================+" << endl;
- cout << " " << endl;
- cout << "Welcome to the Classic Game Set!" << endl;
- cout << " " << endl;
- cout << "1. Tic-Tac-Toe (Multi-player)" << endl;
- cout << "2. Hangman (Single-player)" << endl;
- cout << "3. Quit Program" << endl;
- cout << " " << endl;
- cout << "Please select the game or action you would like to take place. Choose the corresponding number." << endl;
- cin >> option;
- cout << " " << endl;
- if (option == 1)
- {
- do
- {
- system("COLOR fc");
- printf;
- int tttchoice;
- char TTToption;
- cout << " " << endl;
- cout << " +============================================================+ " << endl;
- cout << " | | " << endl;
- cout << " | 88888 w 88888 88888 | " << endl;
- cout << " | 8 w .d8b 8 .d88 .d8b 8 .d8b. .d88b | " << endl;
- cout << " | 8 8 8 wwww 8 8 8 8 wwww 8 8' .8 8.dP' | " << endl;
- cout << " | 8 8 `Y8P 8 `Y88 `Y8P 8 `Y8P' `Y88P | " << endl;
- cout << " | | " << endl;
- cout << " +============================================================+ " << endl;
- cout << " " << endl;
- cout << "1. Start the game" << endl;
- cout << "2. Read the instructions" << endl;
- cout << "3. Quit Program" << endl;
- cout << " " << endl;
- cout << "Please select what you would like to to with the game. Choose the corresponding number." << endl;
- cin >> tttchoice;
- if (tttchoice == 1)
- {
- ticGame();
- break;
- }
- else if (tttchoice == 2)
- {
- instructionsTTT();
- string TTToption;
- cout << "Please press and enter any key when you are ready to continue to the game." << endl;
- cin >> TTToption;
- ticGame();
- break;
- }
- else if (tttchoice == 3)
- {
- exit(1);
- }
- else
- {
- cout << " " << endl;
- cout << "An invalid number was entered, please try again!" << endl;
- }
- } while (tttchoice > 3 || tttchoice < 1);
- }
- else if (option == 2)
- {
- do
- {
- system("COLOR fc");
- printf;
- int hangchoice;
- cout << " " << endl;
- cout << " +==============================================+ " << endl;
- cout << " | | " << endl;
- cout << " | 8 8 | " << endl;
- cout << " | 8www8 .d88 8d8b. .d88 8d8b.d8b. .d88 8d8b. | " << endl;
- cout << " | 8 8 8 8 8P Y8 8 8 8P Y8P Y8 8 8 8P Y8 | " << endl;
- cout << " | 8 8 `Y88 8 8 `Y88 8 8 8 `Y88 8 8 | " << endl;
- cout << " | wwdP | " << endl;
- cout << " +==============================================+ " << endl;
- cout << " " << endl;
- cout << "1. Start the game" << endl;
- cout << "2. Read the instructions" << endl;
- cout << "3. Quit Program" << endl;
- cout << " " << endl;
- cout << "Please select what you would like to to with the game. Choose the corresponding number." << endl;
- cin >> hangchoice;
- if (hangchoice == 1)
- {
- hangGame();
- break;
- }
- else if (hangchoice == 2)
- {
- instructionsHang();
- string hangoption;
- cout << "Please press and enter any key when you are ready to continue to the game." << endl;
- cin >> hangoption;
- hangGame();
- break;
- }
- else if (hangchoice == 3)
- {
- exit(1);
- }
- else
- {
- cout << " " << endl;
- cout << "An invalid number was entered, please try again!" << endl;
- }
- } while (hangchoice > 3 || hangchoice < 1);
- }
- else if (option == 3)
- {
- exit(1);
- }
- else
- {
- cout << "An invalid number was entered, please try again!" << endl;
- }
- } while (option > 3 || option < 1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement