22 lines
363 B
C
22 lines
363 B
C
#pragma once
|
|
|
|
|
|
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);
|
|
}
|