Been working on my card games, got blackjack somehwat finished I think and now I'm trying to add in a poker bit before I go in to compile, but before I go into that, I need some help with the card list. So far its pretty much:
const struct mycards allcards[52]={
{2c, "2 of clubs"},
{2h, "2 of hearts"},
{2d, "2 of diamonds"},
{2s, "2 of spades"},
{3c, "3 of clubs"},
{3h, "3 of hearts"},
{3d, "3 of diamonds"},
{3s, "3 of spades"},
{4c, "4 of clubs"},
{4h, "4 of hearts"},
{4d, "4 of diamonds"},
{4s, "4 of spades"},
{5c, "5 of clubs"},
{5h, "5 of hearts"},
{5d, "5 of diamonds"},
{5s, "5 of spades"},
{6c, "6 of clubs"},
{6h, "6 of hearts"},
{6d, "6 of diamonds"},
{6s, "6 of spades"},
{7c, "7 of clubs"},
{7h, "7 of hearts"},
{7d, "7 of diamonds"},
{7s, "7 of spades"},
{8c, "8 of clubs"},
{8h, "8 of hearts"},
{8d, "8 of diamonds"},
{8s, "8 of spades"},
{9c, "9 of clubs"},
{9h, "9 of hearts"},
{9d, "9 of diamonds"},
{9s, "9 of spades"},
{10c, "10 of clubs"},
{10h, "10 of hearts"},
{10d, "10 of diamonds"},
{10s, "10 of spades"},
{Jc, "Jack of clubs"},
{Jh, "Jack of hearts"},
{Jd, "Jack of diamonds"},
{Js, "Jack of spades"},
{Qc, "Queen of clubs"},
{Qh, "Queen of hearts"},
{Qd, "Queen of diamonds"},
{Qs, "Queen of spades"},
{Kc, "King of clubs"},
{Kh, "King of hearts"},
{Kd, "King of diamonds"},
{Ks, "King of spades"},
{1c, "Ace of clubs"},
{1h, "Ace of hearts"},
{1d, "Ace of diamonds"},
{1s, "Ace of spades"}
};
I was wondering if this would work to run the game on, or if I would need to instead go to a 3 digit code, similar to
{131, "King of Hearts"}
to be able to use the same cardlist for more then one game. |