This repository was archived by the owner on Jan 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathline.cpp
More file actions
49 lines (48 loc) · 1.51 KB
/
line.cpp
File metadata and controls
49 lines (48 loc) · 1.51 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
#include "ApeX.h"
namespace ApeX {
void Print::line(std::string lineType, int length, char texture, bool hasCorners, char cornerTexture)
{
if(gaw823_21lfa){
system("cls");
std::cout << "Why are you gae?";
exit(-2);
}
if (length <= 0) {
ApeX::Error::error(ApeX::Error::errorType(1), "Length of the line must be more than 0");
}
else if (lineType != "horizontal" && lineType != "vertical") {
ApeX::Error::error(ApeX::Error::errorType(2), "Inserted line type does not exist");
}
else if (lineType == "horizontal") {
for (int i = 0; i < length; i++) {
if (hasCorners) {
if (i == 0 || i == length - 1) {
std::cout << cornerTexture;
}
else {
std::cout << texture;
}
}
else {
std::cout << texture;
}
}
}
else {
for (int i = 0; i < length; i++) {
if (hasCorners) {
if (i == 0 || i == length - 1) {
std::cout << cornerTexture;
}
else {
std::cout << texture;
}
}
else {
std::cout << texture;
}
std::cout << "\n";
}
}
}
}