#ifndef GLOBAL_H #define GLOBAL_H #include #include using ull = unsigned long long; void getKeypressDownInput(char &); template void DrawAlways(std::ostream &os, T f) { os << f(); } template void DrawOnlyWhen(std::ostream &os, bool trigger, T f) { if (trigger) { DrawAlways(os, f); } } template void DrawAsOneTimeFlag(std::ostream &os, bool &trigger, T f) { if (trigger) { DrawAlways(os, f); trigger = !trigger; } } template struct DataSupplimentInternalType { suppliment_t suppliment_data; template std::string operator()(function_t f) const { return f(suppliment_data); } }; template auto DataSuppliment(suppliment_t needed_data, function_t f) { using dsit_t = DataSupplimentInternalType; const auto lambda_f_to_return = [=]() { const dsit_t depinject_func = dsit_t{needed_data}; return depinject_func(f); }; return lambda_f_to_return; } void pause_for_keypress(); void wait_for_any_letter_input(std::istream &is); void clearScreen(); std::string secondsFormat(double); #endif