#ifndef COLORSUI_H #define COLORSUI_H #include #include #include "ColorsBoardStructure.h" using namespace std; const string cardValues[] = {"R", "G", "B", "Y", "P", "S", "V", "W", "+2"}; class ColorsUI //Holds the UI functions { public: //fields int numPlayers; //Number of players in the current game //methods ColorsUI(int numberOfPlayers); //The only constructor int findNumPlayers(); //Queries the user for the number of players //Hardcoded to only accept 2-5 //Returns the number of players desired void setNumPlayers(int numberOfPlayers) {numPlayers=numberOfPlayers;} //Sets the number of players //This is here for subsequent games and to explain the rules before they've //entered the number of players void updateDisplay(vector playerHands, vector board, bool lastRound); //Displays the board given the information passed in bool getTypeMove(int currentPlayer, bool lastRound); //Gets the type of move for the current player and returns true if taking a row, false if drawing a card int getRowMove(bool take, int currentPlayer, int topCard); //Gets the row the current move affects and returns an int, 0-based void invalidMove(int currentPlayer); //Complains when an invalid move is done void explainRules(); //Checks to see if they want the rules explained and then does so void printScores(vector allScores); //Prints out all the scores at the end void printWinners(int topScore, vector winners); //Prints out the winners! bool wantNewGame(); //querries for whether a new game is desired }; #endif