-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
47 lines (40 loc) · 2.63 KB
/
main.cpp
File metadata and controls
47 lines (40 loc) · 2.63 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
#include "console.h"
#include "Board.h"
#include "Timer.h"
int main()
{
Board board(25);
char buffer;
Timer* timer;
long long time = 0;
fullscreen();
hideCursor();
{
int outMode = _setmode(_fileno(stdout), _O_U8TEXT);
wcout << L" ▄▄▄▄███▄▄▄▄ ▄████████ ▄███████▄ ▄████████ ▄██████▄ ▄████████ ▄▄▄▄███▄▄▄▄ ▄████████ " << endl;
wcout << L"▄██▀▀▀███▀▀▀██▄ ███ ███ ██▀ ▄██ ███ ███ ███ ███ ███ ███ ▄██▀▀▀███▀▀▀██▄ ███ ███" << endl;
wcout << L"███ ███ ███ ███ ███ ▄███▀ ███ █▀ ███ █▀ ███ ███ ███ ███ ███ ███ █▀ " << endl;
wcout << L"███ ███ ███ ███ ███ ▀█▀▄███▀▄▄ ▄███▄▄▄ ▄███ ███ ███ ███ ███ ███ ▄███▄▄▄ " << endl;
wcout << L"███ ███ ███ ▀███████████ ▄███▀ ▀ ▀▀███▀▀▀ ▀▀███ ████▄ ▀███████████ ███ ███ ███ ▀▀███▀▀▀ " << endl;
wcout << L"███ ███ ███ ███ ███ ▄███▀ ███ █▄ ███ ███ ███ ███ ███ ███ ███ ███ █▄ " << endl;
wcout << L"███ ███ ███ ███ ███ ███▄ ▄█ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███" << endl;
wcout << L"▀█ ███ █▀ ███ █▀ ▀████████▀ ██████████ ████████▀ ███ █▀ ▀█ ███ █▀ ██████████" << endl;
outMode = _setmode(_fileno(stdout), outMode);
}
system("pause");
system("cls");
timer = new Timer(&time);
board.RenderBoard();
while (!board.GetIsGameEnd())
{
gotoxy(0, 0);
buffer = _getch();
board.InputCommend(buffer);
board.RenderBoard();
}
delete(timer);
system("cls");
cout << "골인" << endl;
cout << "시간: " << time << "초" << endl;
return 0;
}