From e011a5d7ed67cf3acc2a340db32a188451745b03 Mon Sep 17 00:00:00 2001 From: dm1sh Date: Sun, 19 Dec 2021 13:15:36 +0300 Subject: [PATCH] Fixed black and white square naming in demo --- Demo/main.cpp | 12 ++++++------ README.MD | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Demo/main.cpp b/Demo/main.cpp index d170830..3b45949 100644 --- a/Demo/main.cpp +++ b/Demo/main.cpp @@ -73,15 +73,15 @@ int main() { #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) const string long_sep = string((res.size() + 8) * SQUARE_WIDTH, 219), short_sep = string(4 * SQUARE_WIDTH, 219), - black = string(SQUARE_WIDTH, 219), - white = string(SQUARE_WIDTH, ' '); + black = string(SQUARE_WIDTH, ' '), + white = string(SQUARE_WIDTH, 219); SetConsoleCP(855); #else const string long_sep = str_of((res.size() + 8) * SQUARE_WIDTH, "█"), short_sep = str_of(4 * SQUARE_WIDTH, "█"), - black = str_of(SQUARE_WIDTH, "█"), - white = string(SQUARE_WIDTH, ' '); + black = string(SQUARE_WIDTH, ' '), + white = str_of(SQUARE_WIDTH, "█"); #endif for (int i = 0; i < 4; i++) @@ -92,10 +92,10 @@ int main() { for (auto cell : res[i]) switch (cell) { case Trit::T: - cout << white; + cout << black; break; case Trit::F: - cout << black; + cout << white; break; default: throw std::runtime_error("Empty cell is not allowed. Your QR code is corrupted."); diff --git a/README.MD b/README.MD index a0badfc..b6e7c6f 100644 --- a/README.MD +++ b/README.MD @@ -78,8 +78,8 @@ You can get resulting QR code as 2D array of `Trits`: ```c++ enum Trit { EMPTY = -1, - F, // Black square - T, // White square + F, // White square + T, // Black square }; ```