Adjusted wind direction changing angles to a smaller angle.

#story[882]
This commit is contained in:
zwu18
2017-05-10 22:20:00 +12:00
parent 8390b19299
commit ce5a726153
+5 -4
View File
@@ -110,18 +110,18 @@ public class Race implements Runnable {
* Initiate a random wind direction
*/
protected void initialiseWindDir(){
windDir = new Random().nextInt(65535);
windDir = (int) new Random().nextInt(65535+1);
}
/**
* Changes the wind direction. Checks to make sure wind direction is between 0 - 65535
*/
protected void changeWindDir(){
int r = new Random().nextInt(3) + 1;
int r = new Random().nextInt(4) + 1;
if (r == 1){
windDir+=250;
windDir+=100;
} else if (r == 2) {
windDir-=250;
windDir-=100;
}
if (windDir > 65535){
windDir -= 65535;
@@ -129,6 +129,7 @@ public class Race implements Runnable {
if (windDir < 0){
windDir += 65535;
}
System.out.println(windDir);
}
/**