// Wumpus.cpp implementation for the calss Wumpus #include "Wumpus.h" // set the visit to false Wumpus::Wumpus() { visited = false; } // set the visit to true void Wumpus::SetVisit() { visited = true; } // if the character is been eaten by the wumpus void Wumpus::Action(GP142Display &display) { display.write(CaveX, CaveY -65, "You have been eaten by the Wumpus. Game Over", Red,12); } // if the character is standing near the wumpus void Wumpus::FeelWhatsNear(GP142Display &display) { display.write(CaveX, CaveY - 65, "You smell a Wumpus....", Black,12); } // if character has been eaten by the wumpus // draw the location of the wumpus void Wumpus::Draw(GP142Display &display, int x, int y){ display.drawRectangle(CaveX + (CaveSize*x), CaveY + (CaveSize*y), CaveX + (CaveSize*x) - CaveSize, CaveY + (CaveSize*y) -CaveSize, Red, 3); } // if the wumpus has been shot bool Wumpus::ShootWumpus() { return true; } // if this cave was visited by the character bool Wumpus::GetVisit() { return visited; } // if the character is standing by the wumpus bool Wumpus::GetWhatsNear() { return true; }