From b966d45a7e2555de0756b21d7fd841ea54f13cc2 Mon Sep 17 00:00:00 2001 From: tredfern1 Date: Sun, 7 Feb 2021 17:20:41 -0500 Subject: [PATCH 1/3] Changed background to back, changed square color to green, changed square to a rectangle --- .../src/edu/ycp/cs320/movethesquare/ui/GameView.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java index 674d86b..446213d 100644 --- a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java +++ b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java @@ -17,7 +17,7 @@ import edu.ycp.cs320.movethesquare.model.Square; public class GameView extends JPanel { - private static final Color MIDNIGHT_BLUE = new Color(25, 25, 112); + private static final Color BLACK = new Color(0, 0, 0); private Game model; private GameController controller; @@ -26,11 +26,11 @@ public class GameView extends JPanel { public GameView(Game model) { this.model = model; setPreferredSize(new Dimension((int) model.getWidth(), (int)model.getHeight())); - setBackground(MIDNIGHT_BLUE); + setBackground(BLACK); // djh2-KEC119-21: changed from 30 to 45 // djh2-YCPlaptop: change from 45 to 100 - this.timer = new Timer(1000 / 100, new ActionListener() { + this.timer = new Timer(1000 / 150, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -66,7 +66,7 @@ protected void paintComponent(Graphics g) { // djh2-KEC110-21: changed from GREEN to RED // djh2-YCPlaptop: change from RED to YELLOW - g.setColor(Color.YELLOW); + g.setColor(Color.GREEN); Square square = model.getSquare(); @@ -84,8 +84,8 @@ public void run() { Square square = new Square(); square.setX(300.0); square.setY(220.0); - square.setWidth(40.0); - square.setHeight(40.0); + square.setWidth(60.0); + square.setHeight(20); model.setSquare(square); GameController controller = new GameController(); From ac76e6dc1bdb21362f6f0e7cf87c5799633452c8 Mon Sep 17 00:00:00 2001 From: tredfern1 Date: Sun, 7 Feb 2021 17:23:33 -0500 Subject: [PATCH 2/3] Revert "Changed background to back, changed square color to green, changed square to a rectangle" This reverts commit b966d45a7e2555de0756b21d7fd841ea54f13cc2. --- .../src/edu/ycp/cs320/movethesquare/ui/GameView.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java index 446213d..674d86b 100644 --- a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java +++ b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java @@ -17,7 +17,7 @@ import edu.ycp.cs320.movethesquare.model.Square; public class GameView extends JPanel { - private static final Color BLACK = new Color(0, 0, 0); + private static final Color MIDNIGHT_BLUE = new Color(25, 25, 112); private Game model; private GameController controller; @@ -26,11 +26,11 @@ public class GameView extends JPanel { public GameView(Game model) { this.model = model; setPreferredSize(new Dimension((int) model.getWidth(), (int)model.getHeight())); - setBackground(BLACK); + setBackground(MIDNIGHT_BLUE); // djh2-KEC119-21: changed from 30 to 45 // djh2-YCPlaptop: change from 45 to 100 - this.timer = new Timer(1000 / 150, new ActionListener() { + this.timer = new Timer(1000 / 100, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -66,7 +66,7 @@ protected void paintComponent(Graphics g) { // djh2-KEC110-21: changed from GREEN to RED // djh2-YCPlaptop: change from RED to YELLOW - g.setColor(Color.GREEN); + g.setColor(Color.YELLOW); Square square = model.getSquare(); @@ -84,8 +84,8 @@ public void run() { Square square = new Square(); square.setX(300.0); square.setY(220.0); - square.setWidth(60.0); - square.setHeight(20); + square.setWidth(40.0); + square.setHeight(40.0); model.setSquare(square); GameController controller = new GameController(); From f00259c746e09bcb39723d3bd0c3c14b8e5a0182 Mon Sep 17 00:00:00 2001 From: tredfern1 Date: Sun, 7 Feb 2021 17:25:22 -0500 Subject: [PATCH 3/3] changed square from yellow to green, changed square to a rectangle --- .../src/edu/ycp/cs320/movethesquare/ui/GameView.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java index 674d86b..1ff878c 100644 --- a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java +++ b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java @@ -66,7 +66,7 @@ protected void paintComponent(Graphics g) { // djh2-KEC110-21: changed from GREEN to RED // djh2-YCPlaptop: change from RED to YELLOW - g.setColor(Color.YELLOW); + g.setColor(Color.GREEN); Square square = model.getSquare(); @@ -84,8 +84,8 @@ public void run() { Square square = new Square(); square.setX(300.0); square.setY(220.0); - square.setWidth(40.0); - square.setHeight(40.0); + square.setWidth(60.0); + square.setHeight(25); model.setSquare(square); GameController controller = new GameController();