Browse Source

productive for quieter() if volume is zero

feature-pr-revised_louderQuieter
Jan Ortner 3 years ago
parent
commit
e8a5a507df
  1. 6
      src/main/java/device/radioPlayer/RadioPlayer.java

6
src/main/java/device/radioPlayer/RadioPlayer.java

@ -29,14 +29,14 @@ public class RadioPlayer implements Device {
@Override
public void louder() {
if(Lautstaerke < 100){
Lautstaerke+=1;}
if(Lautstaerke < 100){Lautstaerke+=1;}
else Lautstaerke = 100;
}
@Override
public void quieter() {
Lautstaerke-=1;
if(Lautstaerke > 0){Lautstaerke-=1;}
else Lautstaerke = 0;
}
@Override
public int getVolume() {

Loading…
Cancel
Save