This commit is contained in:
Stephan Richter
2020-12-27 20:20:10 +01:00
parent e042f7d1c1
commit 817bcc9989
4 changed files with 10 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ public class Range extends BaseClass{
}
public int random() {
if (max - min == 0) return max - min;
if (max == min) return min;
return min + random.nextInt(max - min);
}

View File

@@ -52,6 +52,12 @@ public abstract class Block extends StretchableTile{
defaultWT.setMin(directionB(), 0);
defaultWT.setMax(directionB(), 10000);
waitTimes.add(defaultWT);
WaitTime learningWt = new WaitTime(t("learn"));
learningWt.setMin(directionA(), 1000);
learningWt.setMax(directionA(), 1000);
learningWt.setMin(directionB(), 1000);
learningWt.setMax(directionB(), 1000);
waitTimes.add(learningWt);
}
/**
@@ -115,8 +121,7 @@ public abstract class Block extends StretchableTile{
}
public void validate() {
for (Entry<Direction, Range> entry: dirs.entrySet()) entry.getValue().validate();
for (Entry<Direction, Range> entry: dirs.entrySet()) entry.getValue().validate();
}
}