| 1 | package com.takenoko.weather; | |
| 2 | ||
| 3 | /** | |
| 4 | * Weather modifier for the game, each element has it's ows effect on the game. The weather can be | |
| 5 | * sunny, rainy, cloudy, windy, storm or random. | |
| 6 | */ | |
| 7 | public enum WeatherFactory { | |
| 8 | /** | |
| 9 | * A great sun shines on the bamboo grove. ☀️ The player benefits from an additional action. | |
| 10 | * This action must be different from his two regular actions. | |
| 11 | */ | |
| 12 | SUNNY { | |
| 13 | @Override | |
| 14 | public Weather createWeather() { | |
| 15 |
1
1. createWeather : replaced return value with null for com/takenoko/weather/WeatherFactory$1::createWeather → KILLED |
return new Sunny(); |
| 16 | } | |
| 17 | }, | |
| 18 | ||
| 19 | /** | |
| 20 | * Gray clouds ☁️ darken the sky. Never mind, it is time to go on and perform some handy work. | |
| 21 | * The player chooses an Improvement chip from those available in the reserve. It can then be | |
| 22 | * placed immediately on a plot or stored on his individual Board (see page 8). If no | |
| 23 | * Improvement is available, the player applies the effect of another climatic condition of his | |
| 24 | * choice (sun, rain, wind or storm). | |
| 25 | */ | |
| 26 | CLOUDY { | |
| 27 | @Override | |
| 28 | public Weather createWeather() { | |
| 29 |
1
1. createWeather : replaced return value with null for com/takenoko/weather/WeatherFactory$2::createWeather → KILLED |
return new Cloudy(); |
| 30 | } | |
| 31 | }, | |
| 32 | ||
| 33 | /** | |
| 34 | * If he gets the “?” face, the player chooses what conditions they wish to apply this turn: | |
| 35 | * Sun, Rain, Wind, Storm or Clouds. | |
| 36 | */ | |
| 37 | QUESTION_MARK { | |
| 38 | @Override | |
| 39 | public Weather createWeather() { | |
| 40 |
1
1. createWeather : replaced return value with null for com/takenoko/weather/WeatherFactory$3::createWeather → KILLED |
return new QuestionMark(); |
| 41 | } | |
| 42 | }, | |
| 43 | ||
| 44 | /** | |
| 45 | * A refreshing breeze blows through the bamboo garden. The player may, but is not required | |
| 46 | * to, take two identical actions in this round (instead of two different actions). | |
| 47 | */ | |
| 48 | WINDY { | |
| 49 | @Override | |
| 50 | public Weather createWeather() { | |
| 51 |
1
1. createWeather : replaced return value with null for com/takenoko/weather/WeatherFactory$4::createWeather → KILLED |
return new Windy(); |
| 52 | } | |
| 53 | }, | |
| 54 | ||
| 55 | /** | |
| 56 | * A fine rain nourishes the young bamboo shoots. The player may place a Bamboo section on the | |
| 57 | * irrigated plot of his choice, up to a limit of four sections per plot. | |
| 58 | */ | |
| 59 | RAINY { | |
| 60 | @Override | |
| 61 | public Weather createWeather() { | |
| 62 |
1
1. createWeather : replaced return value with null for com/takenoko/weather/WeatherFactory$5::createWeather → KILLED |
return new Rainy(); |
| 63 | } | |
| 64 | }, | |
| 65 | ||
| 66 | /** | |
| 67 | * The sky rumbles and lightning strikes, frightening the panda. The player can put the panda on | |
| 68 | * the plot of his choice. To recover from his fear, the shy animal eats a section of bamboo. | |
| 69 | */ | |
| 70 | STORMY { | |
| 71 | @Override | |
| 72 | public Weather createWeather() { | |
| 73 |
1
1. createWeather : replaced return value with null for com/takenoko/weather/WeatherFactory$6::createWeather → KILLED |
return new Stormy(); |
| 74 | } | |
| 75 | }; | |
| 76 | ||
| 77 | public abstract Weather createWeather(); | |
| 78 | } | |
Mutations | ||
| 15 |
1.1 |
|
| 29 |
1.1 |
|
| 40 |
1.1 |
|
| 51 |
1.1 |
|
| 62 |
1.1 |
|
| 73 |
1.1 |