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

@@ -63,7 +63,7 @@ class Game {
/**
* Move the piece in the specified direction
*/
void movePiece(int movement, bool resetDirection);
void movePiece(int movement);
/**
* Locks the piece, updates level and score and spawns the next piece if necessary
@@ -112,27 +112,32 @@ class Game {
bool areBlocksBones() const;
/**
* @return A copy of the board
* @return The position of the ghost piece
*/
Board getBoard() const;
Position ghostPiecePosition() const;
/**
* @return A copy of the active piece
* @return The board
*/
Piece getActivePiece() const;
const Board& getBoard() const;
/**
* @return A copy of the active piece position
* @return A pointer to the active piece, can be null
*/
Position getActivePiecePosition() const;
const std::shared_ptr<Piece>& getActivePiece() const;
/**
* @return A copy of the held piece
* @return The position of the active piece
*/
Piece getHeldPiece() const;
const Position& getActivePiecePosition() const;
/**
* @return A copy of the next pieces queue
* @return A pointer to the held piece, can be null
*/
std::vector<Piece> getNextPieces() const;
const std::shared_ptr<Piece>& getHeldPiece() const;
/**
* @return The next piece queue, can be empty
*/
const std::vector<Piece>& getNextPieces() const;
};