void clientDoTurn() { char moves[MAX_STARTING_HEALTH]; char pos_moves[] = "^<>v()S-"; displayState(); printf ("Make a move: "); scanf ("%s", moves); makeMoves(moves); }
void Bot::executeAction() { if (phase == NONE) return; if (phase == Bot::PICK_STARTING_REGION) { pickStartingRegion(); } else if (phase == Bot::PLACE_ARMIES) { placeArmies(); } else if (phase == Bot::ATTACK_TRANSFER) { makeMoves(); } phase = NONE; }
void Bot::executeAction() { if (phase == NONE) return; if (phase == Bot::PICK_PREFERRED_REGION) { std::cout << startingRegionsReceived[std::rand() % startingRegionsReceived.size()] << "\n"; } if (phase == Bot::PLACE_ARMIES) { std::cout << botName << " place_armies " << ownedRegions[std::rand() % ownedRegions.size()] << " " << armiesLeft << "\n"; addArmies(ownedRegions[0], armiesLeft); } if (phase == Bot::ATTACK_TRANSFER ) { makeMoves(); } phase = NONE; }