Package: DilemmaStrategy
DilemmaStrategy
| name | instruction | branch | complexity | line | method | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DilemmaStrategy(IDilemmaMoveFactory) | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
| getMoveFactory() | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
Coverage
1: package de.fhdw.gaming.ipspiel23.dilemma.strategy.internals;
2: 
3: import de.fhdw.gaming.ipspiel23.dilemma.domain.IDilemmaStrategy;
4: import de.fhdw.gaming.ipspiel23.dilemma.moves.IDilemmaMoveFactory;
5: 
6: /**
7:  * Abstract base class for Dilemma strategies.
8:  */
9: public abstract class DilemmaStrategy implements IDilemmaStrategy {
10: 
11:     /**
12:      * The factory for creating Dilemma moves.
13:      */
14:     private final IDilemmaMoveFactory moveFactory;
15: 
16:     /**
17:      * Creates a new Dilemma strategy.
18:      *
19:      * @param moveFactory The factory for creating Dilemma moves.
20:      */
21:     protected DilemmaStrategy(final IDilemmaMoveFactory moveFactory) {
22:         this.moveFactory = moveFactory;
23:     }
24: 
25:     /**
26:      * Returns the factory for creating Dilemma moves.
27:      *
28:      * @return The factory for creating Dilemma moves.
29:      */
30:     protected final IDilemmaMoveFactory getMoveFactory() {
31:         return moveFactory;
32:     }
33: }