-
Notifications
You must be signed in to change notification settings - Fork 0
/
visual.h
58 lines (53 loc) · 1.83 KB
/
visual.h
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
50
51
52
53
54
55
56
57
58
#ifdef _WIN32
#include <windows.h>
/* Color constants for Windows */
#define BLACK 0
#define DARKBLUE 1
#define DARKGREEN 2
#define DARKCYAN 3
#define DARKRED 4
#define DARKMAGENTA 5
#define BROWN 6
#define GRAY 7
#define DARKGRAY 8
#define BLUE 9
#define GREEN 10
#define CYAN 11
#define RED 12
#define MAGENTA 13
#define YELLOW 14
#define WHITE 15
#else
/* Color ANSI escape sequences */
#define BLACK "\x1b[30m"
#define DARKBLUE "\x1b[34m"
#define DARKGREEN "\x1b[32m"
#define DARKCYAN "\x1b[36m"
#define DARKRED "\x1b[31m"
#define DARKMAGENTA "\x1b[35m"
#define BROWN "\x1b[31m" /* RED fallback */
#define GRAY "\x1b[37m" /* WHITE fallback */
#define DARKGRAY "\x1b[37m" /* WHITE fallback */
#define BLUE "\x1b[34m" /* BLUE fallback */
#define GREEN "\x1b[32m" /* GREEN fallback */
#define CYAN "\x1b[36m" /* CYAN fallback */
#define RED "\x1b[31m" /* RED fallback */
#define MAGENTA "\x1b[35m" /* MAGENTA fallback */
#define YELLOW "\x1b[33m"
#define WHITE "\x1b[37m"
#define RESET "\x1b[0m"
#endif
#define COLOR_INFO CYAN
#define COLOR_WARN YELLOW
#define COLOR_ERROR RED
#ifdef _WIN32
void set_color(int ForgC, int BackC);
#else
void set_color(char *ForgC, char *BackC);
#endif
void reset_color();
void print_all_groups(Group *groups, int groupCount, Criteria *allCriteria, int criteriaCount, int debug);
void print_group(Group *g, int criteriaCount, int debug);
void print_all_persons(Person *all, int personCount, int criteriaCount);
void print_chromosome(Chromosome chromosome);
void print_generation(int gen, double avg, double med, double best, double worst);