// Pit.h interface for the calss Pit.h #ifndef PITS_H #define PIST_H #include "Cavern.h" /******************************** * Pits is a drived class * * * * Pits class is designed to * * kill the player if entered * ********************************/ /************************************ * This class inhearits all the * * public methods from Cavern Class* ************************************/ class Pits : public Cavern{ public: //sets the variable visited to false Pits(); //keeps the caves in track with either //player has visited the cave or not virtual void SetVisit(); //the method prints out to the graphic //what ever it needs virtual void Action(GP142Display&); //if the player has enterd the adjancent cave //it returns true so Action method can run virtual void FeelWhatsNear(GP142Display&); //draws the box of the cave that player has visited virtual void Draw(GP142Display&, int, int); //returns true if player shot the wumpus virtual bool ShootWumpus(); //returns either player has visited the cave virtual bool GetVisit(); //return true for Wumpus and Pits but not Empty class virtual bool GetWhatsNear(); private: //keep track once visited by the player bool visited; }; #endif