Interface Question

All Superinterfaces:
Query
All Known Implementing Classes:
QuestionImpl

public interface Question extends Query
A type of Query that represents Akinator's question. Questions are answered with answer(Answer) (incrementing the step or undone with undoAnswer() (decrementing the step). Besides the question text, questions also come with an "akitude" picture, a portmanteau of "Akinator" and "attitude", which can be shown to the user.
Note: A single Question object can only be interacted with once. Calling answer(Answer) or undoAnswer() mutates the session state, so you can only call one of them once.
Author:
Marko Zajc
  • Method Summary

    Modifier and Type
    Method
    Description
    This is an interaction method for Question.
    Submits an answer for the question and returns the next Query, incrementing the current step.
    If there are no more questions left, this will return null.
    URL to the akitude image.
    default String
    Deprecated, for removal: This API element is subject to removal in a future version.
    use getText() instead.
    Returns the question text that should be displayed to the user.
    This is an interaction method for Question.
    Goes one question backwards, undoing the previous answer(Answer) call.

    Methods inherited from interface org.eu.zajc.akiwrapper.core.entities.Query

    getAkiwrapper, getProgression, getStep