Merge remote-tracking branch 'origin/feature_weather' into feature_weather
This commit is contained in:
commit
65b15b6a4c
|
@ -18,7 +18,7 @@ public class WeatherGradenTaskPlanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getWeatherEvents() throws IOException {
|
public void getWeatherEvents() throws IOException {
|
||||||
Enum actualWeather = weatherService.causeSevereWeather(0);
|
SevereWeather actualWeather = weatherService.causeSevereWeather(0);
|
||||||
if (SevereWeather.HAIL.equals(actualWeather)) {
|
if (SevereWeather.HAIL.equals(actualWeather)) {
|
||||||
createPreHail();
|
createPreHail();
|
||||||
} else if (SevereWeather.FROST.equals(actualWeather)) {
|
} else if (SevereWeather.FROST.equals(actualWeather)) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ package ch.zhaw.gartenverwaltung.io;
|
||||||
|
|
||||||
public class WeatherService {
|
public class WeatherService {
|
||||||
|
|
||||||
public Enum causeSevereWeather(int randomWeather){
|
public SevereWeather causeSevereWeather(int randomWeather) {
|
||||||
return switch (randomWeather) {
|
return switch (randomWeather) {
|
||||||
case 1 -> SevereWeather.HAIL;
|
case 1 -> SevereWeather.HAIL;
|
||||||
case 2 -> SevereWeather.SNOW;
|
case 2 -> SevereWeather.SNOW;
|
||||||
|
|
Loading…
Reference in New Issue