Skip to content

Commit

Permalink
More Flexible Speed
Browse files Browse the repository at this point in the history
  • Loading branch information
APN-Pucky committed Sep 9, 2018
1 parent 7e3b497 commit 791d90e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion deck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,17 @@ const Card* Deck::next(Field* f)
_DEBUG_MSG(1,">>>>FLEX SIMS>>>>\n");
std::vector<uint64_t> res(std::min<unsigned>(3u,shuffled_cards.size()));
unsigned iter = f->flexible_iter;
if(res.size()==1) //no need for flex here

bool all_same{true};
for(unsigned j =1; j < res.size();j++)
{
if(shuffled_cards.begin()[0]->m_id!=shuffled_cards.begin()[j]->m_id)
{
all_same=false;
break;
}
}
if(all_same) //no need for flex here, three same or only one card
{
const Card* card = shuffled_cards.front();
shuffled_cards.pop_front();
Expand Down

0 comments on commit 791d90e

Please sign in to comment.