P
- the generic typeS
- The state if the player (dead, alive, strong, weak, king, queen,
Pac-Man, ghost, fire, wood, water, strong queen, weak king, etc).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<P>
, 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
Taito<S>
AbstractPlayer
, TaitoImpl
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>
Player
defines an actor (player) on a playground (checkerboard). It
is observable in order to signal observers (checkerboard) on state updates.org.refcodes.graphical.DraggableAccessor.DraggableBuilder<B extends org.refcodes.graphical.DraggableAccessor.DraggableBuilder<B>>, org.refcodes.graphical.DraggableAccessor.DraggableMutator, org.refcodes.graphical.DraggableAccessor.DraggableProperty
org.refcodes.graphical.Position.PositionBuilder<B extends org.refcodes.graphical.Position.PositionBuilder<B>>, org.refcodes.graphical.Position.PositionMutator, org.refcodes.graphical.Position.PositionProperty
org.refcodes.graphical.PosXAccessor.PosXBuilder<B extends org.refcodes.graphical.PosXAccessor.PosXBuilder<B>>, org.refcodes.graphical.PosXAccessor.PosXMutator, org.refcodes.graphical.PosXAccessor.PosXProperty
org.refcodes.graphical.PosYAccessor.PosYBuilder<B extends org.refcodes.graphical.PosYAccessor.PosYBuilder<B>>, org.refcodes.graphical.PosYAccessor.PosYMutator, org.refcodes.graphical.PosYAccessor.PosYProperty
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>
org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B extends org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B>>, org.refcodes.graphical.VisibleAccessor.VisibleMutator, org.refcodes.graphical.VisibleAccessor.VisibleProperty
Modifier and Type | Method | Description |
---|---|---|
default void |
blink() |
Causes the
Player to blink. |
void |
click() |
Selects ("clicks") the player.
|
default void |
moveDown() |
Moves the player one down.
|
default void |
moveLeft() |
Moves the player one to the left.
|
default void |
moveRight() |
Moves the player one to the right.
|
default void |
moveUp() |
Moves the player one up.
|
default PlayerObserver<P,S> |
onChangePosition(ChangePositionObserver<P> aObserver) |
Registers an according observer.
|
default PlayerObserver<P,S> |
onClicked(ClickedObserver<P> aObserver) |
Registers an according observer.
|
default PlayerObserver<P,S> |
onDraggabilityChanged(DraggabilityChangedObserver<P> aObserver) |
Registers an according observer.
|
default PlayerObserver<P,S> |
onPositionChanged(PositionChangedObserver<P> aObserver) |
Registers an according observer.
|
default PlayerObserver<P,S> |
onStateChanged(StateChangedObserver<P,S> aObserver) |
Registers an according observer.
|
default PlayerObserver<P,S> |
onVisibilityChanged(VisibilityChangedObserver<P> aObserver) |
Registers an according observer.
|
withDraggable, withDraggable, withStationary
draggable, setDraggable, stationary
letDraggable
hasObserverSubscription, subscribeObserver, unsubscribeObserver
withPosition, withPosition
setPosition, setPosition
addTo, letPosition, letPosition, subFrom
withHide, withShow, withVisible
default void blink()
Player
to blink.default void moveRight()
default void moveLeft()
default void moveUp()
default void moveDown()
void click()
default PlayerObserver<P,S> onChangePosition(ChangePositionObserver<P> aObserver)
aObserver
- The observer to be registered.PlayerObserver
.default PlayerObserver<P,S> onPositionChanged(PositionChangedObserver<P> aObserver)
aObserver
- The observer to be registered.PlayerObserver
.default PlayerObserver<P,S> onStateChanged(StateChangedObserver<P,S> aObserver)
aObserver
- The observer to be registered.PlayerObserver
.default PlayerObserver<P,S> onVisibilityChanged(VisibilityChangedObserver<P> aObserver)
aObserver
- The observer to be registered.PlayerObserver
.default PlayerObserver<P,S> onDraggabilityChanged(DraggabilityChangedObserver<P> aObserver)
aObserver
- The observer to be registered.PlayerObserver
.default PlayerObserver<P,S> onClicked(ClickedObserver<P> aObserver)
aObserver
- The observer to be registered.PlayerObserver
.Copyright © 2021. All rights reserved.