Class NullDraftBehaviour

java.lang.Object
com.hiddenswitch.spellsource.draft.NullDraftBehaviour
All Implemented Interfaces:
DraftBehaviour

public class NullDraftBehaviour extends Object implements DraftBehaviour
A behaviour which makes no choices, so its reply handlers are never called.
  • Constructor Details

    • NullDraftBehaviour

      public NullDraftBehaviour()
  • Method Details

    • chooseHeroAsync

      public void chooseHeroAsync(List<String> classes, io.vertx.core.Handler<io.vertx.core.AsyncResult<String>> result)
      Description copied from interface: DraftBehaviour
      Given a list of champions, which champion will this draft be?
      Specified by:
      chooseHeroAsync in interface DraftBehaviour
      Parameters:
      classes - Some number of champions.
      result - Called with the chosen champion.
    • chooseCardAsync

      public void chooseCardAsync(List<String> cards, io.vertx.core.Handler<io.vertx.core.AsyncResult<Integer>> selectedCardIndex)
      Description copied from interface: DraftBehaviour
      Given a list of cards, choose one card. This card is typically added to the deck.
      Specified by:
      chooseCardAsync in interface DraftBehaviour
      Parameters:
      cards - A list of choices currently.
      selectedCardIndex - Called with the index of the choice.
    • notifyDraftState

      public void notifyDraftState(PublicDraftState state)
      Description copied from interface: DraftBehaviour
      Notifies the behaviour of the current public draft state as soon as it changes.
      Specified by:
      notifyDraftState in interface DraftBehaviour
      Parameters:
      state - The state
    • notifyDraftStateAsync

      public void notifyDraftStateAsync(PublicDraftState state, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> acknowledged)
      Description copied from interface: DraftBehaviour
      Notifies the behaviour of the current public draft state as soon as it changes, and receives a callback when the client has acknowledged receipt of the data.
      Specified by:
      notifyDraftStateAsync in interface DraftBehaviour
      Parameters:
      state - The state
      acknowledged - Called when the state was received (written to the network socket in practice).