Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include wall.h //#include //#include //#include //#include //#include l/use to generate a randon number #include l/used to pause a windows display using namespace std; const int
#include "wall.h" //#include //#include //#include //#include //#include l/use to generate a randon number #include l/used to pause a windows display using namespace std; const int TOP_0F_wALL = 29; int main() { wall player1("Player 881\"), player2("Player 456"); int playerlturn, player2turn;//use to decide if the player should climb or drop bool winner = false; // use to terminate the loop once a player reaches // the top of the wall unsigned seed = time(0); l/use top get a different set of ramdom numbers srand(seed); // part of the random number process while (!winner) l/while there is not a winner the loop iterates { system("CLS"); //clears the screen (stdlib needed) COUt = 0; k- -) { if (k = = 0 | | k == 19) cout = TOP_OF_WALL) ) cout = TOP_OF_WALL) ) cout
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started