Skip to content

Package: VGGameBuilder

VGGameBuilder

Coverage

1: package de.fhdw.gaming.ipspiel22.vierGewinnt.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 Vier gewinnt game.
9: */
10: public interface VGGameBuilder extends GameBuilder {
11: /**
12: * Creates an {@link VGPlayerBuilder} which allows to create and add a player to the game together with her
13: * strategy.
14: */
15: VGPlayerBuilder createPlayerBuilder();
16:
17: /**
18: * Adds a player and her corresponding strategy.
19: *
20: * @param player The player.
21: * @param strategy The player's strategy.
22: * @throws GameException if adding the player is not allowed by the rules of the game.
23: */
24: VGGameBuilder addPlayer(VGPlayer player, VGStrategy strategy) throws GameException;
25:
26: /**
27: * Changes the {@link ObserverFactoryProvider}.
28: *
29: * @param newObserverFactoryProvider The new {@link ObserverFactoryProvider}.
30: * @return {@code this}
31: */
32: VGGameBuilder changeObserverFactoryProvider(ObserverFactoryProvider newObserverFactoryProvider);
33:
34: @Override
35: VGGame build(int id) throws GameException, InterruptedException;
36: }