mock:
Moved wind generation logic and state into the WindGenerator class. MockRace initialises this, and calls it to update wind.
This commit is contained in:
@@ -255,6 +255,14 @@ public abstract class Race implements Runnable {
|
||||
*/
|
||||
protected void setWind(Bearing windBearing, double windSpeedKnots) {
|
||||
Wind wind = new Wind(windBearing, windSpeedKnots);
|
||||
setWind(wind);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the race to have a specified wind (bearing and speed).
|
||||
* @param wind New wind.
|
||||
*/
|
||||
protected void setWind(Wind wind) {
|
||||
this.raceWind.setValue(wind);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user