22 lines
312 B
C
22 lines
312 B
C
#pragma once
|
|
|
|
|
|
enum PiecesType {
|
|
CONVEX,
|
|
HOLELESS,
|
|
OTHERS,
|
|
ALL,
|
|
SINGLE
|
|
};
|
|
|
|
|
|
inline int getSizeOfPieces(PiecesType type) {
|
|
if (type < SINGLE) return 0;
|
|
|
|
else return (type - SINGLE + 1);
|
|
}
|
|
|
|
inline PiecesType createSinglePieceType(int size) {
|
|
return PiecesType(SINGLE + size - 1);
|
|
}
|