Skip to content

Package: FGPlayer

FGPlayer

Coverage

1: package de.fhdw.gaming.ipspiel24.fg.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 Freizeitgetstaltung player.
10: */
11: public interface FGPlayer extends Player<FGPlayer> {
12: /**
13: * Returns the possible outcomes of this player. The key for the first-level map is the answer of the first player,
14: * the key for the second-level map is the answer of the second player.
15: */
16: Map<FGActivity, Map<FGActivity, Double>> getPossibleOutcomes();
17:
18: /**
19: * Returns the answer of this player.
20: */
21: Optional<FGActivity> getAnswer();
22:
23: /**
24: * Sets the answer of this player.
25: *
26: * @param newAnswer The answer to set. {@code true} means "cinema", {@code false} means "football"
27: * @throws IllegalStateException if an answer has already been set.
28: */
29: void setAnswer(FGActivity newAnswer);
30:
31: @Override
32: FGPlayer deepCopy();
33:
34: }