v1.6
Breaking changes
- Previously deprecated features have been removed
Status#getReason()
has been renamed toStatus#getMessage()
, but keep in mind that a new method with the same name has been addedAkiwrapper#undoAnswer()
now throws aUndoOutOfBoundsException
when undoing the first question (previously it returnednull
)Akiwrapper#answer(Answer)
andAkiwrapper#undoAnswer()
now throw aQuestionsExhaustedException
after questions have been exhausted (previously they returnednull
)ServerUnavailableException
has been removed as it didn't have a consistent meaningStatusException
has been renamed toServerStatusException
MissingQuestionException
has been renamed toQuestionsExhaustedException
Server
can't be manually set inAkiwrapperBuilder
anymore (this is more of a scream test; let me know if you needed that)ServerList
has been removed, lists of servers are now passed around asList<Server>
Deprecations
Akiwrapper#getGuessesAboveProbability(double)
has been deprecated- use
Akiwrapper#suggestGuess()
instead
- use
AkiwrapperBuilder#DEFAULT_LOCALIZATION
has been deprecated- use
AkiwrapperBuilder#DEFAULT_LANGUAGE
instead
- use
Additions
- Added
Akiwrapper#isExhausted()
to check for question exhaustion - Guesses should now be retrieved using
Akiwrapper#suggestGuess()
, which keeps track of rejected guesses and replicates Akinator's behaviour better Akiwrapper#confirmGuess(Guess)
andAkiwrapper#rejectLastGuess()
has been added to signal guess confirmation and rejections to the API- note that calling
#confirmGuess(Guess)
is purely optional but improves Akinator's algorithm
- note that calling
- Added
Status#getReason()
, which returns aReason
enum that should hopefully be less cryptic thanStatus#getMessage()
Fixes
- Answering the last (80th) question no longer throws a
JSONException
, but returnsnull
instead.
Other changes
AkinatorException
is now the superclass of all exceptions (and a subclass ofRuntimeException
)- Javadocs have been improved
Internal changes
Route
has been rewritten from scratch and split into multiple classes, providing more robust access to the API, which should hopefully also make it easier to implement new features and fixesAkinator
now requires a call tostartSession()
, which is done byAkiwrapperBuilder
..core.entities.impl.immutable
has been renamed to..core.entities.impl
- IntegrationTest has been extended to cover question exhaustion
Full Changelog: v1.5.2...v1.6