mirror of
https://github.com/guezoloic/L3-racing-game.git
synced 2026-03-28 19:13:41 +00:00
18 lines
349 B
Java
18 lines
349 B
Java
package model.car;
|
|
|
|
/**
|
|
* Décorateur Sound :
|
|
* affiche un message sonore quand la voiture accélère.
|
|
*/
|
|
public class BoostCar extends CarDecorator {
|
|
public BoostCar(Car car) {
|
|
super(car);
|
|
}
|
|
|
|
@Override
|
|
public String accelerate() {
|
|
System.out.println("VROOOOM VROOOOOOM");
|
|
return car.accelerate();
|
|
}
|
|
}
|