Skip to content

Commit

Permalink
fixed #95 on Chaos difficulty
Browse files Browse the repository at this point in the history
  • Loading branch information
iamSamuelFu authored Mar 19, 2018
1 parent 05027a2 commit 75972df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/edu/ucsb/cs56/projects/games/pong/gameplay/Pong.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ else if( b[i].getXCoordinate() >= ( Screen.w - 20 ) ) {
hitsReset();
b[i].resetBall(i);
}
}else{
}
}else{
double coef=0;
if(DifficultyLevel.getDifficulty()==80){
coef=0.45;
Expand Down Expand Up @@ -315,7 +316,7 @@ else if( b[i].getXCoordinate() >= ( p2.getXCoordinate()-b[i].getWidth()/2-(Diffi
b[i].resetBall(i);
}
}
}
}
// If the ball hits the top or bottom of the screen,
// then the Y velocity is reversed to stay on screen
for(int i = 0; i < ballNum; i++){
Expand Down

0 comments on commit 75972df

Please sign in to comment.