change Position and Polynomio structs (less memory usage)
Some checks failed
Linux arm64 / Build (push) Failing after 2m9s

This commit is contained in:
2025-07-19 20:50:36 +02:00
parent 161c9425ae
commit d5b51213c8
10 changed files with 64 additions and 64 deletions

View File

@@ -13,7 +13,7 @@
class Polyomino {
private:
std::set<Position> positions; // the squares composing the polyomino, (0,0) is downleft
int length; // the size of the smallest square box in which the polyomino can fit on any rotation
std::int8_t length; // the size of the smallest square box in which the polyomino can fit on any rotation
public:
/**
@@ -24,7 +24,7 @@ class Polyomino {
/**
* Creates a polyomino with the specified positions and length, wheter it is actually a polyonimo of this length is not checked
*/
Polyomino(const std::set<Position>& positions, int length);
Polyomino(const std::set<Position>& positions, std::int8_t length);
/**
* Translates the polyomino to the lowest unsigned values (lower row on y = 0, and left-most column on x = 0)