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).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.StateAccessor.StateMutator<S>, org.refcodes.mixin.StateAccessor.StateProperty<S>, org.refcodes.mixin.StateAccessor.StateBuilder<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.Position.PositionBuilder<B extends org.refcodes.graphical.Position.PositionBuilder<B>>, org.refcodes.graphical.Position.PositionMutator, org.refcodes.graphical.Position.PositionProperty, org.refcodes.graphical.Position.PositionPropertyBuilder
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.StateAccessor.StateBuilder<S,B extends org.refcodes.mixin.StateAccessor.StateBuilder<S,B>>, org.refcodes.mixin.StateAccessor.StateMutator<S>, org.refcodes.mixin.StateAccessor.StateProperty<S>
org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B extends org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B>>, org.refcodes.graphical.VisibleAccessor.VisibleMutator, org.refcodes.graphical.VisibleAccessor.VisibleProperty
org.refcodes.graphical.DraggableAccessor.DraggableBuilder<B extends org.refcodes.graphical.DraggableAccessor.DraggableBuilder<B>>, org.refcodes.graphical.DraggableAccessor.DraggableMutator, org.refcodes.graphical.DraggableAccessor.DraggableProperty
Modifier and Type | Method and Description |
---|---|
default void |
blink()
Causes the
Player to blink. |
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.
|
withPosition, withPosition
setPosition, setPosition
hasObserverSubscription, subscribeObserver, unsubscribeObserver
hide, setVisible, show
withHide, withShow, withVisible
default void blink()
Player
to blink.default void moveRight()
default void moveLeft()
default void moveUp()
default void moveDown()
Copyright © 2018. All rights reserved.