-
Notifications
You must be signed in to change notification settings - Fork 2
/
HeartsGameData.h
62 lines (52 loc) · 1 KB
/
HeartsGameData.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* HeartsGameData.h
* Hearts
*
* Created by Nathan Sturtevant on 11/27/08.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*
*/
#include "Hearts.h"
#include <string>
#ifndef HEARTSGAMEDATA_H
#define HEARTSGAMEDATA_H
namespace hearts {
enum {
kFileError = -2,
kNoData = -1
};
class HeartsGameData {
public:
HeartsGameData():g(0), waiting(false)
{
gameOver = false;
waitClick = false;
passPhase = false;
// passDir = kLeft;
}
~HeartsGameData()
{
while (moves.size() > 0)
{
delete moves.back();
moves.pop_back();
}
}
int GetScore(int who);
int GetLastScore(int who);
HeartsGameState *g;
bool waiting;
bool passPhase;
bool gameOver;
int firstPlayerOffset;
//tPassDir passDir;
std::vector<card> passes;
float waitClick;
// change to be vector for history and keep the sum too
std::vector<int> scores[4];
std::vector<CardMove *> moves;
};
card GetCardPlay(int which, HeartsGameState *g);
void prepareToTransmit(std::string &str);
} // namespace hearts
#endif