Skip to content

Package: IHTPlayer

IHTPlayer

Coverage

1: package de.fhdw.gaming.ipspiel23.ht.domain;
2:
3: import java.util.Map;
4: import java.util.Optional;
5:
6: import de.fhdw.gaming.core.domain.Player;
7:
8: /**
9: * Represents a player of the Heads or Tails game.
10: */
11: public interface IHTPlayer extends Player<IHTPlayer> {
12:
13: /**
14: * Returns the possible outcomes of this player. The key for the first-level map is the answer of the first player,
15: * the key for the second-level map is the answer of the second player.
16: */
17: Map<Answer, Map<Answer, Double>> getPossibleOutcomes();
18:
19: /**
20: * Returns the answer of this player.
21: */
22: Optional<Answer> getAnswer();
23:
24: /**
25: * Sets the answer of this player.
26: *
27: * @param newAnswer The answer to set.
28: * @throws IllegalStateException if an answer has already been set.
29: */
30: void setAnswer(Answer newAnswer);
31:
32: @Override
33: IHTPlayer deepCopy();
34: }