Interface Player<P extends Player<P,S>,S>

Type Parameters:
P - the Player generic type.
S - The state of the player (dead, alive, strong, weak, king, queen, Pac-Man, ghost, fire, wood, water, strong queen, weak king, etc).
All Superinterfaces:
org.refcodes.graphical.DraggableAccessor, org.refcodes.graphical.DraggableAccessor.DraggableBuilder<P>, org.refcodes.graphical.DraggableAccessor.DraggableMutator, org.refcodes.graphical.DraggableAccessor.DraggableProperty, org.refcodes.observer.Observable<PlayerObserver<P,S>>, org.refcodes.graphical.Position, org.refcodes.graphical.Position.PositionBuilder<P>, org.refcodes.graphical.Position.PositionMutator, org.refcodes.graphical.Position.PositionProperty, org.refcodes.graphical.PosXAccessor, org.refcodes.graphical.PosXAccessor.PosXBuilder<P>, org.refcodes.graphical.PosXAccessor.PosXMutator, org.refcodes.graphical.PosXAccessor.PosXProperty, org.refcodes.graphical.PosYAccessor, org.refcodes.graphical.PosYAccessor.PosYBuilder<P>, org.refcodes.graphical.PosYAccessor.PosYMutator, org.refcodes.graphical.PosYAccessor.PosYProperty, org.refcodes.mixin.StatusAccessor<S>, org.refcodes.mixin.StatusAccessor.StatusBuilder<S,P>, org.refcodes.mixin.StatusAccessor.StatusMutator<S>, org.refcodes.mixin.StatusAccessor.StatusProperty<S>, org.refcodes.graphical.VisibleAccessor, org.refcodes.graphical.VisibleAccessor.VisibleBuilder<P>, org.refcodes.graphical.VisibleAccessor.VisibleMutator, org.refcodes.graphical.VisibleAccessor.VisibleProperty
All Known Implementing Classes:
AbstractPlayer, Meeple

public interface Player<P extends Player<P,S>,S> extends org.refcodes.graphical.Position.PositionProperty, org.refcodes.graphical.Position.PositionBuilder<P>, org.refcodes.observer.Observable<PlayerObserver<P,S>>, org.refcodes.mixin.StatusAccessor.StatusMutator<S>, org.refcodes.mixin.StatusAccessor.StatusProperty<S>, org.refcodes.mixin.StatusAccessor.StatusBuilder<S,P>, org.refcodes.graphical.VisibleAccessor.VisibleProperty, org.refcodes.graphical.VisibleAccessor.VisibleBuilder<P>, org.refcodes.graphical.DraggableAccessor.DraggableProperty, org.refcodes.graphical.DraggableAccessor.DraggableBuilder<P>
A Player defines an actor (player) on a playground (checkerboard). It is observable in order to signal observers (checkerboard) on state updates.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.graphical.DraggableAccessor

    org.refcodes.graphical.DraggableAccessor.DraggableBuilder<B extends org.refcodes.graphical.DraggableAccessor.DraggableBuilder<B>>, org.refcodes.graphical.DraggableAccessor.DraggableMutator, org.refcodes.graphical.DraggableAccessor.DraggableProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.Position

    org.refcodes.graphical.Position.PositionBuilder<B extends org.refcodes.graphical.Position.PositionBuilder<B>>, org.refcodes.graphical.Position.PositionMutator, org.refcodes.graphical.Position.PositionProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.PosXAccessor

    org.refcodes.graphical.PosXAccessor.PosXBuilder<B extends org.refcodes.graphical.PosXAccessor.PosXBuilder<B>>, org.refcodes.graphical.PosXAccessor.PosXMutator, org.refcodes.graphical.PosXAccessor.PosXProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.PosYAccessor

    org.refcodes.graphical.PosYAccessor.PosYBuilder<B extends org.refcodes.graphical.PosYAccessor.PosYBuilder<B>>, org.refcodes.graphical.PosYAccessor.PosYMutator, org.refcodes.graphical.PosYAccessor.PosYProperty

    Nested classes/interfaces inherited from interface org.refcodes.mixin.StatusAccessor

    org.refcodes.mixin.StatusAccessor.StatusBuilder<S extends Object,B extends org.refcodes.mixin.StatusAccessor.StatusBuilder<S,B>>, org.refcodes.mixin.StatusAccessor.StatusMutator<S extends Object>, org.refcodes.mixin.StatusAccessor.StatusProperty<S extends Object>

    Nested classes/interfaces inherited from interface org.refcodes.graphical.VisibleAccessor

    org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B extends org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B>>, org.refcodes.graphical.VisibleAccessor.VisibleMutator, org.refcodes.graphical.VisibleAccessor.VisibleProperty
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Causes the Player to blink.
    void
    Selects ("clicks") the player.
    default void
    Moves the player one down.
    default void
    Moves the player one to the left.
    default void
    Moves the player one to the right.
    default void
    Moves the player one up.
    default PlayerObserver<P,S>
    Registers an according observer.
    default PlayerObserver<P,S>
    Registers an according observer.
    default PlayerObserver<P,S>
    Registers an according observer.
    default PlayerObserver<P,S>
    Registers an according observer.
    default PlayerObserver<P,S>
    Registers an according observer.
    default PlayerObserver<P,S>
    Registers an according observer.

    Methods inherited from interface org.refcodes.graphical.DraggableAccessor

    isDraggable

    Methods inherited from interface org.refcodes.graphical.DraggableAccessor.DraggableBuilder

    withDraggable, withDraggable, withStationary

    Methods inherited from interface org.refcodes.graphical.DraggableAccessor.DraggableMutator

    draggable, setDraggable, stationary

    Methods inherited from interface org.refcodes.graphical.DraggableAccessor.DraggableProperty

    letDraggable

    Methods inherited from interface org.refcodes.observer.Observable

    hasObserverSubscription, subscribeObserver, unsubscribeObserver

    Methods inherited from interface org.refcodes.graphical.Position

    toAddTo, toSubFrom

    Methods inherited from interface org.refcodes.graphical.Position.PositionBuilder

    withPosition, withPosition

    Methods inherited from interface org.refcodes.graphical.Position.PositionMutator

    setPosition, setPosition

    Methods inherited from interface org.refcodes.graphical.Position.PositionProperty

    addTo, letPosition, letPosition, subFrom

    Methods inherited from interface org.refcodes.graphical.PosXAccessor

    getPositionX

    Methods inherited from interface org.refcodes.graphical.PosXAccessor.PosXBuilder

    withPositionX

    Methods inherited from interface org.refcodes.graphical.PosXAccessor.PosXMutator

    setPositionX

    Methods inherited from interface org.refcodes.graphical.PosXAccessor.PosXProperty

    letPositionX

    Methods inherited from interface org.refcodes.graphical.PosYAccessor

    getPositionY

    Methods inherited from interface org.refcodes.graphical.PosYAccessor.PosYBuilder

    withPositionY

    Methods inherited from interface org.refcodes.graphical.PosYAccessor.PosYMutator

    setPositionY

    Methods inherited from interface org.refcodes.graphical.PosYAccessor.PosYProperty

    letPositionY

    Methods inherited from interface org.refcodes.mixin.StatusAccessor

    getStatus

    Methods inherited from interface org.refcodes.mixin.StatusAccessor.StatusBuilder

    withStatus

    Methods inherited from interface org.refcodes.mixin.StatusAccessor.StatusMutator

    setStatus

    Methods inherited from interface org.refcodes.mixin.StatusAccessor.StatusProperty

    letStatus

    Methods inherited from interface org.refcodes.graphical.VisibleAccessor

    isVisible

    Methods inherited from interface org.refcodes.graphical.VisibleAccessor.VisibleBuilder

    withHide, withShow, withVisible

    Methods inherited from interface org.refcodes.graphical.VisibleAccessor.VisibleMutator

    hide, setVisible, show

    Methods inherited from interface org.refcodes.graphical.VisibleAccessor.VisibleProperty

    letVisible
  • Method Details

    • blink

      default void blink()
      Causes the Player to blink.
    • moveRight

      default void moveRight()
      Moves the player one to the right.
    • moveLeft

      default void moveLeft()
      Moves the player one to the left.
    • moveUp

      default void moveUp()
      Moves the player one up.
    • moveDown

      default void moveDown()
      Moves the player one down.
    • click

      void click()
      Selects ("clicks") the player.
    • onChangePosition

      default PlayerObserver<P,S> onChangePosition(ChangePlayerPositionObserver<P> aObserver)
      Registers an according observer. For unregistering, use the returned handle.
      Parameters:
      aObserver - The observer to be registered.
      Returns:
      The accordingly registered PlayerObserver.
    • onPositionChanged

      default PlayerObserver<P,S> onPositionChanged(PlayerPositionChangedObserver<P> aObserver)
      Registers an according observer. For unregistering, use the returned handle.
      Parameters:
      aObserver - The observer to be registered.
      Returns:
      The accordingly registered PlayerObserver.
    • onStateChanged

      default PlayerObserver<P,S> onStateChanged(PlayerStateChangedObserver<P,S> aObserver)
      Registers an according observer. For unregistering, use the returned handle.
      Parameters:
      aObserver - The observer to be registered.
      Returns:
      The accordingly registered PlayerObserver.
    • onVisibilityChanged

      default PlayerObserver<P,S> onVisibilityChanged(PlayerVisibilityChangedObserver<P> aObserver)
      Registers an according observer. For unregistering, use the returned handle.
      Parameters:
      aObserver - The observer to be registered.
      Returns:
      The accordingly registered PlayerObserver.
    • onDraggabilityChanged

      default PlayerObserver<P,S> onDraggabilityChanged(PlayerDraggabilityChangedObserver<P> aObserver)
      Registers an according observer. For unregistering, use the returned handle.
      Parameters:
      aObserver - The observer to be registered.
      Returns:
      The accordingly registered PlayerObserver.
    • onClicked

      default PlayerObserver<P,S> onClicked(PlayerClickedObserver<P> aObserver)
      Registers an according observer. For unregistering, use the returned handle.
      Parameters:
      aObserver - The observer to be registered.
      Returns:
      The accordingly registered PlayerObserver.