1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package net.sf.magicproject.action;
24
25 import net.sf.magicproject.clickable.ability.Ability;
26 import net.sf.magicproject.event.context.ContextEventListener;
27
28 /***
29 * @author <a href="mailto:fabdouglas@users.sourceforge.net">Fabrice Daugan </a>
30 * @since 0.80
31 */
32 public interface LoopAction {
33
34 /***
35 * Continue this action, giving the next index of this loop.
36 *
37 * @param context
38 * is the context attached to this action.
39 * @param loopingIndex
40 * the current index
41 * @param ability
42 * is the ability owning this test. The card component of this
43 * ability should correspond to the card owning this test too.
44 * @return true if the stack can be resolved just after this action.
45 */
46 boolean continueLoop(ContextEventListener context, int loopingIndex,
47 Ability ability);
48
49 /***
50 * Return the first index of this loop.
51 *
52 * @return the first index of this loop.
53 */
54 int getStartIndex();
55
56 }