ingame moins moche (mais pas fini)

This commit is contained in:
2025-03-24 13:28:38 +01:00
parent 38008e00bc
commit c08cfc2255
8 changed files with 146 additions and 36 deletions

View File

@@ -346,12 +346,16 @@ bool Game::isOnB2BChain() const {
return this->B2BChain;
}
bool Game::areBlocksBones() const {
return this->parameters.getBoneBlocks();
float Game::getLockDelayProgression() const {
return (float) this->totalLockDelay / this->parameters.getLockDelay();
}
Position Game::ghostPiecePosition() const {
return this->board.lowestPosition();
float Game::getForcedLockDelayProgression() const {
return (float) this->totalForcedLockDelay / this->parameters.getForcedLockDelay();
}
bool Game::areBlocksBones() const {
return this->parameters.getBoneBlocks();
}
const Board& Game::getBoard() const {
@@ -366,6 +370,10 @@ const Position& Game::getActivePiecePosition() const {
return this->board.getActivePiecePosition();
}
Position Game::getGhostPiecePosition() const {
return this->board.lowestPosition();
}
const std::shared_ptr<Piece>& Game::getHeldPiece() const {
return this->board.getHeldPiece();
}

View File

@@ -116,16 +116,21 @@ class Game {
*/
bool isOnB2BChain() const;
/**
* @return How close the active piece's lock delay is to the maximum allowed, betwwen 0 and 1
*/
float getLockDelayProgression() const;
/**
* @return How close the active piece's forced lock delay is to the maximum allowed, betwwen 0 and 1
*/
float getForcedLockDelayProgression() const;
/**
* @return If all blocks are currently bone blocks
*/
bool areBlocksBones() const;
/**
* @return The position of the ghost piece
*/
Position ghostPiecePosition() const;
/**
* @return The board
*/
@@ -141,6 +146,11 @@ class Game {
*/
const Position& getActivePiecePosition() const;
/**
* @return The position of the ghost piece
*/
Position getGhostPiecePosition() const;
/**
* @return A pointer to the held piece, can be null
*/