// File: RaceCourse.h // // Class definition of RaceCourse and // declaration enum type RaceStatus // // #ifndef RACECOURSE_H #define RACECOURSE_H #include #include "Thing.h" //------------------------------------------------------------ // You may need to include more header files using namespace std ; //--- Do not change the definition of RaceStatus ------------------- enum RaceStatus { WAITING, // Race not yet started STARTED, // Started, no one has won FINISHED, // Race finished with a winner } ; //------------------------------------------------------------------ class Car ; class RaceCourse { public: // Default Constructor, don't use. RaceCourse() ; // Alternate Constructor. // Set up a RaceCourse with r rows and c columns. // RaceCourse(unsigned int r, unsigned int c) ; // Add each Thing pointed by a pointer in the vector T // to the RaceCourse. Recall that a pointer to the // current RaceCourse must be stored in each Thing. // AddThings should make sure that two Things do not // occupy the same location. // bool AddThings(const vector& T) ; // simple accessors unsigned int GetNumOfRows() const ; unsigned int GetNumOfCols() const ; // Change race from WAITING to STARTED void StartRace() ; // Change race from STARTED to FINISHED void StopRace() ; RaceStatus GetRaceStatus() ; // See example in sample output. // The entire RaceCourse is printed to standard out. // Must use the DrawMe() virtual function to draw // each object. // void PrettyPrintCourse() ; //------------------------------------------------------------ // You may need to add more member functions and/or data members protected: //------------------------------------------------------------ // You may need to add more member functions and/or data members private: //------------------------------------------------------------ // You may need to add more member functions and/or data members } ; #endif