正文
增加 20 行删除 20 行
1234584 行未改动90919293949596979822 行未改动12112212312412512612712812913046 行未改动17717817918018118218318418518618718831 行未改动220221222223224225226227228274 行未改动全部展开50350450550650750850951051151251351451551651754 行未改动572573574575576577578579580581582583584585586587588589158 行未改动全部展开748749750751752753754755756677 行未改动全部展开我出玩法,你出实现。(你:豆包)```cpp#include <iostream>#include <vector>84 行未改动int progress;vector<Employee*> assignedEmployees;public:GameEngine(string n) : name(n), version(1), quality(0),developmentCost(0), isCompleted(false), progress(0) {}string getName() const { return name; }int getVersion() const { return version; }22 行未改动int loyalty;bool isAssigned;public:Employee(string n, string r, int sl, double salaryMultiplier): name(n), role(r), skillLevel(sl), experience(0), fatigue(0), morale(70),specialization(SPECIALIZATION_NONE), loyalty(50 + rand() % 30), isAssigned(false) {salary = static_cast<int>((skillLevel * 1000 + (rand() % 500)) * salaryMultiplier);productivity = skillLevel * 10 + (rand() % 20);}46 行未改动vector<Employee*> assignedEmployees;map<string, int> dlcSales;public:GameProject(string n, string g, Platform p, GameEngine* engine = NULL): name(n), genre(g), platform(p), developmentProgress(0),totalCost(0), expectedSales(0), actualSales(0), rating(0.0),marketingBudget(0), isDLC(false), isSequel(false),originalGameName(""), originalGameRating(0.0), usedEngine(engine),gameplay(5), graphics(5), story(5), sound(5), optimization(5) {}static GameProject* createDLC(string dlcName, GameProject* originalGame);31 行未改动vector<GameProject*> currentProjects;double difficultyMultiplier;public:Competitor(string n, int s, double dm): name(n), strength(s), money(500000 + s * 10000), difficultyMultiplier(dm) {}string getName() const { return name; }int getStrength() const { return strength; }274 行未改动全部展开specMap.push_back(make_pair(SPECIALIZATION_SECURITY_TESTING, "安全测试"));for (size_t i = 0; i < specMap.size(); ++i)if (specMap[i].first == specialization) { specStr = specMap[i].second; break; }}cout << left << setw(12) << name<< setw(10) << role<< setw(8) << skillLevel<< setw(10) << salary<< setw(12) << getProductivity()<< setw(8) << fatigue<< setw(8) << morale<< setw(12) << specStr<< setw(8) << loyalty << endl;}54 行未改动int totalProductivity = 0;for (size_t i = 0; i < assignedEmployees.size(); ++i) {Employee* emp = assignedEmployees[i];double bonus = 1.0;if (emp->getRole() == "程序员" &&(emp->getSpecialization() == SPECIALIZATION_GAMEPLAY_PROGRAMMING ||emp->getSpecialization() == SPECIALIZATION_AI_PROGRAMMING)) bonus = 1.5;else if (emp->getRole() == "设计师" &&(emp->getSpecialization() == SPECIALIZATION_LEVEL_DESIGN ||emp->getSpecialization() == SPECIALIZATION_CHARACTER_DESIGN)) bonus = 1.5;else if (emp->getRole() == "策划" &&(emp->getSpecialization() == SPECIALIZATION_STORY_WRITING ||emp->getSpecialization() == SPECIALIZATION_SYSTEM_DESIGN)) bonus = 1.5;else if (emp->getRole() == "测试" &&(emp->getSpecialization() == SPECIALIZATION_FUNCTIONAL_TESTING ||emp->getSpecialization() == SPECIALIZATION_PERFORMANCE_TESTING)) bonus = 1.5;totalProductivity += static_cast<int>(emp->getProductivity() * bonus);totalCost += static_cast<int>(emp->getSalary() * difficultyMultiplier);158 行未改动全部展开employees.push_back(emp);return true;}GameCompany::GameCompany(string n, Difficulty diff): name(n), month(1), reputation(50), officeLevel(1), maxEmployees(10),isPublic(false), stockPrice(10.0), sharesOutstanding(1000000),difficulty(diff), nextGameShowMonth(6) {switch (difficulty) {677 行未改动全部展开1234584 行未改动90919293949596979822 行未改动12112212312412512612712812913046 行未改动17717817918018118218318418518618718831 行未改动220221222223224225226227228274 行未改动全部展开50350450550650750850951051151251351451551651754 行未改动572573574575576577578579580581582583584585586587588589158 行未改动全部展开748749750751752753754755756677 行未改动全部展开我出玩法,你出实现。(你:豆包)```cpp#include <iostream>#include <vector>84 行未改动int progress;vector<Employee*> assignedEmployees;public:GameEngine(string n) : name(n), version(1), quality(0),developmentCost(0), isCompleted(false), progress(0) {}string getName() const { return name; }int getVersion() const { return version; }22 行未改动int loyalty;bool isAssigned;public:Employee(string n, string r, int sl, double salaryMultiplier): name(n), role(r), skillLevel(sl), experience(0), fatigue(0), morale(70),specialization(SPECIALIZATION_NONE), loyalty(50 + rand() % 30), isAssigned(false) {salary = static_cast<int>((skillLevel * 1000 + (rand() % 500)) * salaryMultiplier);productivity = skillLevel * 10 + (rand() % 20);}46 行未改动vector<Employee*> assignedEmployees;map<string, int> dlcSales;public:GameProject(string n, string g, Platform p, GameEngine* engine = NULL): name(n), genre(g), platform(p), developmentProgress(0),totalCost(0), expectedSales(0), actualSales(0), rating(0.0),marketingBudget(0), isDLC(false), isSequel(false),originalGameName(""), originalGameRating(0.0), usedEngine(engine),gameplay(5), graphics(5), story(5), sound(5), optimization(5) {}static GameProject* createDLC(string dlcName, GameProject* originalGame);31 行未改动vector<GameProject*> currentProjects;double difficultyMultiplier;public:Competitor(string n, int s, double dm): name(n), strength(s), money(500000 + s * 10000), difficultyMultiplier(dm) {}string getName() const { return name; }int getStrength() const { return strength; }274 行未改动全部展开specMap.push_back(make_pair(SPECIALIZATION_SECURITY_TESTING, "安全测试"));for (size_t i = 0; i < specMap.size(); ++i)if (specMap[i].first == specialization) { specStr = specMap[i].second; break; }}cout << left << setw(12) << name<< setw(10) << role<< setw(8) << skillLevel<< setw(10) << salary<< setw(12) << getProductivity()<< setw(8) << fatigue<< setw(8) << morale<< setw(12) << specStr<< setw(8) << loyalty << endl;}54 行未改动int totalProductivity = 0;for (size_t i = 0; i < assignedEmployees.size(); ++i) {Employee* emp = assignedEmployees[i];double bonus = 1.0;if (emp->getRole() == "程序员" &&(emp->getSpecialization() == SPECIALIZATION_GAMEPLAY_PROGRAMMING ||emp->getSpecialization() == SPECIALIZATION_AI_PROGRAMMING)) bonus = 1.5;else if (emp->getRole() == "设计师" &&(emp->getSpecialization() == SPECIALIZATION_LEVEL_DESIGN ||emp->getSpecialization() == SPECIALIZATION_CHARACTER_DESIGN)) bonus = 1.5;else if (emp->getRole() == "策划" &&(emp->getSpecialization() == SPECIALIZATION_STORY_WRITING ||emp->getSpecialization() == SPECIALIZATION_SYSTEM_DESIGN)) bonus = 1.5;else if (emp->getRole() == "测试" &&(emp->getSpecialization() == SPECIALIZATION_FUNCTIONAL_TESTING ||emp->getSpecialization() == SPECIALIZATION_PERFORMANCE_TESTING)) bonus = 1.5;totalProductivity += static_cast<int>(emp->getProductivity() * bonus);totalCost += static_cast<int>(emp->getSalary() * difficultyMultiplier);158 行未改动全部展开employees.push_back(emp);return true;}GameCompany::GameCompany(string n, Difficulty diff): name(n), month(1), reputation(50), officeLevel(1), maxEmployees(10),isPublic(false), stockPrice(10.0), sharesOutstanding(1000000),difficulty(diff), nextGameShowMonth(6) {switch (difficulty) {677 行未改动全部展开