-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathblackJack.h
78 lines (47 loc) · 1.38 KB
/
blackJack.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
77
78
//Topic 14: Object Orientation: Interface vs. Implementation *
#ifndef CCPP_EXAM_BLACKJACK_H
#define CCPP_EXAM_BLACKJACK_H
#include "bjRuleController.h"
#include "bjCards.h"
#include "bjHand.h"
#include "bjDeck.h"
#include "bjPlayer.h"
#include "enums.h"
class blackJack {
private:
blackJack();
//Topic 23: Design Patterns Signleton
explicit blackJack(std::nullptr_t pVoid);
//Topic 26: Häufige fehlerquellen -> keine Uninitialisierten variablen
gameState gs = LEAVE;
playerOption po = PREGAME;
playerStatus ps = TIE;
mainMenu mm = RULES;
bjRuleController *bjR = new bjRuleController();
bjDeck cD;
//Topic 17: Object Orientation: Object Lifecycle
bjPlayer *p = new bjPlayer(bjR->getInitChips());
bjPlayer *d = new bjPlayer(0);
void newGame();
void drawInitialCards();
void draw();
void menu();
void showCards();
void playAnotherRound();
void playerRoundOptions();
bool checkIfBroke();
void bet();
public:
//Topic 23: Design Patterns Singleton
static blackJack *getInstance() {
static blackJack s(nullptr);
return &s;
}
blackJack(const blackJack &) = delete;
void operator=(const blackJack &) = delete;
void game();
static void printDivider();
static int inputcheck(std::string in);
static void wrongInput();
};
#endif //CCPP_EXAM_BLACKJACK_H