added AndCondition

This commit is contained in:
Stephan Richter
2020-12-24 15:05:34 +01:00
parent c42bd7691d
commit 312fcc900b
6 changed files with 26 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ public class BrakeStop extends Action {
@Override
public boolean fire(Context context) {
if (isNull(context.route())) return false;
if (isNull(context.route()) || isNull(context.route().train())) return false;
context.route().brakeStop();
return true;
}