Skip to content

Package: KopfundZahlundKantePlayerBuilder

KopfundZahlundKantePlayerBuilder

Coverage

1: package de.fhdw.gaming.ipspiel22.kopfundzahlundkante.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 Head and Tail player.
9: */
10: public interface KopfundZahlundKantePlayerBuilder {
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: KopfundZahlundKantePlayerBuilder 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: KopfundZahlundKantePlayerBuilder changePossibleOutcomes(Map<KopfundZahlundKanteAnswerEnum,
31: Map<KopfundZahlundKanteAnswerEnum,
32: Double>> possibleOutcomes);
33:
34: /**
35: * Builds the player.
36: *
37: * @return The KopfundZahlundKantePlayer player.
38: * @throws GameException if creating the player is not allowed by the rules of the game.
39: */
40: KopfundZahlundKantePlayer build() throws GameException;
41: }