-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathboard.cpp
More file actions
119 lines (110 loc) · 5.21 KB
/
board.cpp
File metadata and controls
119 lines (110 loc) · 5.21 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#include "board.h"
void Board::gameStart(Deck* deck) {
std::cout << std::endl
<< " < 고스톱 게임을 시작합니다 >"
<< std::endl;
std::cout << std::endl;
std::cout << "───────────────────────────────────────────────────────────────"
"────────"
<< std::endl
<< std::endl;
std::cout << " player의 게임 순서를 정한 다음 순서대로 이름을 입력하세요."
<< std::endl
<< std::endl;
std::cout << " player1의 이름을 설정하세요 >> ";
std::string name;
std::cin >> name;
(*deck).player1.setName(name);
std::cout << " player1의 이름은 [" << (*deck).player1.getName()
<< "] 입니다." << std::endl
<< std::endl;
std::cout << " player2의 이름을 설정하세요 >> ";
std::cin >> name;
(*deck).player2.setName(name);
std::cout << " player2의 이름은 [" << (*deck).player2.getName()
<< "] 입니다." << std::endl
<< std::endl;
std::cout << " player3의 이름을 설정하세요 >> ";
std::cin >> name;
(*deck).player3.setName(name);
std::cout << " player3의 이름은 [" << (*deck).player3.getName()
<< "] 입니다." << std::endl
<< std::endl;
(*deck).gameStart();
std::cout << "───────────────────────────────────────────────────────────────"
"────────"
<< std::endl
<< std::endl;
std::cout << " "
<< "Game Start" << std::endl
<< std::endl;
std::cout << "───────────────────────────────────────────────────────────────"
"────────"
<< std::endl
<< std::endl;
}
void Board::gameOver() {
std::cout << "───────────────────────────────────────────────────────────────"
"────────"
<< std::endl
<< std::endl;
std::cout << " "
<< "Game Over" << std::endl
<< std::endl;
std::cout << "───────────────────────────────────────────────────────────────"
"────────"
<< std::endl
<< std::endl;
}
void Board::printPlayer(Player player) {
std::cout << "───────────────────────────────────────────────────────────────"
"────────"
<< std::endl;
std::cout << " < " << player.getName()
<< "의 먹은패 >" << std::endl;
std::cout << " [광]";
player.my_card_list_.printGList();
std::cout << " [띠]";
player.my_card_list_.printDList();
std::cout << " [멍]";
player.my_card_list_.printMList();
std::cout << " [피]";
player.my_card_list_.printPList();
std::cout << "---------------------------------------------------------------"
"---------"
<< std::endl;
std::cout << " [" << player.getName() << "]의 점수 >> "
<< player.getTotalScore() << "점, go :" << player.getGoCount()
<< "고" << std::endl;
std::cout << "---------------------------------------------------------------"
"---------"
<< std::endl;
std::cout << " [" << player.getName() << "]의 손패 >> ";
player.printHandList();
std::cout << "───────────────────────────────────────────────────────────────"
"────────"
<< std::endl;
}
void Board::printFloor(Floor floor) {
std::cout << "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
"@@@@@@@@@"
<< std::endl;
std::cout << std::endl;
std::cout << std::endl;
std::cout << " 바닥패>> ";
floor.printCardList();
std::cout << std::endl;
std::cout << std::endl;
std::cout << std::endl;
std::cout << "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
"@@@@@@@@@"
<< std::endl;
std::cout << "───────────────────────────────────────────────────────────────"
"────────"
<< std::endl;
}
void Board::line() {
std::cout << "---------------------------------------------------------------"
"---------"
<< std::endl;
}