This commit is contained in:
@@ -16,6 +16,7 @@ class Piece {
|
||||
Polyomino polyomino; // a polyomino representing the piece, (0, 0) is downleft
|
||||
Block blockType; // the block type of the piece
|
||||
Rotation rotationState; // the current rotation of the piece
|
||||
std::vector<Position> positions; // cache positions for easier use (particularly UI)
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -36,7 +37,13 @@ class Piece {
|
||||
/**
|
||||
* @return The list of positions of the piece
|
||||
*/
|
||||
const std::set<Position>& getPositions() const;
|
||||
const std::vector<Position>& getPositions() const;
|
||||
|
||||
/**
|
||||
* @param the position of the square
|
||||
* @return false if there is a hole
|
||||
*/
|
||||
bool containsSquare(const Position& position) const;
|
||||
|
||||
/**
|
||||
* @return The length of the piece
|
||||
|
||||
Reference in New Issue
Block a user