#include <stdlib.h>
#include <stdio.h>
#include <iostream>
using namespace std;
#include "CardNode.h"
/*Card CardNode::count=0;*/
/* This is the constructor that will most often be used.
*/
CardNode::CardNode(Card* c)
{
value = c;
next = NULL;
//count++;
}
/* here is another constructor in case someone wants to make the
* link before they know what value it will have.
* You can have multiple constructors as long as each has a different
* set of input parameter types. The names don't matter.
*/
CardNode::CardNode()
{
value = NULL;
next = NULL;
//count++;
}
CardNode::~CardNode()
{
//count--;
}
/*Card CardNode::getCount()
{
return count;
}*/
void CardNode::setValue(Card* c)
{
value = c;
}
void CardNode::setNext(CardNode *l)
{
next = l;
}
Card* CardNode::getValue()
{
return value;
}
CardNode* CardNode::getNext()
{
return next;
}
void CardNode::printCardNode()
{
Card* c;
c->print_card();
}
I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojaW5jbHVkZSAiQ2FyZE5vZGUuaCIKCi8qQ2FyZCBDYXJkTm9kZTo6Y291bnQ9MDsqLwoKLyogVGhpcyBpcyB0aGUgY29uc3RydWN0b3IgdGhhdCB3aWxsIG1vc3Qgb2Z0ZW4gYmUgdXNlZC4KICovCkNhcmROb2RlOjpDYXJkTm9kZShDYXJkKiBjKQp7CiAgICB2YWx1ZSA9IGM7CgluZXh0ID0gTlVMTDsKCS8vY291bnQrKzsKfQoKLyogaGVyZSBpcyBhbm90aGVyIGNvbnN0cnVjdG9yIGluIGNhc2Ugc29tZW9uZSB3YW50cyB0byBtYWtlIHRoZSAKICogbGluayBiZWZvcmUgdGhleSBrbm93IHdoYXQgdmFsdWUgaXQgd2lsbCBoYXZlLgogKiBZb3UgY2FuIGhhdmUgbXVsdGlwbGUgY29uc3RydWN0b3JzIGFzIGxvbmcgYXMgZWFjaCBoYXMgYSBkaWZmZXJlbnQKICogc2V0IG9mIGlucHV0IHBhcmFtZXRlciB0eXBlcy4gIFRoZSBu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