I’m trying to make a card game prototype in unity, and so far i got classes for cards, decks and players using interfaces.
The deck interface looks something like this:
public interface IDeck
{
void DrawCard(IPlayer player);
void DrawCards(IPlayer player, int quantity);
}
And the player interface looks something like this:
public interface IPlayer
{
void DrawCards(int quantity);
}
The problem is that when creating a new type of deck, i can’t use a class that inherits the IPlayer class.
Is it possible to use this method or do i need to rethink everything?