hotfix: no window size fix resulted in ball out of border.
This commit is contained in:
parent
881f3ae97c
commit
4baf5724eb
@ -75,7 +75,7 @@ public class Ball implements IBall{
|
||||
if(this.position.getY() < 0) this.direction.setDy(-(this.direction.getDy()));
|
||||
|
||||
// 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()));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class View extends JFrame {
|
||||
pack();
|
||||
|
||||
// hotfix: screen size
|
||||
setMinimumSize(new Dimension((int) Constants.SCREEN_WIDTH, (int) Constants.SCREEN_HEIGHT));
|
||||
setMinimumSize(new Dimension(1, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user