condition when a player wins
| 178 | } |
| 179 | //condition when a player wins |
| 180 | void win() { |
| 181 | if (score == 100) { |
| 182 | system("cls"); |
| 183 | cout << endl << endl << endl << endl << endl; |
| 184 | cout << " "; |
| 185 | cout << "Congratulations you won the game " << endl; |
| 186 | cout << endl; |
| 187 | cout << " "; |
| 188 | cout << "To go back please enter any key" << endl; |
| 189 | char back; |
| 190 | cin >> back; |
| 191 | if (back) { |
| 192 | welcome(); |
| 193 | game = false; |
| 194 | } |
| 195 | } |
| 196 | } |
| 197 | //starting game |
| 198 | void startGame() { |
| 199 | Init(); |