Skip to content

Package: IGstKopplungsMiniMaxStrategy

IGstKopplungsMiniMaxStrategy

Coverage

1: package de.fhdw.gaming.ipspiel23.gst.strategies.domain;
2:
3: import java.util.Optional;
4:
5: import de.fhdw.gaming.core.domain.Move;
6: import de.fhdw.gaming.core.domain.Player;
7: import de.fhdw.gaming.core.domain.State;
8: import de.fhdw.gaming.ipspiel23.gst.domain.IKopplung;
9:
10: /**
11: * An interface for implementing a generic mini-max strategy.
12: *
13: * @param <P> The type of player in the game.
14: * @param <S> The type of state in the game.
15: */
16: public interface IGstKopplungsMiniMaxStrategy<P extends Player<P>,
17: S extends State<P, S>> {
18:
19: /**
20: * Calculates the best move for a player in a given state using the mini-max strategy.
21: *
22: * @param kopplung The game object representing the specific game being played.
23: * @param state The current state of the game.
24: * @param maximumComputationTime The maximum computation time allowed for calculating the move.
25: * @return An optional containing the calculated best move, or empty if no move is available.
26: */
27: Optional<Move<P, S>> calculateBestMove(IKopplung<P, S> kopplung, S state,
28: int maximumComputationTime);
29: }