void DeckMenu::selectRandomDeck(bool isAi) { DeckManager *deckManager = DeckManager::GetInstance(); vector<DeckMetaData *> *deckList = isAi ? deckManager->getAIDeckOrderList() : deckManager->getPlayerDeckOrderList(); int random = rand() % (int)deckList->size(); selectDeck( random, isAi ); }
void DeckMenu::selectDeck(int deckId, bool isAi) { DeckManager *deckManager = DeckManager::GetInstance(); vector<DeckMetaData *> *deckList = isAi ? deckManager->getAIDeckOrderList() : deckManager->getPlayerDeckOrderList(); mSelectedDeck = deckList->at(deckId); }