-
Notifications
You must be signed in to change notification settings - Fork 0
/
GamePrinter.h
90 lines (74 loc) · 3.04 KB
/
GamePrinter.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
79
80
81
82
83
84
85
86
87
88
89
90
#include <thread>
#include <chrono>
#include <vector>
#include "GameContext.h"
using namespace chrono;
using namespace this_thread;
using namespace std;
class GamePrinter{
private:
GamePrinter();
public:
GamePrinter& operator=(const GamePrinter&) = delete;
GamePrinter(const GamePrinter&) = delete;
static void setDelay(int x){
Delay = x;
}
static void GameWon(){
cout << "🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨" << endl;
cout << BOLD << PURPLE << "🧨🧨🧨 CONGRATS YOU FINISHED THE GAME 🧨🧨🧨" << RESET << endl;
cout << "🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨🧨" << endl;
}
static void GameLost(){
cout << "🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️" << endl;
cout << "🛢️🛢️🛢️🛢️🛢️🛢️🛢️ YOU HAVE LOST 🛢️🛢️🛢️🛢️🛢️🛢️🛢️" << endl;
cout << "🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️🛢️" << endl;
}
static void Alert(){
cout << RED << "!!! YOU CAN\'T GO THERE " << "🪵/💥" << " TRY OTHER DIRECTIONS !!!" << endl;
return;
}
static void Coordinates()
{
cin.ignore();
cout << "============== "<< PURPLE << "COORDINATES " << RESET << " ==============" << "\n";
cout << "Player Coordinates : " << Player << RESET << "\n";
cout << "Box Coordinates : " ;
for (auto box : Boxes)
cout << PURPLE << box << " ";
cout << endl;
cout << RESET << "Points Coordinates : " ;
for (auto point : Meat)
cout << PURPLE << point << " ";
cout <<endl << "============== "<< PURPLE << "COORDINATES " << RESET << " ==============" << "\n";
}
static int GameMenu(){
cout << PURPLE << "===================================" << "\n";
cout << " CHOOSE THE GAME MODE"<< "\n";
cout << "===================================" << "\n";
cout << " 1. Human Mode" << endl;
cout << " 2. Agent Mode" << endl;
cout << "choice : " << RESET;
int input;
cin >> input ;
return input;
}
static void Welcome()
{
cout << "===================================" << "\n";
cout << "WELCOME TO SOKOBAN GAME!!!" << "\n";
cout << "===================================" << "\n";
}
static void PrintMap()
{
sleep_for(milliseconds(Delay));
cout << "============== " << PURPLE << "CURRENT MAP STATE" << RESET << " ==============" << "\n";
for (auto row : Map){
for (auto index : row)
cout << index << " " ;
cout << "\n";
}
cout << BOLD << PURPLE << "SCORE : " << score << RESET << endl;
cout << "============== " << PURPLE << "CURRENT MAP STATE" << RESET << " ==============" << "\n";
};
};