diff --git a/src/main.cpp b/src/main.cpp index b85ee9d02ec70530efd71ffd433e7f30b28530e8..19dee38f83cef0cafb47b0e20f7fa47f673f9f01 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,38 +15,13 @@ int main(int argc, char* argv[]) return 1; } - std::string config = JSONTools::ReadFile("BotConfig.txt"); - if (config.length() == 0) - { - std::cerr << "Config file could not be found, and is required for starting the bot\n"; - std::cerr << "Please read the instructions and try again\n"; - exit(-1); - } + std::string botRaceString = "Terran"; + std::string enemyRaceString = "Random"; + std::string mapString = "InterloperTest.SC2MAP"; - std::ifstream file("BotConfig.txt"); - json j; - file >> j; - - std::string botRaceString, enemyRaceString, mapString; int stepSize = 1; sc2::Difficulty enemyDifficulty = sc2::Difficulty::Easy; - if (j.count("SC2API") && j["SC2API"].is_object()) - { - const json & info = j["SC2API"]; - JSONTools::ReadString("BotRace", info, botRaceString); - JSONTools::ReadString("EnemyRace", info, enemyRaceString); - JSONTools::ReadString("MapFile", info, mapString); - JSONTools::ReadInt("StepSize", info, stepSize); - JSONTools::ReadInt("EnemyDifficulty", info, enemyDifficulty); - } - else - { - std::cerr << "Config file has no 'Game Info' object, required for starting the bot\n"; - std::cerr << "Please read the instructions and try again\n"; - exit(-1); - } - // Add the custom bot, it will control the players. IDABot bot1; //IDABot bot2;