This commit is contained in:
Fabian Hamacher 2024-12-13 00:10:48 +01:00
parent 8e1b9916b3
commit ba2c25710e
2 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,71 @@
// Grundsätzlich erstmal nur zum Testen
#include <iostream>
#include <windows.h>
#include <locale>
#include <string>
int main() {
//std::setlocale(LC_ALL, "");
SetConsoleOutputCP(CP_UTF8);
//wchar_t t = 0x25FF;
// Horizontale Linie u2500
// Vertikale Linie u2502
// Top Right Corner u250C
// Top Left Corner u2510
// Bottom Right Corner u2514
// Bottom Left Corner u2518
std::string topRightCorner = "\u2554";
std::string topLeftCorner = "\u2557";
std::string bottomRightCorner = "\u255A";
std::string bottomLeftCorner = "\u255D";
std::string horizontalLine = "\u2550";
std::string verticalLine = "\u2551";
std::string crossSuc = "\u256C";
std::string leftSide = "\u2560";
std::string rightSide = "\u2563";
std::string topSide = "\u2566";
std::string bottomSide = "\u2569";
std::string firstLine = "\u2554\u2550\u2566";
std::string line;
for (int row = 0; row < 8; ++row) {
for (int col = 0; col < 8; ++col) {
if (row == 0 && col > 0) line += horizontalLine + topSide;
if (row == 7 && col > 0) line += horizontalLine + bottomSide;
if (col == 0 && row < 7 && row > 0) line += leftSide;
if (col == 7 && row < 7 && row > 0) line += horizontalLine + rightSide;
if ((row > 0 && row < 7) && (col > 0 && col < 7)) line += horizontalLine + crossSuc;
if (row == 0 && col == 0) line += topRightCorner + horizontalLine + topSide;
if (row == 7 && col == 0) line += "\u255A\u2550\u2569";
if (row == 0 && col == 7) line += "\u2550\u2557";
if (row == 7 && col == 7) line += "\u2550\u255D";
}
line += "\n";
}
//std::wcout << L"\u2500" << std::endl;
std::cout << line << std::endl;
return 0;
}
void firstVersion() {
std::string field;
for (int y = 0; y < 8; y++) {
for (int x = 0; x < 8; x++) {
if (y % 2 == 0) {
field = (x % 2 == 0) ? "" : "";
}
else {
field = (x % 2 == 0) ? "" : "";
}
std::cout << field;
}
std::cout << "\n";
}
}

BIN
main.exe Normal file

Binary file not shown.