I am writing a card game "Drunkard".
struct card{ int, rank; }; vector <card> first, second; Vectors first and second are players, card is a card, and rank is rank cards. Both vectors are filled with 18 card elements. I hope the principle of the game everyone knows.
Help to realize the game itself, that is, a comparison of the cards and the selection of cards (by the way, the withdrawn cards should not be put in a separate pile but under yours, first your own then the enemy). The game ends when one of the players runs out of cards.
Maybe not the best implementation option, but I started to do it and decided to finish it off. Or tell me how best to implement it all.
>and==(and, in general, the search for the maximum) over the top of the stacks. - avp