source: src/test/java/agents/nastyagent/AddPersistentDataToStandard.java@ 126

Last change on this file since 126 was 1, checked in by Wouter Pasman, 6 years ago

Initial import : Genius 9.0.0

File size: 594 bytes
Line 
1package agents.nastyagent;
2
3import java.util.List;
4
5import genius.core.actions.Action;
6import genius.core.persistent.PersistentDataType;
7import genius.core.persistent.StandardInfoList;
8
9/**
10 * Tries to modify immutable persistent data
11 *
12 */
13public class AddPersistentDataToStandard extends NastyAgent {
14 @Override
15 public Action chooseAction(List<Class<? extends Action>> possibleActions) {
16 if (data.getPersistentDataType() == PersistentDataType.STANDARD) {
17 StandardInfoList list = (StandardInfoList) data.get();
18 list.add(null);
19 }
20 return super.chooseAction(possibleActions);
21 }
22
23}
Note: See TracBrowser for help on using the repository browser.