Last change
on this file since 163 was 1, checked in by Wouter Pasman, 7 years ago |
Initial import : Genius 9.0.0
|
File size:
594 bytes
|
Rev | Line | |
---|
[1] | 1 | package agents.nastyagent;
|
---|
| 2 |
|
---|
| 3 | import java.util.List;
|
---|
| 4 |
|
---|
| 5 | import genius.core.actions.Action;
|
---|
| 6 | import genius.core.persistent.PersistentDataType;
|
---|
| 7 | import genius.core.persistent.StandardInfoList;
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | * Tries to modify immutable persistent data
|
---|
| 11 | *
|
---|
| 12 | */
|
---|
| 13 | public 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.