If I have have a classes "Card" (Base Class) "CardOfType1" (Derived Class) and a class named "Player" having pointers of type 'Card' referring to 'CardOfType1'. Is it possible that we have a pure virtual function named 'playCard(Player enemyPlayer)'?
For more understanding, the code is given below
class Card
{
public:
virtual void playCard(Player enemyPlayer) = 0;
};
class CardOfType1
{
public:
void playCard(Player enemyPlayer)
{
//Some Code Goes here
}
};
class Player
{
stack<Card *> deckOfCards
//.
//.
//.
};