forked from jstar0/CppGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewport.cpp
More file actions
89 lines (79 loc) · 1.67 KB
/
Copy pathviewport.cpp
File metadata and controls
89 lines (79 loc) · 1.67 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
#include <iostream>
#include <windows.h>
#include <conio.h>
#include "console.h"
using namespace std;
void setConsoleSize(int width, int height) {
// 获取控制台窗口句柄
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
// 设置缓冲区大小
COORD coord;
coord.X = width;
coord.Y = height;
SetConsoleScreenBufferSize(hConsole, coord);
// 设置窗口大小
SMALL_RECT rect;
rect.Left = 0;
rect.Top = 0;
rect.Right = width - 1;
rect.Bottom = height - 1;
SetConsoleWindowInfo(hConsole, TRUE, &rect);
}
int main(){
SetConsoleOutputCP(CP_UTF8);
setscreensize(120, 50);
int i;
for(i=0;i<100;i++){
print("#",i,0);
}
for(i=0;i<=40;i++){
print("#",0,i);
}
for(i=0;i<=40;i++){
print("#",100,i);
}
for(i=0;i<=100;i++){
print("#",i,41);
}
for(i=1;i<60;i++){
print("=",i, 30);
}
for(i=60;i<100;i++){
print("=",i, 35);
}
for(i=60;i<100;i++){
print("=",i, 15);
}
for(i=31;i<=40;i++){
print("|",30, i);
}
for(i=1;i<=40;i++){
print("|",60, i);
}
for(i=3;i<55;i++){
print("墙",i,3);
}
for(i=3;i<=27;i++){
print("墙",3,i);
}
for(i=3;i<=27;i++){
print("墙",55,i);
}
for(i=3;i<=55;i++){
print("墙",i,27);
}
print("我", 10, 10);
print("宝箱", 10, 20);
setcolor(6);
print("一张传说卡",3,31);
setcolor(7);
setcolor(13);
print("一张史诗卡",3,32);
setcolor(7);
print("我是卡牌描述",32,31);
print("血量:100/100",67,36);
print("灵根:废灵根",67,37);
print("灵力值:4",67,38);
getch();
return 0;
}