Skip to content

Package: MuenzwurfPlayer

MuenzwurfPlayer

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 it under
7: * the terms of the GNU General Public License as published by the Free Software
8: * Foundation, either version 3 of the License, or (at your option) any later
9: * version.
10: *
11: * Othello-core is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14: * details.
15: *
16: * You should have received a copy of the GNU General Public License along with
17: * 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: import java.util.Optional;
23:
24: import de.fhdw.gaming.core.domain.Player;
25:
26: /**
27: * MuenzwurfPlayer.
28: */
29: public interface MuenzwurfPlayer extends Player<MuenzwurfPlayer> {
30: /**
31: * Returns the possible outcomes of this player. The key for the first-level map is the answer of the first player,
32: * the key for the second-level map is the answer of the second player.
33: */
34: Map<MuenzwurfSide, Map<MuenzwurfSide, Double>> getPossibleOutcomes();
35:
36: /**
37: * Returns the side chosen by the player.
38: */
39: Optional<MuenzwurfSide> getSide();
40:
41: /**
42: * Gets pointsForSame.
43: * @return The boolean currently save for pointsForSame.
44: */
45: Boolean getPointsForSame();
46:
47: /**
48: * Sets pointsForSame.
49: * @param toSet The boolean to set pointsForSame to.
50: */
51: void setPointsForSame(Boolean toSet);
52:
53: /**
54: * Sets the answer of this player.
55: *
56: * @param side The side to set. {@code Side.HEADS} means Heads, {@code Side.HEADS} means Tails
57: * @throws IllegalStateException if an answer has already been set.
58: */
59: void chooseSide(MuenzwurfSide side) throws IllegalStateException;
60:
61: @Override
62: MuenzwurfPlayer deepCopy();
63: }