/* ==================== turn_mgr.cpp ==================== */ #include "turn_mgr.h" TurnMgr::TurnMgr() { // include self in pointerhub PointerHub::SetTurnMgr(this); t = 1; } // main turn processing function void TurnMgr::NextTurn() { // foreach pod in the game, execute it's mission for(int x = 0; x < Pod::GetNumPods(); x++) { Pod::GetPodByIndex(x)->Misn(0)->Exe(); } TickSpecials(); // check for victory conditions // degrade road quality every third turn if (t%3 == 0) { for (int y=0; y < themap->GetRows(); y++) { for (int x=0; x < themap->GetCols(); x++) { themap->DegradeRoad(x,y); } } // redraw map rm->RedrawMap(); } t++; } // returns the current turn number int TurnMgr::GetTurn() { return t; } // updates the internal time clock of map specials void TurnMgr::TickSpecials() { }