// Pit.cpp implementation for the calss Pit #include "Pits.h" // sets visited to false Pits::Pits() { visited = false; } // sets the visited to true void Pits::SetVisit() { visited = true; } // write if the character has fallen to the pits void Pits::Action(GP142Display &display){ display.write(CaveX, CaveY - 50, "You fell into the pit!!! Game Over", Red,12); } // write if the character is near the pit void Pits::FeelWhatsNear(GP142Display &display) { display.write(CaveX, CaveY - 50, "You feel the breeze....", Black,12); } // draw if the character as fallen in the pit void Pits::Draw(GP142Display &display, int x, int y){ display.drawRectangle(CaveX + (CaveSize*x), CaveY + (CaveSize*y), CaveX + (CaveSize*x) - CaveSize, CaveY + (CaveSize*y) -CaveSize, Black, LineWidth); } // not wumpus but pit bool Pits::ShootWumpus() { return false; } // if visited bool Pits::GetVisit() { return visited; } // if this is the pit bool Pits::GetWhatsNear() { return true; }