diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..8fd17d8 --- /dev/null +++ b/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/.project b/.project new file mode 100644 index 0000000..78f6692 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + MoveTheSquare + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/controllers/GameController.java b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/controllers/GameController.java index 9c20be9..6c9fbf2 100644 --- a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/controllers/GameController.java +++ b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/controllers/GameController.java @@ -21,7 +21,7 @@ public void computeSquareMoveDirection(Game game, Square square, double mouseX, moveY = -Game.MOVE_DIST; } - game.setSquareDx(moveX); + game.setSquareDx(moveX); game.setSquareDy(moveY); } } diff --git a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/model/Game.java b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/model/Game.java index d0e3f25..6451b76 100644 --- a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/model/Game.java +++ b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/model/Game.java @@ -1,7 +1,8 @@ package edu.ycp.cs320.movethesquare.model; public class Game { - public static final double MOVE_DIST = 2.0; // x/y distance square moves each tick + // lbradley1: speed up the squares movement by double + public static final double MOVE_DIST = 6.0; // x/y distance square moves each tick private double width, height; private Square square; private double squareDx; diff --git a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java index 674d86b..e18cf85 100644 --- a/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java +++ b/MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java @@ -17,7 +17,11 @@ import edu.ycp.cs320.movethesquare.model.Square; public class GameView extends JPanel { + private static final Color MIDNIGHT_BLUE = new Color(25, 25, 112); + //dherr: new background color Sunset_Red + private static final Color Sunset_Red = new Color(220, 49, 11); + private static final Color RED = new Color(100, 0, 0); private Game model; private GameController controller; @@ -26,7 +30,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); + + + //dherr: applied new background color + setBackground( Sunset_Red); + // djh2-KEC119-21: changed from 30 to 45 // djh2-YCPlaptop: change from 45 to 100 @@ -66,7 +74,9 @@ protected void paintComponent(Graphics g) { // djh2-KEC110-21: changed from GREEN to RED // djh2-YCPlaptop: change from RED to YELLOW - g.setColor(Color.YELLOW); + + // lbradley1: change from YELLOW to BLUE + g.setColor(Color.BLUE); Square square = model.getSquare(); @@ -84,8 +94,11 @@ public void run() { Square square = new Square(); square.setX(300.0); square.setY(220.0); - square.setWidth(40.0); - square.setHeight(40.0); + + // lbradley1: change the size of the square to be smaller + square.setWidth(25.0); + square.setHeight(25.0); + model.setSquare(square); GameController controller = new GameController(); diff --git a/README.md b/README.md index ac8163e..c561c9a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ MoveTheSquare -============= The game engine for the next great indie game. diff --git a/bin/edu/ycp/cs320/movethesquare/controllers/GameController.class b/bin/edu/ycp/cs320/movethesquare/controllers/GameController.class new file mode 100644 index 0000000..21d176f Binary files /dev/null and b/bin/edu/ycp/cs320/movethesquare/controllers/GameController.class differ diff --git a/bin/edu/ycp/cs320/movethesquare/model/Game.class b/bin/edu/ycp/cs320/movethesquare/model/Game.class new file mode 100644 index 0000000..ae060aa Binary files /dev/null and b/bin/edu/ycp/cs320/movethesquare/model/Game.class differ diff --git a/bin/edu/ycp/cs320/movethesquare/model/Square.class b/bin/edu/ycp/cs320/movethesquare/model/Square.class new file mode 100644 index 0000000..f761b8d Binary files /dev/null and b/bin/edu/ycp/cs320/movethesquare/model/Square.class differ diff --git a/bin/edu/ycp/cs320/movethesquare/ui/GameView$1.class b/bin/edu/ycp/cs320/movethesquare/ui/GameView$1.class new file mode 100644 index 0000000..2f79d48 Binary files /dev/null and b/bin/edu/ycp/cs320/movethesquare/ui/GameView$1.class differ diff --git a/bin/edu/ycp/cs320/movethesquare/ui/GameView$2.class b/bin/edu/ycp/cs320/movethesquare/ui/GameView$2.class new file mode 100644 index 0000000..678b4bb Binary files /dev/null and b/bin/edu/ycp/cs320/movethesquare/ui/GameView$2.class differ diff --git a/bin/edu/ycp/cs320/movethesquare/ui/GameView.class b/bin/edu/ycp/cs320/movethesquare/ui/GameView.class new file mode 100644 index 0000000..96ff3a8 Binary files /dev/null and b/bin/edu/ycp/cs320/movethesquare/ui/GameView.class differ