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 aUndoOutOfBoundsExceptionwhen undoing the first question (previously it returnednull)Akiwrapper#answer(Answer)andAkiwrapper#undoAnswer()now throw aQuestionsExhaustedExceptionafter questions have been exhausted (previously they returnednull)ServerUnavailableExceptionhas been removed as it didn't have a consistent meaningStatusExceptionhas been renamed toServerStatusExceptionMissingQuestionExceptionhas been renamed toQuestionsExhaustedExceptionServercan't be manually set inAkiwrapperBuilderanymore (this is more of a scream test; let me know if you needed that)ServerListhas 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_LOCALIZATIONhas been deprecated- use
AkiwrapperBuilder#DEFAULT_LANGUAGEinstead
- 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 aReasonenum that should hopefully be less cryptic thanStatus#getMessage()
Fixes
- Answering the last (80th) question no longer throws a
JSONException, but returnsnullinstead.
Other changes
AkinatorExceptionis now the superclass of all exceptions (and a subclass ofRuntimeException)- Javadocs have been improved
Internal changes
Routehas 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 fixesAkinatornow requires a call tostartSession(), which is done byAkiwrapperBuilder..core.entities.impl.immutablehas been renamed to..core.entities.impl- IntegrationTest has been extended to cover question exhaustion
Full Changelog: v1.5.2...v1.6