Interface Query
- All Known Implementing Classes:
AbstractQuery,GuessImpl,QuestionImpl
public interface Query
A common interface for Akinator's queries, which will be either
Note: A single
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 TypeMethodDescriptiondoubleCurrent completion percentage (as a double).intgetStep()Returns the current step (question number).
-
Method Details
-
getAkiwrapper
- Returns:
- the
Akiwrapperinstance.
-
getStep
int getStep()Returns the current step (question number). This uses zero-based index, meaning the first question will be on step0. Answering aQuestionincrements the step, and undoing aQuestiondecrements it.Guesses will have the samestepas the previousQuestion, 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 sameprorgessionas the previousQuestion.
The value ranges between 0 and 100.- Returns:
- completion percentage.
-