#pragma once #include enum PiecesType { CONVEX_PIECES, HOLELESS_PIECES, OTHER_PIECES, ALL_PIECES, SINGLE_PIECE }; inline int getSizeOfPieces(PiecesType type) { if (type < SINGLE_PIECE) return 0; else return (type - SINGLE_PIECE + 1); } inline PiecesType createSinglePieceType(int size) { return PiecesType(SINGLE_PIECE + size - 1); } inline std::string getPiecesTypeName(PiecesType piecesType) { static const std::string PIECES_TYPE_NAME[] = { "CONVEX", "HOLELESS", "OTHER", "ALL", "SINGLE" }; return PIECES_TYPE_NAME[piecesType]; }