Skip to content

Package: SSPGameBuilder

SSPGameBuilder

Coverage

1: package de.schereSteinPapier.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 Demo game.
9: */
10: public interface SSPGameBuilder extends GameBuilder {
11:
12: /**
13: * Creates an {@link SSPPlayerBuilder} which allows to create and add a player to the game together with her
14: * strategy.
15: */
16: SSPPlayerBuilder createPlayerBuilder();
17:
18: /**
19: * Adds a player and the 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: SSPGameBuilder addPlayer(SSPPlayer player, SSPStrategy strategy) throws GameException;
26:
27: /**
28: * Changes the {@link ObserverFactoryProvider}.
29: *
30: * @param newObserverFactoryProvider The new {@link ObserverFactoryProvider}.
31: * @return {@code this}
32: */
33: SSPGameBuilder changeObserverFactoryProvider(ObserverFactoryProvider newObserverFactoryProvider);
34:
35: @Override
36: SSPGame build(int id) throws GameException, InterruptedException;
37:
38: }