blob: 6a773ff355deaa9d386f54e5ca00d4c51715bd94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*
* user.cpp
*
*
*/
#include "user.h"
User::User(void) : whatHand(9)
{
}
void User::dealUserCards(void)
{
/* the cards will be dealt from end of the deck array using deckCurrIndex */
int i;
for (i = 0; i < 5; i++)
userCards[i] = PopCardFromDeck();
}
void User::printUserCards(void)
{
int i;
for (i = 0; i < 5; i++)
if (userCards[i])
cout << i+1 << ") " << userCards[i]->getType() << " ";
cout << endl << endl;
}
void User::sortUserCards(void)
{
sortCards(userCards);
}
void User::discardCards(void)
{
cout << "List the cards' numbers you wish to discard: ";
}
Card **User::getUserCards(void)
{
return userCards;
}
|