本文整理匯總了C++中ObjectManager::processInitialRoomState方法的典型用法代碼示例。如果您正苦於以下問題:C++ ObjectManager::processInitialRoomState方法的具體用法?C++ ObjectManager::processInitialRoomState怎麽用?C++ ObjectManager::processInitialRoomState使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ObjectManager
的用法示例。
在下文中一共展示了ObjectManager::processInitialRoomState方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: main
int main(int argc, char **argv) {
//Input Arrays
std::vector<std::string> *input;
std::vector<std::string> *creationInput;
std::vector<std::string> *commandInput;
//Setup Game Objects
//std::cout << "DEBUG - Main - Setting Up String Manip" << std::endl;
StringHelper *strm = new StringHelper();
//std::cout << "DEBUG - Main - Setting Up Object Manager" << std::endl;
ObjectManager *objm = new ObjectManager();
objm->setStringHelper(strm);
//std::cout << "DEBUG - Main - Setting Up Object Creator " << std::endl;
ObjectCreator *objc = new ObjectCreator();
objc->setObjectManager(objm);
objm->setObjectCreator(objc);
//std::cout << "DEBUG - Main -Setting Up Game " << std::endl;
Game *game = new Game();
game->setStringHelper(strm);
game->setObjectManager(objm);
objm->setGame(game);
//std::cout << "DEBUG - Main - Setting Up CLI " << std::endl;
CLI *cli = new CLI();
cli->setGame(game);
cli->setObjectManager();
cli->setStringHelper(strm);
game->setCLI(cli);
objm->setCLI(cli);
//std::cout << "DEBUG - Main - Setting Up Input " << std::endl;
Input *inp = new Input();
inp->setGame(game);
inp->setObjectCreator(objc);
inp->setObjectManager(objm);
inp->setStringHelper(strm);
objm->setInput(inp);
if(argc > 1) {
std::string inputFile(argv[1]);
inp->setInputFilePath(&inputFile);
inp->checkInputFile();
input = inp->parseInputFile();
creationInput = inp->getCreationInput(input);
commandInput = inp->getCommandInput(input);
inp->parseCreationInput(creationInput);
cli->processCommandInput(commandInput);
objm->setupRoomNeighborPointers();
objm->setupCreatureRoomPointers();
objm->setupPcRoomPointers();
objm->processInitialRoomState();
cli->startCLI();
} else {
std::cout << "Parsing Initial Input - Main.cpp" << std::endl;
//Parse Input
input = inp->parseStdInput();
creationInput = inp->getCreationInput(input);
commandInput = inp->getCommandInput(input);
//std::cout << "Setting Up the Game - Main.cpp" << std::endl;
//Setup Game
//std::cout << "Parsing Creation Input - Main.cpp" << std::endl;
inp->parseCreationInput(creationInput);
//std::cout << "Setting Creature Room Pointers - Main.cpp" << std::endl;
objm->setupCreatureRoomPointers();
//std::cout << "Setting Room Neighbor Pointers - Main.cpp" << std::endl;
objm->setupRoomNeighborPointers();
objm->processInitialRoomState();
//std::cout << "Starting CLI - Main.cpp" << std::endl;
//Start Game
//std::cout << "Parsing Initial Command Input - Main.cpp" << std::endl;
cli->processCommandInput(commandInput);
cli->startCLI();
}
}