Skip to content

Package: IC4PlayerBuilder

IC4PlayerBuilder

Coverage

1: package de.fhdw.gaming.ipspiel23.c4.domain;
2:
3: import de.fhdw.gaming.core.domain.GameException;
4:
5: /**
6: * A builder for configuring a connect four player.
7: */
8: public interface IC4PlayerBuilder {
9:
10: /**
11: * specifies the name of the player.
12: *
13: * @param newName the name of the player
14: * @return the same builder instance for fluent configuration
15: */
16: IC4PlayerBuilder changeName(String newName);
17:
18: /**
19: * Builds the player.
20: * @return the player
21: * @throws GameException
22: */
23: IC4Player build() throws GameException;
24:
25: /**
26: * The unique token/ID of this player.
27: * <p>
28: * A player's token is used to identify the player in the game and is used internally
29: * to indicate what player occupies a field on the board.
30: * </p>
31: * The token must be unique among all players in the game and must be greater than 0.
32: */
33: int getToken();
34: }
35: