Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
92 lines (81 loc) · 1.48 KB

File metadata and controls

92 lines (81 loc) · 1.48 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#include "MyLib.h"
int MyLib::diChuyenPhim()
{
char c = _getch();
if ((int)c == -32) c = _getch();
switch ((int)c) {
case 80:
return 1; //cout << "Xuong";
case 72:
return 2; //cout << "Len";
case 77:
return 3; //cout << "Phai";
case 75:
return 4; //cout << "Trai";
case 27:
return 8; //Nut ESC thoat
case 13:
return 5; //Nut Enter
default:
return 0; //cout << "Sai";
}
}
void MyLib::status(string str)
{
for (int i = 30; i <= 81; i++)
{
MyLib::gotoxy(i, 4);
wcout << L" ";
}
MyLib::gotoxy(32, 4); // 90
wcout << MyLib::to_wstring(str);
}
wstring MyLib::to_wstring(string str)
{
using convert_t = codecvt_utf8<wchar_t>;
wstring_convert<convert_t, wchar_t> strconverter;
return strconverter.from_bytes(str);
}
void MyLib::gotoxy(int x, int y)
{
static HANDLE h = NULL;
if (!h)
h = GetStdHandle(STD_OUTPUT_HANDLE);
COORD c = { x, y };
SetConsoleCursorPosition(h, c);
}
void MyLib::xoaKhungNoiDung()
{
for (int j = 7; j <= 28; j++)
{
for (int i = 29; i < 93; i++)
{
MyLib::gotoxy(i, j);
wcout << L" ";
}
}
}
void MyLib::EXP(int exp)
{
for (int i = 82; i <= 90; i++)
{
MyLib::gotoxy(i, 4);
wcout << L" ";
}
MyLib::gotoxy(82, 4); // 90
wcout << L"EXP: " << exp;
}
string MyLib::to_string(wstring wstr)
{
using convert_t = codecvt_utf8<wchar_t>;
wstring_convert<convert_t, wchar_t> strconverter;
return strconverter.to_bytes(wstr);
}
void MyLib::DeleteEXP()
{
for (int i = 82; i <= 90; i++)
{
MyLib::gotoxy(i, 4);
wcout << L" ";
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.