initial commit
This commit is contained in:
40
src/Pieces/Color.h
Normal file
40
src/Pieces/Color.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <String>
|
||||
|
||||
|
||||
/**
|
||||
* Every possible colors a block can take
|
||||
*/
|
||||
enum Color {
|
||||
NOTHING,
|
||||
OUT_OF_BOUND,
|
||||
GARBAGE,
|
||||
PURPLE,
|
||||
ORANGE,
|
||||
CYAN,
|
||||
PINK,
|
||||
YELLOW,
|
||||
RED,
|
||||
BLUE,
|
||||
GREEN
|
||||
};
|
||||
|
||||
|
||||
static const Color FIRST_PIECE_COLOR = PURPLE; // the first color a piece can be
|
||||
static const Color LAST_PIECE_COLOR = GREEN; // the last color a piece can be
|
||||
|
||||
static const std::string COLOR_RESET = "\033[38;2;255;255;255m"; // color code to reset the console color
|
||||
static const std::string COLOR_CODES[] = { // color codes to change the console color
|
||||
COLOR_RESET, // NOTHING
|
||||
COLOR_RESET, // OUT_OF_BOUND
|
||||
"\033[38;2;150;150;150m", // GARBAGE
|
||||
"\033[38;2;150;0;255m", // PURPLE
|
||||
"\033[38;2;255;150;0m", // ORANGE
|
||||
"\033[38;2;0;255;255m", // CYAN
|
||||
"\033[38;2;255;0;200m", // PINK
|
||||
"\033[38;2;255;255;0m", // YELLOW
|
||||
"\033[38;2;255;0;0m", // RED
|
||||
"\033[38;2;0;100;255m", // BLUE
|
||||
"\033[38;2;0;255;0m" // GREEN
|
||||
};
|
||||
Reference in New Issue
Block a user