-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorldGenertation.java
More file actions
66 lines (58 loc) · 2 KB
/
WorldGenertation.java
File metadata and controls
66 lines (58 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import java.util.Objects;
public class WorldGenertation {
protected int TypeOfWeather;
protected void generateWeather(){
if(TypeOfWeather==1){
RainyWeather rainyWeather = new RainyWeather();
rainyWeather.setAir_humidity();
rainyWeather.setTemperature();
rainyWeather.setNebulosity();
rainyWeather.setSolar_power();
rainyWeather.setWind_speed();
StormCloud stormCloud = new StormCloud();
stormCloud.makeThunder(1);
stormCloud.setCoordinates();
rainyWeather.setCommonClouds();
Sea sea = new Sea();
stormCloud.makeLighting(sea);
}
if(TypeOfWeather==2){
SunnyWeather sunnyWeather = new SunnyWeather();
sunnyWeather.setAir_humidity();
sunnyWeather.setTemperature();
sunnyWeather.setNebulosity();
sunnyWeather.setSolar_power();
sunnyWeather.setWind_speed();
sunnyWeather.radiateHeat();
Sea sea = new Sea();
sunnyWeather.makeRays(sea);
}
if(TypeOfWeather==3){
WindyWeather windyWeather = new WindyWeather();
windyWeather.setAir_humidity();
windyWeather.setTemperature();
windyWeather.setNebulosity();
windyWeather.setSolar_power();
windyWeather.setClouds();
windyWeather.setWind_speed();
windyWeather.makeWaves();
}
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
WorldGenertation that = (WorldGenertation) o;
return TypeOfWeather == that.TypeOfWeather;
}
@Override
public int hashCode() {
return Objects.hash(TypeOfWeather);
}
@Override
public String toString() {
return "WorldGenertation{" +
"TypeOfWeather=" + TypeOfWeather +
'}';
}
}