The game loop has been completely revised to suit the updated Akinator API, and to better fit an OOP model - questions are no longer answered through the Akiwrapper
object, but instead use Question#answer(Answer)
. Guess
has been changed similarly. Additionally, we can no longer request guesses from the API, instead they are returned whenever Akinator is confident enough. Query
, a common parent of Question
and Guess
has been created to fit this model, and user code is meant to switch logic based on its type.
Please consult the example code or the README to find out how the new API is used.
Breaking changes
Akiwrapper#suggestGuess()
,#getGuesses()
, and#getGuessesAboveProbability()
have been removed as the API no longer lets us list guesses on demand.Akiwrapper#answer(Answer)
has been moved toQuestion#answer(Answer)
.Akiwrapper#undoAnswer()
has been moved toQuestion#undoAnswer()
.Akiwrapper#confirmGuess(Guess)
has been moved toGuess#confirm()
.Akiwrapper#rejectLastGuess()
has been moved toGuess#reject()
.Akiwrapper#getStep()
has been moved toQuery#getStep()
.Akiwrapper#getServer()
has been removed.Akiwrapper#getQuestion
has been renamed toAkiwrapper#getCurrentResponse()
.GuessType
has been renamed toTheme
to more accurately reflect its purpose.Language
andTheme
(previouslyGuessType
) enums have been moved toAkiwrapper
.Theme.MOVIE_TV_SHOW
andTheme.PLACE
have been removed removed as no language seems to support them.Server
has been removed. We now interact with<language>.akinator.com
directly, so server URLs are no longer known or needed.ServerNotFoundException
has been renamed toLanguageThemeCombinationException
Status
has been converted to an enum and moved to the.utils.route
package,Status.Level
andStatus.Reason
enums have been removed. Akinator no longer provides a status reason in the"completion"
key, so only the level is know.Guess#isExplicit()
has been removed. Akinator no longer provides the"corrupt"
key, and its purpose was speculation on my part to begin with.Guess#getProbability()
has been removed, as it is no longer known.Guess#getGain()
has been removed as it is no longer known.Identifiable
has been removed, and its functionality moved toGuess
. We can no longer reliably tell aQuestion
's ID, so it only makes sense forGuess
to have it.- The deprecated
AkiwrapperBuilder#DEFAULT_LOCALICATION
has been removed.
Deprecations
Question#getQuestion()
has been deprecated and renamed toQuestion#getText()
.Akiwrapper#isExhausted()
has been deprecated.AkinatorException#getDebugInformation()
has been deprecated and will always return an empty string.
Additions
Query
, a common parent ofQuestion
andGuess
, has been added.Guess#getPseudonym()
has been added.
Other changes
Guess#getDescription()
is now@Nonnull
(was previously@Nullable
).