Skip to content

v1.6

Compare
Choose a tag to compare
@markozajc markozajc released this 30 Jul 01:18
· 60 commits to master since this release
754f925

Breaking changes

  • Previously deprecated features have been removed
  • Status#getReason() has been renamed to Status#getMessage(), but keep in mind that a new method with the same name has been added
  • Akiwrapper#undoAnswer() now throws a UndoOutOfBoundsException when undoing the first question (previously it returned null)
  • Akiwrapper#answer(Answer) and Akiwrapper#undoAnswer() now throw a QuestionsExhaustedException after questions have been exhausted (previously they returned null)
  • ServerUnavailableException has been removed as it didn't have a consistent meaning
  • StatusException has been renamed to ServerStatusException
  • MissingQuestionException has been renamed to QuestionsExhaustedException
  • Server can't be manually set in AkiwrapperBuilder 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 as List<Server>

Deprecations

  • Akiwrapper#getGuessesAboveProbability(double) has been deprecated
    • use Akiwrapper#suggestGuess() instead
  • AkiwrapperBuilder#DEFAULT_LOCALIZATION has been deprecated
    • use AkiwrapperBuilder#DEFAULT_LANGUAGE instead

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) and Akiwrapper#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
  • Added Status#getReason(), which returns a Reason enum that should hopefully be less cryptic than Status#getMessage()

Fixes

  • Answering the last (80th) question no longer throws a JSONException, but returns null instead.

Other changes

  • AkinatorException is now the superclass of all exceptions (and a subclass of RuntimeException)
  • 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 fixes
  • Akinator now requires a call to startSession(), which is done by AkiwrapperBuilder
  • ..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