Skip to content

Package: IHTGameBuilder

IHTGameBuilder

Coverage

1: package de.fhdw.gaming.ipspiel23.ht.domain;
2:
3: import de.fhdw.gaming.core.domain.GameBuilder;
4: import de.fhdw.gaming.core.domain.GameException;
5: import de.fhdw.gaming.ipspiel23.ht.strategy.IHTStrategy;
6:
7: /**
8: * A builder for {@link HTGame}s.
9: */
10: public interface IHTGameBuilder extends GameBuilder {
11:
12: /**
13: * Creates an {@link IHTPlayerBuilder} which allows to create and add a player to the game together with their
14: * strategy.
15: */
16: IHTPlayerBuilder createPlayerBuilder();
17:
18: /**
19: * Adds a player and their 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: IHTGameBuilder addPlayer(IHTPlayer player, IHTStrategy strategy) throws GameException;
26:
27: @Override
28: IHTGame build(int id) throws GameException, InterruptedException;
29: }