*/
@Override
public List<GenericState> getGenericStates() {
ArrayList<GenericState> liste = new ArrayList<GenericState>(2);
liste.add(new GenericState() {
/**
*
*/
private static final long serialVersionUID = -6730081139571785657L;
@Override
public String stateName() {
return "drv";
}
@Override
public void stateAction(
int statePar,
RobEA rob,
EnvironmentEA umg,
ParCollection params) {
rob.vorwaerts();
}
});
liste.add(new GenericState() {
/**
*
*/
private static final long serialVersionUID = 6903209670531450839L;
@Override
public String stateName() {
return "lft";
}
@Override
public void stateAction(
int statePar,
RobEA rob,
EnvironmentEA umg,
ParCollection params) {
if (rob.getGeschwLinks() < 10) {
rob.setGeschRadLinks(rob.getGeschwLinks() + 0.5);
} else {
if (rob.getGeschwRechts() > -10) {
rob.setGeschRadRechts(rob.getGeschwRechts() - 0.5);
}
}
rob.vorwaerts();
}
});
liste.add(new GenericState() {
/**
*
*/
private static final long serialVersionUID = 3337103524267477306L;