ajouté interface textuelle

This commit is contained in:
2025-03-02 23:36:20 +01:00
parent 857f90d646
commit 1033f3a64c
21 changed files with 646 additions and 113 deletions

View File

@@ -13,8 +13,9 @@
*/
class Piece {
private:
Polyomino polyomino; // a polyomino representing the piece, (0, 0) is downleft
Block blockType; // the block type of the 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
public:
/**
@@ -28,9 +29,14 @@ class Piece {
void rotate(Rotation rotation);
/**
* @return A copy of the list of positions of the piece
* Rotates the piece to its default rotation
*/
std::set<Position> getPositions() const;
void defaultRotation();
/**
* @return The list of positions of the piece
*/
const std::set<Position>& getPositions() const;
/**
* @return The length of the piece