From b3cbe0cda515ea6c50d0c58c3c7506608ded5015 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Tue, 13 Nov 2018 19:01:14 +0400 Subject: [PATCH] Remove magic value --- core/src/com/me/brickbuster/entity/Paddle.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/me/brickbuster/entity/Paddle.java b/core/src/com/me/brickbuster/entity/Paddle.java index 1ae44f2..65b12fb 100644 --- a/core/src/com/me/brickbuster/entity/Paddle.java +++ b/core/src/com/me/brickbuster/entity/Paddle.java @@ -12,6 +12,7 @@ import net.dermetfan.utils.Pair; public class Paddle extends Entity { + public static final Color STICKY_COLOR = Color.GRAY; public static final Color PADDLE_COLOR = Color.BLACK; public static final int DEFAULT_WIDTH = 300; public static final int PADDLE_HEIGHT = 30; @@ -28,7 +29,7 @@ public class Paddle extends Entity { @Override public void render(ShapeRenderer sr) { sr.begin(ShapeType.Filled); - sr.setColor(sticky? Color.GRAY : PADDLE_COLOR); + sr.setColor(sticky? STICKY_COLOR : PADDLE_COLOR); sr.rect(getX() - width/2, getY(), width, PADDLE_HEIGHT); sr.end(); }