les couleurs

This commit is contained in:
2025-02-25 19:21:08 +01:00
parent 23068b8e61
commit a26d699388
8 changed files with 99 additions and 59 deletions

View File

@@ -11,7 +11,7 @@
*/
class Board {
private:
std::vector<std::vector<Color>> grid; // the grid, (0,0) is downleft
std::vector<std::vector<ColorEnum>> grid; // the grid, (0,0) is downleft
int width; // the width of the grid
int height; // the base height of the grid, which can extends indefinitely
@@ -24,7 +24,7 @@ class Board {
/**
* Change the color of the specified block, if the block is out of bounds it is simply ignored
*/
void addBlock(const Cell& position, Color block);
void addBlock(const Cell& position, ColorEnum block);
/**
* Clears any complete row and moves down the rows on top, returns the number of cleared rows
@@ -34,12 +34,12 @@ class Board {
/**
* Returns the color of the block at the specified position
*/
Color getBlock(const Cell& position) const;
ColorEnum getBlock(const Cell& position) const;
/**
* Returns a copy of the grid
*/
std::vector<std::vector<Color>> getBlocks() const;
std::vector<std::vector<ColorEnum>> getBlocks() const;
/**
* Returns the actual height of the grid