Interface Query

All Known Subinterfaces:
Guess, Question
All Known Implementing Classes:
AbstractQuery, GuessImpl, QuestionImpl

public interface Query
A common interface for Akinator's queries, which will be either Questions or Guesses.
Note: A single Query object can only be interacted with once. Calling interaction methods mutates the session state, so you can only call one of them once.
Author:
Marko Zajc
  • Method Summary

    Modifier and Type
    Method
    Description
     
    double
    Current completion percentage (as a double).
    int
    Returns the current step (question number).
  • Method Details

    • getAkiwrapper

      @Nonnull Akiwrapper getAkiwrapper()
      Returns:
      the Akiwrapper instance.
    • getStep

      int getStep()
      Returns the current step (question number). This uses zero-based index, meaning the first question will be on step 0. Answering a Question increments the step, and undoing a Question decrements it. Guesses will have the same step as the previous Question, and rejecting them will not increment the step.
      Returns:
      current step.
    • getProgression

      double getProgression()
      Current completion percentage (as a double). A higher value means that Akinator believes it is closer to the correct answer. Guesses will have the same prorgession as the previous Question.
      The value ranges between 0 and 100.
      Returns:
      completion percentage.