-
Notifications
You must be signed in to change notification settings - Fork 0
/
calculation.h
executable file
·63 lines (53 loc) · 1.14 KB
/
calculation.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
63
// Header informaiton for the Calculation game rule set.
#ifndef CALCULATION_H
#define CALCULATION_H
#include "game.h"
#include "cards.h"
#include "cardtools.h"
struct CALLOC {
short loc;
short row;
int depth;
};
struct CALUNDO {
short loc1;
short loc2;
short row1;
short row2;
CALUNDO *prev;
};
class Calculation : public Solitaire {
public:
Calculation(HWND hWind, int info = 0); // The standard constructor
~Calculation();
// Required functions
void leftClick(int X, int Y);
void rightClick(int X, int Y);
void rightUp();
int load(const char *filename);
int save(const char *filename);
void redrawBoard();
void undo();
char* gameName();
void left();
void right();
void up();
void down();
void enter();
// Functions we will need
void shuffel(); // Some games may need their own shuffel function
void delInst(); // all destruction code should be here
void deal();
void dblClick(int X, int Y);
int winWork(void* datum);
private:
KXY getXY(CALLOC loc);
CALLOC getCL(int x, int y) ;
void calcMove(CALLOC cl);
int score;
Cards *pile, *board[4], *top[4], *to;
CARDDIM ca;
CALLOC sel, rm, kbd;
CALUNDO *Undo;
};
#endif