{
String s = e.getChildren("step-number").get(0).getText();
int stepnum = Integer.parseInt(s);
String action_term = e.getChildren("move").get(player_id).getText();
GroundFact fact = createAction(action_term,role);
actions.put(stepnum, new SerializableAction(fact));
}
}
// Register the state-action couples by browsing the step_x.xml
// files in the right order.
int step = 1;
while(true)
{
String filename = getStateFilename(location,step);
File file = new File(filename);
if(!file.exists())
{
break;
}
Element root = builder.build(file).getRootElement();
List<Element> states = root.getChildren("state");
SerializableState state = getState(states.get(0));
SerializableAction action = actions.get(step);
if(action != null)
{
transitions.add(new Transition(state,action));
}