MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / win

Function win

Project_Snake_Game/snake-game.cpp:180–196  ·  view source on GitHub ↗

condition when a player wins

Source from the content-addressed store, hash-verified

178}
179//condition when a player wins
180void 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
198void startGame() {
199 Init();

Callers 1

startGameFunction · 0.85

Calls 1

welcomeFunction · 0.85

Tested by

no test coverage detected