Logo Search packages:      
Sourcecode: vdr-plugin-spider version File versions

void Pile::adaptSelectionTo ( const Pile other  ) 

Adapt the selection to match an other pile

Definition at line 241 of file heap.c.

References Heap::empty(), Card::rank, and Heap::top().

Referenced by Tableau::move().

{
  if (!other->empty())
  {
    if (currentChanged < currentSelected)
      currentChanged = currentSelected;
    int diff = other->top().rank - top().rank;
    if (diff > 0 && diff <= currentSelected)
      currentSelected = diff;
    else
      currentSelected = 0;
  }
}


Generated by  Doxygen 1.6.0   Back to index