Skip to content

Commit

Permalink
redundant code deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip M authored and Philip M committed Aug 1, 2018
1 parent b6b5333 commit 7225293
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
Binary file modified Steve/productions/production/Steve/Repo.class
Binary file not shown.
Binary file modified Steve/productions/production/Steve/Steve.class
Binary file not shown.
36 changes: 18 additions & 18 deletions Steve/src/Steve.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,38 @@ public static void main (String[] args)
{
rightEye.setHeightright(70);
leftEye.setHeightleft(70);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();

} else {
leftEye.setHeightleft(90);
rightEye.setHeightright(90);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//upper boundary
if(leftEye.getLeftYPos() > 110)
{
leftEye.setLeftYPos(110);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

if(rightEye.getRightYPos() > 110)
{
rightEye.setRightYPos(110);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//lower boundary
if(leftEye.getLeftYPos() < 10)
{
leftEye.setLeftYPos(10);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

if(rightEye.getRightYPos() < 10)
{
rightEye.setRightYPos(10);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//moving up
Expand All @@ -58,7 +58,7 @@ public static void main (String[] args)
rightYPos++;
leftEye.setLeftYPos(leftYPos);
rightEye.setRightYPos(rightYPos);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//moving down
Expand All @@ -70,52 +70,52 @@ public static void main (String[] args)
rightYPos--;
leftEye.setLeftYPos(leftYPos);
rightEye.setRightYPos(rightYPos);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//resizing width
if(leftEye.getLeftXPos() < 25)
{
leftEye.setWidthleft(70);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
} else {
leftEye.setWidthleft(80);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

if(rightEye.getRightXPos() > 200)
{
rightEye.setWidthright(70);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
} else {
rightEye.setWidthright(80);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//left boundary
if(leftEye.getLeftXPos() < 10)
{
leftEye.setLeftXPos(10);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

if(rightEye.getRightXPos() < 110)
{
rightEye.setRightXPos(110);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//right boundary
if(leftEye.getLeftXPos() > 110)
{
leftEye.setLeftXPos(110);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

if(rightEye.getRightXPos() > 210)
{
rightEye.setRightXPos(210);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//moving right
Expand All @@ -127,7 +127,7 @@ public static void main (String[] args)
rightXPos++;
leftEye.setLeftXPos(leftXPos);
rightEye.setRightXPos(rightXPos);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//moving left
Expand All @@ -139,7 +139,7 @@ public static void main (String[] args)
rightXPos--;
leftEye.setLeftXPos(leftXPos);
rightEye.setRightXPos(rightXPos);
frame.repaintDrawPanel();
//frame.repaintDrawPanel();
}

//looking angry
Expand Down

0 comments on commit 7225293

Please sign in to comment.