Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Background and Square Color #12

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
b966d45
Changed background to back, changed square color to green, changed
tredfern1 Feb 7, 2021
ac76e6d
Revert "Changed background to back, changed square color to green, ch…
tredfern1 Feb 7, 2021
f00259c
changed square from yellow to green, changed square to a rectangle
tredfern1 Feb 7, 2021
aa15d78
Changed the rectangle from solid to hollow
tfranks31 Feb 8, 2021
3753299
changed square size
ksmith6767 Feb 8, 2021
415c13b
changed size again
ksmith6767 Feb 8, 2021
560f82b
Update GameView.java
ktanzosh Feb 9, 2021
dab2045
Update GameView.java
huntress284 Feb 9, 2021
9a56694
Changed square size, color and speed.
DonaldHakeII Mar 5, 2017
f15d4a4
Update GameView.java
huntress284 Feb 10, 2021
76fa4a2
Square Modifications
Liam920 Feb 10, 2021
9cea39d
Added & applied new background color
Derek-Herr77 Feb 10, 2021
cd4cc96
changed color and size
sausan22 Feb 11, 2021
cc6b13e
Update GameView.java
jack16816 Feb 11, 2021
e4fc969
Update GameView.java
rblack5 Feb 11, 2021
fb27557
Added color Red, changed background to Red, changed cube to blue
KarthikeyanCOTM Feb 11, 2021
040c19d
Changed Background and Square Color
EthanYCP Feb 11, 2021
935053a
Update GameView.java
michaelfeldman1 Feb 12, 2021
126fa7d
Changed square height and background color
michaelfeldman1 Feb 12, 2021
d31a85a
made wider
iarnold885113 Feb 12, 2021
58f2d30
wider
iarnold885113 Feb 12, 2021
239fc70
circles are better
robjtede Feb 17, 2021
5dd7405
l33tsp3ak
robjtede Feb 17, 2021
8745dbb
Merge pull request #23 from robjtede/ilikecircle
KaiFish Feb 17, 2021
2eb58cc
Merge branch 'master' into coolkid
KaiFish Feb 17, 2021
76b6706
Merge pull request #24 from robjtede/coolkid
KaiFish Feb 17, 2021
d0b6f79
Update README.md
KaiFish Feb 17, 2021
ea48537
Merge pull request #8 from KaiFish/jquinteros
KaiFish Feb 17, 2021
e449c70
Merge branch 'master' into dherr
KaiFish Feb 17, 2021
78550c9
Merge pull request #19 from KaiFish/dherr
KaiFish Feb 17, 2021
bd5f742
Merge pull request #3 from KaiFish/ksmith126
ksmith6767 Feb 17, 2021
9df9bab
Merge branch 'master' into jsnyder17
ksmith6767 Feb 17, 2021
eac2f1b
Merge branch 'master' into ssanjuan1
jack16816 Feb 17, 2021
9ac801a
Merge pull request #22 from KaiFish/jsnyder17
ksmith6767 Feb 17, 2021
b13a480
Merge branch 'attempt3' into khunt6
jsnyder17 Feb 17, 2021
1f93155
Merge pull request #7 from KaiFish/ssanjuan1
jack16816 Feb 17, 2021
bdf7821
Merge branch 'master' into khunt6
jack16816 Feb 17, 2021
03dd3dd
Merge pull request #6 from KaiFish/khunt6
jack16816 Feb 17, 2021
1329034
Merge branch 'master' into lbradley1
ksmith6767 Feb 17, 2021
5b0c615
Merge pull request #14 from KaiFish/lbradley1
ksmith6767 Feb 17, 2021
4906eb6
Merge branch 'master' into ktanzosh
ktanzosh Feb 17, 2021
34ef5d9
Merge branch 'master' into master
Derek-Herr77 Feb 17, 2021
45d3c18
Merge pull request #2 from tredfern1/master
Derek-Herr77 Feb 17, 2021
3bf0e2d
Merge branch 'master' into ktanzosh
Derek-Herr77 Feb 17, 2021
1d7be8c
Merge pull request #15 from ktanzosh/ktanzosh
Derek-Herr77 Feb 17, 2021
c6fca59
Super Important Contribution
jgross11 Feb 17, 2021
828cb54
Merge pull request #26 from KaiFish/Super-Important-Contribution-Branch
KaiFish Feb 17, 2021
64585fa
Merge pull request #1 from KaiFish/tfranks
KaiFish Feb 17, 2021
286916f
Merge branch 'master' into rblack5
KaiFish Feb 17, 2021
5c536b9
Merge pull request #9 from KaiFish/rblack5
KaiFish Feb 17, 2021
558b958
Merge branch 'master' into rdean3
ericjohns55 Feb 17, 2021
81f6943
Merge pull request #21 from KaiFish/rdean3
ericjohns55 Feb 17, 2021
3142d48
Merge branch 'master' into mfeldman1
ericjohns55 Feb 17, 2021
4314965
Merge pull request #16 from michaelfeldman1/mfeldman1
ericjohns55 Feb 17, 2021
f0fe7e7
Merge branch 'master' into esnyder16
ericjohns55 Feb 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="MoveTheSquare/src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MoveTheSquare</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
41 changes: 36 additions & 5 deletions MoveTheSquare/src/edu/ycp/cs320/movethesquare/ui/GameView.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@
import edu.ycp.cs320.movethesquare.model.Square;

public class GameView extends JPanel {

private static final Color GRAY = new Color(105, 110, 115);


private static final Color MIDNIGHT_BLUE = new Color(25, 25, 112);


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;
Expand All @@ -26,8 +36,13 @@ 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(GRAY);





// djh2-KEC119-21: changed from 30 to 45
// djh2-YCPlaptop: change from 45 to 100
this.timer = new Timer(1000 / 100, new ActionListener() {
Expand Down Expand Up @@ -66,11 +81,19 @@ protected void paintComponent(Graphics g) {

// djh2-KEC110-21: changed from GREEN to RED
// djh2-YCPlaptop: change from RED to YELLOW
g.setColor(Color.YELLOW);


// changed from YELLOW to BLUE
g.setColor(Color.BLUE);

//g.setColor(Color.GREEN);


// lbradley1: change from YELLOW to BLUE
//setColor(Color.BLUE);
Square square = model.getSquare();

g.fillRect((int) square.getX(), (int) square.getY(), (int) square.getWidth(), (int) square.getHeight());
g.drawRect((int) square.getX(), (int) square.getY(), (int) square.getWidth(), (int) square.getHeight());
}

public static void main(String[] args) {
Expand All @@ -84,8 +107,16 @@ public void run() {
Square square = new Square();
square.setX(300.0);
square.setY(220.0);
square.setWidth(40.0);
square.setHeight(40.0);


// MF changed square width from 40.0 to 80.0
square.setWidth(80.0);

// MF changed square height from 40.0 to 80.0
square.setHeight(80.0);



model.setSquare(square);

GameController controller = new GameController();
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
MoveTheSquare
=============

The game engine for the next great indie game.

Expand Down
Binary file not shown.
Binary file added bin/edu/ycp/cs320/movethesquare/model/Game.class
Binary file not shown.
Binary file not shown.
Binary file added bin/edu/ycp/cs320/movethesquare/ui/GameView$1.class
Binary file not shown.
Binary file not shown.
Binary file added bin/edu/ycp/cs320/movethesquare/ui/GameView.class
Binary file not shown.