ReactOS 0.4.16-dev-122-g325d74c
cardstack.h
Go to the documentation of this file.
1#ifndef CARDSTACK_INCLUDED
2#define CARDSTACK_INCLUDED
3
4#define MAX_CARDSTACK_SIZE 128
5
7{
8 friend class CardRegion;
9
10public:
12
13 void NewDeck();
14 int NumCards() const { return nNumCards; }
15 void Shuffle();
16 void Clear();
17 void Reverse();
18
19 void Push(const Card card);
20 void Push(const CardStack &cardstack);
21
22 Card Pop();
23 CardStack Pop(int items);
24
25 Card Top();
26 CardStack Top(int items);
27
28 void Print();
29
30 Card RemoveCard(size_t index);
31 void InsertCard(size_t index, Card card);
32
33 //subscript capability!!
34 Card & operator[] (size_t index);
35 const Card & operator[] (size_t index) const;
36
39
42
43private:
44
45 CardStack(CardStack &copythis, size_t fromindex);
46
49};
50
51#endif /* CARDSTACK_INCLUDED */
52
#define MAX_CARDSTACK_SIZE
Definition: cardstack.h:4
void NewDeck()
Definition: cardstack.cpp:42
Card Top()
Definition: cardstack.cpp:151
int NumCards() const
Definition: cardstack.h:14
void Push(const Card card)
Definition: cardstack.cpp:83
void Clear()
Definition: cardstack.cpp:37
CardStack operator+(Card card)
Definition: cardstack.cpp:112
void Print()
Definition: cardstack.cpp:222
void Reverse()
Definition: cardstack.cpp:73
int nNumCards
Definition: cardstack.h:48
CardStack & operator+=(Card card)
Definition: cardstack.cpp:100
void InsertCard(size_t index, Card card)
Definition: cardstack.cpp:192
void Shuffle()
Definition: cardstack.cpp:50
Card RemoveCard(size_t index)
Definition: cardstack.cpp:172
Card cardlist[MAX_CARDSTACK_SIZE]
Definition: cardstack.h:47
Card & operator[](size_t index)
Definition: cardstack.cpp:10
Card Pop()
Definition: cardstack.cpp:127
CardStack()
Definition: cardstack.h:11
Definition: card.h:28
GLuint index
Definition: glext.h:6031
#define cs
Definition: i386-dis.c:442
static TCHAR * items[]
Definition: page1.c:45