Aufgabe 2 - neue Vorgabe fuer IBall + basic implementation
This commit is contained in:
parent
7ba9618f63
commit
dcc68e837a
@ -92,4 +92,21 @@ public class Ball implements IBall {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* test if Ball hits paddle
|
||||
* @param paddle paddle which will be tested
|
||||
* @return true when ball hits paddle
|
||||
*/
|
||||
public boolean hitsPaddle(Paddle paddle) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ball got hit by Paddle paddle
|
||||
* @param paddle hitbox mechanism of paddle
|
||||
*/
|
||||
public void reflectOnPaddle(Paddle paddle) {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,4 +7,8 @@ public interface IBall {
|
||||
public void reactOnBorder();
|
||||
public Position getPosition();
|
||||
public Vector2D getDirection();
|
||||
}
|
||||
|
||||
// Exercise 2
|
||||
public boolean hitsPaddle(Paddle paddle);
|
||||
public void reflectOnPaddle(Paddle paddle);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user