imported catch-22 sol clone with authors permission
[reactos.git] / rosapps / games / solitaire / cardlib / cardcount.h
1 #ifndef _CARDCOUNT_INCLUDED
2 #define _CARDCOUNT_INCLUDED
3
4 #include <windows.h>
5
6 #include "cardstack.h"
7
8 class CardCount
9 {
10 public:
11 CardCount();
12 CardCount(const CardStack &cs);
13
14 void Init(const CardStack &cs);
15 void Clear();
16 void Add(const CardStack &cs);
17 void Sub(const CardStack &cs);
18
19 void Dec(size_t index);
20
21 int operator[] (size_t index) const;
22
23 CardCount &operator = (const CardStack &cs);
24 CardCount &operator += (const CardStack &cs);
25
26 private:
27 int count[13]; //13 different card values
28 //(ace,2,3,4,5,6,7,8,9,10,J,Q,K)
29 };
30
31 #endif