1
0
Fork 0

hotfix: no window size fix resulted in ball out of border.

This commit is contained in:
rxbn 2019-11-19 13:52:54 +01:00
parent 881f3ae97c
commit 4baf5724eb
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ public class Ball implements IBall{
if(this.position.getY() < 0) this.direction.setDy(-(this.direction.getDy())); if(this.position.getY() < 0) this.direction.setDy(-(this.direction.getDy()));
// bottom border // bottom border
if(this.position.getY()+2*Constants.BALL_DIAMETER > Constants.SCREEN_HEIGHT) this.direction.setDy(-(this.direction.getDy())); if(this.position.getY()+Constants.BALL_DIAMETER > Constants.SCREEN_HEIGHT) this.direction.setDy(-(this.direction.getDy()));
} }
} }

View File

@ -72,7 +72,7 @@ public class View extends JFrame {
pack(); pack();
// hotfix: screen size // hotfix: screen size
setMinimumSize(new Dimension((int) Constants.SCREEN_WIDTH, (int) Constants.SCREEN_HEIGHT)); setMinimumSize(new Dimension(1, 1));
} }
/** /**