#include #include #include "Logger.h" #include using namespace std; const string SEASONS[]{"Spring","Summer","Fall","Winter"}; void PrintMap(); void Production(); void SectorProduce(int x, int y); int main() { int year, season; string msg; stringstream output; for (year = 1; year < 10; year++) { for(season = 0; season < 4; season++) { if (year == 2 and season == 0 ) { Logger::Instance().SetLevel(LogLevel::MEDIUM); } if (year == 3 and season == 0 ) { Logger::Instance().SetLevel(LogLevel::HIGH); } output << SEASONS[season] << " " << year << endl; Logger::Instance().Log(output.str(), LogLevel::HIGH); output.str(""); output << endl; Logger::Instance().Log(output.str()); output.str(""); PrintMap(); Logger::Instance().Log("\n"); Production(); Logger::Instance().Log("\n", LogLevel::HIGH); } } return 0; } void Production(){ int x,y; for(y = 0; y < 6; y++) { for (x = 0; x < 5; x++) { SectorProduce(x,y); } } } void SectorProduce(int x, int y){ stringstream output; output << "Producing in sector " << x << ", " << y << endl; Logger::Instance().Log(output.str()); return; } void PrintMap(){ int x,y; stringstream output; for(y = 0; y < 6; y++) { output << setw(4) << y << "|"; for (x = 0; x < 5; x++) { output << "."; } output << endl; Logger::Instance().Log(output.str(),LogLevel::MEDIUM); output.str(""); } return; }