Trying to switch to more object-oriented

This commit is contained in:
2021-03-12 22:33:46 +01:00
parent fbe122a5b9
commit 258ce51cfe
32 changed files with 693 additions and 249 deletions
+3 -2
View File
@@ -40,7 +40,8 @@ public:
std::vector< std::shared_ptr< TetrisBlock > > &getObjects();
void setPos( double x, double y );
void setPos( const std::pair< double, double > &pos );
std::pair< double, double > getPos();
void setPos( const SDLPP::Vec2D<double> &vec );
SDLPP::Vec2D<double> getPos();
void clear();
void startDescend();
void stopDescend();
@@ -69,7 +70,7 @@ private:
std::vector< std::vector< int > > pieces_rel_position;
std::vector< std::shared_ptr< TetrisBlock > > pieces;
std::vector< std::pair< double, double > > original_pos;
std::vector< SDLPP::Vec2D<double> > original_pos;
bool descend = false;
int userMovement = 0;
bool rotate_allowed = true;