/************************************************************** * Name: Richard Sean Hsieh (rhsieh) * File: LogicController.H * Asgn: 3-sims * Date: Wed Mar 12 02:34:00 EST 2003 **************************************************************/ #ifndef LogicController_Header #define LogicController_Header #include #include class Professor; class Budget; class LogicMap; class GameState; //This represents a point on the abstract logic map. struct LogicPoint {int x; int y;}; enum BuildingType {Library, Dorm, Gym, Bar, BowlingAlley, Department, ClassRooms, Cafeteria}; class LogicController { public: LogicController(std::string filename); virtual ~LogicController(); void LogicController::saveState(string filename); /*This function causes the LogicController to advance one time step, and update the GameState. It is called by the GUI.*/ void LogicController::nextState(); /*TODO: I'm sure we'll need to add more of these, but basically every single feature of the game needs a function like those below.*/ void LogicController::addBuilding (BuildingType type, LogicPoint p); /*This is used when the user is about to click to put down a building. It lets the graphics draw a square, so the user can see where the building would go.*/ void LogicController::getBuildingSize(BuildingType type); /*This destroys whatever is currently on the square.*/ void LogicController::bulldoze (LogicPoint p); /*I'm assuming the Logic gets Professor *s when the user clicks on a "Professors" menu.*/ void LogicController::fireProfessor(Professor *p); void LogicController::hireProfessor(Professor *p); std::vector LogicController::getProfessors(); /*Obviously, we'll need to talk about what a Budget object looks like, so that the GUI can display one, modify it, and then return it to the Logic.*/ Budget* LogicController::getBudget(); //void LogicController::setBudget (Budget *b); Deprecated. //void LogicController::setTuition(int tuiton); Deprecated. Merged into budget //int LogicController::getTuition();Deprecated . merged into budget. /*This function returns working code for the entire SimsU project. */ //String LogicController::writeProject(); private: LogicMap *m_map; GameState *m_state; }; #endif