| Conditions | 5 |
| Total Lines | 7 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | package example.swing; |
||
| 27 | public void move() { |
||
| 28 | ball.translate(dx, dy); |
||
| 29 | if (ball.getX() < 0 || ball.getX() + ball.getWidth() > ball.getDrawingPanel().getWidth()) { |
||
| 30 | dx = -dx; |
||
| 31 | } |
||
| 32 | if (ball.getY() < 0 || ball.getY() + ball.getWidth() > ball.getDrawingPanel().getHeight()) { |
||
| 33 | dy = -dy; |
||
| 34 | } |
||
| 37 |