-
Notifications
You must be signed in to change notification settings - Fork 1
/
utils.h
48 lines (38 loc) · 763 Bytes
/
utils.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
//
// Created by haita on 2020/05/07.
//
#ifndef FREECELL_UTILS_H
#define FREECELL_UTILS_H
// Printing color
#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_RESET "\x1b[0m"
// Moving the cursor one line up
#define GO_UP "\033[F"
// Clear screen depending on the Operating system
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)
#define CLR "cls"
#else
#define CLR "clear"
#endif
typedef enum {
FALSE,
TRUE
} bool;
/**
* Print in Red
*/
void printr(char *string);
/**
* Print in Green
*/
void printg(char *string);
/**
* Clear screen
*/
void clrscr();
/**
* Clear input buffer
*/
void clearBuffer();
#endif //FREECELL_UTILS_H