forked from vkhakham/backgammon-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManager.h
More file actions
74 lines (53 loc) · 1.1 KB
/
Manager.h
File metadata and controls
74 lines (53 loc) · 1.1 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
#ifndef _MANAGER_H_
#define _MANAGER_H_
#pragma once
#define PLAYINGAGAINSMATANDROTEM 0
#define HOWMANYGAMESINAROW 2
#define MUDUL 46
#include <iostream>
#include <string>
#include <vector>
#include "Board.h"
#include "Player.h"
#include "Validator.h"
using namespace std;
class Board;
class Validator;
class Player;
//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;
void fakeDtor();
void fakeCtor();
int games;
int mudul;
private:
static Manager* m_instance;
Manager(void);
};
#endif