-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathManager.h
More file actions
89 lines (71 loc) · 1.67 KB
/
Manager.h
File metadata and controls
89 lines (71 loc) · 1.67 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef _MANAGER_H_
#define _MANAGER_H_
#pragma once
#define DICENUM_VERSION1 46
#define DICENUM_VERSION2 72
#define PLAYINGAGAINSMAYANDROTEM 0
#define HOWMANYGAMESINAROW 0
#define DEBUG val->msg4="move from "+std::to_string(_move.first)+" to "+std::to_string(_move.second);
#define PLAYER1 0
#define PLAYER2 0
#define TREELEVELS 2
#define INF 10000
#define INIT_HEURISTIC_VAL_MIN numeric_limits<double>::lowest()
#define INIT_HEURISTIC_VAL_MAX numeric_limits<double>::max()
#include <iostream>
#include <string>
#include <vector>
typedef std::pair<int, int> my_pair;
typedef int dice_matrix[7][7];
using namespace std;
#include "Board.h"
#include "Player.h"
#include "Validator.h"
#include "strategy.h"
#include <assert.h>
#include <time.h>
#include <stdlib.h>
class Board;
class Validator;
class Player;
class strategy;
//singleton
class Manager
{
public:
static Manager* instance();
static void ResetInstance();
void initPointersOfMembers();
void runGame();
void showHelp();
void swapDice();
~Manager(void);
void gameOver(string msg1 = " ",string msg2= " " ,string msg3= " ",string msg4= " ");
void playDice();
//void playRegularDice();
string sDice;
bool bIsWhiteTurn;
bool bSwapDice;
bool bCurrentDiceDubel;
bool isDiceLegal;
pair<int , int> _move;
pair<int , int> _dice;
int turns;
int* currentDice;
Board *b;
Player *pWhite;
Player *pBlack;
Player *currentPlayer;
Validator *val;
int maxDepth;
int games;
int dice_version;
strategy *strategy_ptr;
bool alpha_beta;
int player1;
int player2;
private:
static Manager* m_instance;
Manager(void);
};
#endif