void rowOfCards::consolidate()
{
node
p=p->next;
node
while(p!=NULL)
{
if (data.size() > 3)
{
p3 = p->prev;
p3 = p->prev;
p3 = p->prev;
}
if (data.begin()->val == p->val)
{
p->val = data.begin()->val;
data.erase(p);
p=data.begin();
}
//else if(data.begin()->val == p3->val)
//{
// p3->val = data.begin()->val;
// data.erase(p3);
// p3=data.begin();
//}
p=p->next;
}
}
1 comment:
...you represent the epitome of Desperation and Lameness...
Post a Comment