Skip to content

Package: KopfundZahlundKanteGameBuilder

KopfundZahlundKanteGameBuilder

Coverage

1: package de.fhdw.gaming.ipspiel22.kopfundzahlundkante.domain;
2:
3: import de.fhdw.gaming.core.domain.GameBuilder;
4: import de.fhdw.gaming.core.domain.GameException;
5: import de.fhdw.gaming.core.domain.ObserverFactoryProvider;
6:
7: /**
8: * A builder which allows to create a Head and Tail game.
9: */
10: public interface KopfundZahlundKanteGameBuilder extends GameBuilder {
11:
12: /**
13: * Creates an {@link KopfundZahlundKantePlayerBuilder} which allows to create and add a player
14: * to the game together with their strategy.
15: */
16: KopfundZahlundKantePlayerBuilder createPlayerBuilder();
17:
18: /**
19: * Adds a player and her corresponding strategy.
20: *
21: * @param player The player.
22: * @param strategy The player's strategy.
23: * @throws GameException if adding the player is not allowed by the rules of the game.
24: */
25: KopfundZahlundKanteGameBuilder addPlayer(KopfundZahlundKantePlayer player, KopfundZahlundKanteStrategy strategy)
26: throws GameException;
27:
28: /**
29: * Changes the {@link ObserverFactoryProvider}.
30: *
31: * @param newObserverFactoryProvider The new {@link ObserverFactoryProvider}.
32: * @return {@code this}
33: */
34:
35: KopfundZahlundKanteGameBuilder changeObserverFactoryProvider(ObserverFactoryProvider newObserverFactoryProvider);
36:
37: @Override
38: KopfundZahlundKanteGame build(int id) throws GameException, InterruptedException;
39: }