#pragma once
//!@file функции для управления выводом в консоль
namespace a83 {
//! доступные цвета в консоли
enum class term_col {
  BLACK = 0,
  BLUE,
  GREEN,
  CYAN,
  RED,
  MAGENTA,
  BROWN,
  LIGHT_GRAY,
  DARK_GRAY,
  LIGHT_BLUE,
  LIGHT_GREEN,
  LIGHT_CYAN,
  LIGHT_RED,
  LIGHT_MAGENTA,
  YELOW,
  WHITE
};
#ifdef is_windows
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
void terminal_color(term_col text = term_col::LIGHT_GRAY,
term_col ground = term_col::BLACK) {
  HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
  SetConsoleTextAttribute(handle, WORD(ground) * 0x10 | WORD(text)); 
}
#else // linux ver:
void terminal_color(term_col /*text*/ = term_col::LIGHT_GRAY,
  term_col /*ground*/ = term_col::BLACK) {}
#endif
} // namespace a83