-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTable.h
76 lines (52 loc) · 1.37 KB
/
Table.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
64
65
66
67
68
69
70
71
72
73
74
75
76
#pragma once
#include "Player.h"
#include "FakeDeck.h"
#include <iostream>
#include <fstream>
#include <windows.h>
#include <sstream>
#include <string>
#include <cstring>
#include "Interface.h"
using namespace std;
class Table {
private:
int _numberOfPlayers;
int _round;
Player** _players;
Dealer* _dealer;
unsigned int _pot;
unsigned int _defaultBet;
public:
Table() : _numberOfPlayers(1), _players(NULL), _pot(0), _defaultBet(0), _round(0) {
_dealer = new Dealer();
};
~Table() {
/* for (int i = 0; i < numberOfPlayers; i++) {
players[i] = NULL;
delete (players + i);
}
delete[] players;
delete dealer;*/
}
void setPot(unsigned int _money);
unsigned int Pot();
void setDefaultBet(unsigned int _money);
unsigned int DefaultBet();
void setRound(int _round);
int Round();
void setNumberOfPlayers();
int NumberOfPlayer();
void setTableDefaultBet();
void createPlayers();
void createPlayers(vector<Player*> continuePlayersList);
void printPlayersName();
void setMoneyPlayers();
void setGameRound();
void playGame();
string printWinners(vector<int> winnerList);
string printPlayersMoney();
void logging(vector<int> winnerList);
void kickPlayers();
vector<Player*> savePlayersAndResetTable();
};