Interface IPuzzleService

  • All Known Implementing Classes:
    PuzzleService

    public interface IPuzzleService
    Operations provided by the puzzle agent.
    • Method Detail

      • hint

        IFuture<Move> hint​(Board board,
                           long timeout)
        Solve the game and give a hint on the next move.
        Parameters:
        board - The current board state.
        timeout - A timeout to stop, when no solution is found in time (-1 for no timeout).
        Returns:
        The tile to move next.
        Throws:
        java.lang.Exception - in future, when puzzle can not be solved in time.
      • addHighscore

        IFuture<java.lang.Void> addHighscore​(HighscoreEntry entry)
        Add a highscore entry and save the highscore list.
        Parameters:
        entry - The highscore entry.
      • getHighscore

        IFuture<java.util.SortedSet<HighscoreEntry>> getHighscore​(int size)
        Get the highscore entries for a given board size.
        Parameters:
        size - The board size (e.g. 3, 5, ...).
        Returns:
        The sorted set of highscore entries (highest entry first).