Question: Help me write a Controller.cpp file. Below is the Controller.h file for the game Racko. I have also created cardDeck.h/cardDeck.cpp and main.cpp file. class Controller

Help me write a Controller.cpp file. Below is the Controller.h file for the game Racko. I have also created cardDeck.h/cardDeck.cpp and main.cpp file.

class Controller { public: void Menu(); //This will display the rules of the game void playGame(); (This will be the main loop until either the AI or the player wins ) void AITurn(); (Program a strategy that the AI will pick cards from discard pile when it benefits its rack. Otherwise, pick from the draw pile and the AI will determine if the draw pile card will be used. boolean check_racko(int Rack[],const int SIZE) //Given a rack, either the user's or the computer's, //determine if Racko has been achieved. Achieving Racko //means that the cards are in ascending order. private: int humanRack[10]; int AIRack[10]; bool playing; Deck gameDeck; };

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!