diff --git a/block.cpp b/block.cpp index 789653d..2ee62dd 100644 --- a/block.cpp +++ b/block.cpp @@ -1,7 +1,7 @@ #include "block.hpp" void Block::draw(sf::RenderWindow& window) { - shape.setPosition(position * 32.f); + shape.setPosition(position); window.draw(shape); } diff --git a/block.hpp b/block.hpp index 692baad..cd953da 100644 --- a/block.hpp +++ b/block.hpp @@ -11,7 +11,9 @@ protected: sf::RectangleShape shape; public: - Block(float x, float y) : Object(x,y), shape(sf::Vector2f(32, 32)) { + static constexpr float GRID = 32; + + Block(float x, float y) : Object(x, y), shape(sf::Vector2f(Block::GRID, Block::GRID)) { shape.setFillColor(sf::Color(0, 0, 0)); }