Fix HellsBells distribution
Dieser Commit ist enthalten in:
Ursprung
b7520abb1b
Commit
3ae18ab0b8
@ -114,7 +114,7 @@ public class HellsBells {
|
|||||||
|
|
||||||
private int getStart(int regionSize, int length) {
|
private int getStart(int regionSize, int length) {
|
||||||
double randomNumber = (random.nextDouble() - random.nextDouble()) / 2 + 0.5;
|
double randomNumber = (random.nextDouble() - random.nextDouble()) / 2 + 0.5;
|
||||||
return (int) (randomNumber * (regionSize - length));
|
return Math.max(Math.min((int) (randomNumber * (regionSize - length)), regionSize - length), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getHeightStart() {
|
private int getHeightStart() {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren