From 30743b86f8e06bf081e30ceab6f058b55b349011 Mon Sep 17 00:00:00 2001 From: Claudio Hoffmann <hoffmanncl72341@th-nuernberg.de> Date: Mon, 18 Jan 2021 17:35:52 +0100 Subject: [PATCH] Level: Remove unused elements from Wall --- Level.cpp | 10 +--------- Level.hpp | 6 ------ 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Level.cpp b/Level.cpp index dd83b3b..04cf7c4 100644 --- a/Level.cpp +++ b/Level.cpp @@ -18,13 +18,10 @@ DynamicPixelBuffer Wall::constructWallBuffer(Orientation orientation, int length Wall::Wall(int length, int thickness, Position const &pos, Orientation orientation) : Entity(pos), - wallLength(length), - wallThickness(thickness), wallOrientation(orientation), - wallColor(_1), wallBuffer(constructWallBuffer(orientation, length, thickness)) { - this->wallBuffer.clear(this->wallColor); + this->wallBuffer.clear(_1); } PixelBuffer const& Wall::getSprite() @@ -32,11 +29,6 @@ PixelBuffer const& Wall::getSprite() return this->wallBuffer; } -void Wall::setWallColor(Color color) -{ - this->wallColor = color; -} - Orientation Wall::getOrientation() const { return this->wallOrientation; diff --git a/Level.hpp b/Level.hpp index af1b93d..ce77365 100644 --- a/Level.hpp +++ b/Level.hpp @@ -30,16 +30,10 @@ public: Wall(int length, int thickness, Position const &pos, Orientation orientation); DynamicPixelBuffer constructWallBuffer(Orientation orientation, int length, int thickness); PixelBuffer const& getSprite() override; - void setWallColor(Color color); Orientation getOrientation() const; private: - int wallLength; - int wallThickness; - Orientation wallOrientation; - Color wallColor; - DynamicPixelBuffer wallBuffer; }; -- GitLab