Skip to content

Package: FGPlayerBuilder

FGPlayerBuilder

Coverage

1: package de.fhdw.gaming.ipspiel24.fg.domain;
2:
3: import java.util.Map;
4:
5: import de.fhdw.gaming.core.domain.GameException;
6:
7: /**
8: * A builder which allows to create a Freizeitgestaltung player.
9: */
10: public interface FGPlayerBuilder {
11:
12: /**
13: * Changes the name of the player.
14: * <p>
15: * There is no default.
16: *
17: * @param newName The name of the player.
18: * @return {@code this}
19: */
20: FGPlayerBuilder changeName(String newName);
21:
22: /**
23: * Changes the possible outcomes of the player.
24: * <p>
25: * There is no default.
26: *
27: * @param possibleOutcomes The possible outcomes of the player. The key for the first-level map is the answer of the
28: * first player, the key for the second-level map is the answer of the second player.
29: */
30: FGPlayerBuilder changePossibleOutcomes(Map<FGActivity, Map<FGActivity, Double>> possibleOutcomes);
31:
32: /**
33: * Builds the player.
34: *
35: * @return The Freizeigestaltung player.
36: * @throws GameException if creating the player is not allowed by the rules of the game.
37: */
38: FGPlayer build() throws GameException;
39: }