I am making a simple blackjack game. I have now made the deck which i can draw cards from. But I don't know how to get the values from each card so that i can add them together.
I have a card class named Kort with the enum:
public enum KortVerdi { To, Tre, Fire, Fem, Seks, Sju, Åtte, Ni, Ti, Knekt, Dame, Konge, Ess };
public enum KortFarge { Hjerter, Kløver, Ruter, Spar };
And when i draw two cards with my draw method from my main i would like to get the values of the two cards so that i can add them together.
My main looks like this now:
static void Main(string[] args)
{
Kortstokk mineKort =new Kortstokk();
string kort1 = Convert.ToString(mineKort.Trekk());
string kort2 = Convert.ToString(mineKort.Trekk());
Console.WriteLine("Du har fått dette: " + kort1 + " og " + kort2);
Console.WriteLine(kort1 + " " + kort2);
Console.ReadLine();
}