refactor(player): clean code => Lightweight

This commit is contained in:
2024-01-09 14:15:17 +01:00
parent 9b0a7a78bb
commit 8d542b6484
6 changed files with 33 additions and 31 deletions
+5 -7
View File
@@ -9,16 +9,14 @@ using namespace sf;
class Player
{
public:
Player(RenderWindow& window): _window(window) {}
Player(int screenSize);
CircleShape PlayerShape = CircleShape(20, 3);
void drawPlayer();
CircleShape getShape() { return _shape; };
void move(int direction);
private:
int _x = 0;
int _velocity = 7;
RenderWindow& _window;
CircleShape _shape;
int _screenSize;
};