diff --git a/block.cpp b/block.cpp index 2ee62dd..5ef9ee1 100644 --- a/block.cpp +++ b/block.cpp @@ -1,6 +1,14 @@ #include "block.hpp" void Block::draw(sf::RenderWindow& window) { + if (charge > 0) { + shape.setFillColor(sf::Color(0, 0, 255)); + } else if (charge < 0) { + shape.setFillColor(sf::Color(255, 0, 0)); + } else { + shape.setFillColor(sf::Color(0, 0, 0)); + } + shape.setPosition(position); window.draw(shape); }