Skip to content

Package: MuenzwurfPlayerBuilder

MuenzwurfPlayerBuilder

Coverage

1: /*
2: * Copyright © 2020-2023 Fachhochschule für die Wirtschaft (FHDW) Hannover
3: *
4: * This file is part of othello-core.
5: *
6: * Othello-core is free software: you can redistribute it and/or modify
7: * it under the terms of the GNU General Public License as published by
8: * the Free Software Foundation, either version 3 of the License, or
9: * (at your option) any later version.
10: *
11: * Othello-core is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with othello-core. If not, see <http://www.gnu.org/licenses/>.
18: */
19: package de.fhdw.gaming.ipspiel24.muenzwurf.core.domain;
20:
21: import java.util.Map;
22:
23: import de.fhdw.gaming.core.domain.GameException;
24:
25: /**
26: * A builder which allows to create a Demo player.
27: */
28: public interface MuenzwurfPlayerBuilder {
29:
30: /**
31: * Changes the name of the player.
32: * <p>
33: * There is no default.
34: *
35: * @param newName The name of the player.
36: * @return {@code this}
37: */
38: MuenzwurfPlayerBuilder changeName(String newName);
39:
40: /**
41: * Builds the player.
42: *
43: * @return The Muenzwurf player.
44: * @throws GameException if creating the player is not allowed by the rules of the game.
45: */
46: MuenzwurfPlayer build() throws GameException;
47:
48: /**
49: * Changes the possible outcome.
50: *
51: * @param newPossibleOutcomes The new outcome.
52: * @throws GameException if creating the player is not allowed by the rules of the game.
53: */
54: MuenzwurfPlayerBuilder changePossibleOutcomes(Map<MuenzwurfSide,
55: Map<MuenzwurfSide, Double>>newPossibleOutcomes);
56: }