|
|
@ -32,14 +32,16 @@ package strat; |
|
|
*/ |
|
|
*/ |
|
|
public class MDStrategyArray extends MDStrategy |
|
|
public class MDStrategyArray extends MDStrategy |
|
|
{ |
|
|
{ |
|
|
|
|
|
private explicit.Model model; |
|
|
private int choices[]; |
|
|
private int choices[]; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Creates an MDStrategyArray from an integer array of choices. |
|
|
* Creates an MDStrategyArray from an integer array of choices. |
|
|
* The array may later be modified/delete - take a copy if you want to keep it. |
|
|
* The array may later be modified/delete - take a copy if you want to keep it. |
|
|
*/ |
|
|
*/ |
|
|
public MDStrategyArray(int choices[]) |
|
|
|
|
|
|
|
|
public MDStrategyArray(explicit.Model model, int choices[]) |
|
|
{ |
|
|
{ |
|
|
|
|
|
this.model = model; |
|
|
this.choices = choices; |
|
|
this.choices = choices; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -54,4 +56,10 @@ public class MDStrategyArray extends MDStrategy |
|
|
{ |
|
|
{ |
|
|
return choices[i]; |
|
|
return choices[i]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Object getChoiceAction(int i) |
|
|
|
|
|
{ |
|
|
|
|
|
return "";//model.getAction(choices[i]); |
|
|
|
|
|
} |
|
|
} |
|
|
} |