Module org.refcodes.checkerboard
Package org.refcodes.checkerboard
Class GridDimensionChangedEvent<P extends Player<P,S>,S>
java.lang.Object
org.refcodes.checkerboard.AbstractCheckerboardEvent<P,S>
org.refcodes.checkerboard.GridDimensionChangedEvent<P,S>
- Type Parameters:
P
- thePlayer
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 Implemented Interfaces:
CheckerboardEvent<P,
,S> org.refcodes.graphical.GridDimension
,org.refcodes.graphical.GridHeightAccessor
,org.refcodes.graphical.GridWidthAccessor
,org.refcodes.mixin.ActionAccessor<CheckerboardAction>
,org.refcodes.mixin.SourceAccessor<Checkerboard<P,
,S>> org.refcodes.observer.ActionEvent<CheckerboardAction,
,Checkerboard<P, S>> org.refcodes.observer.Event<Checkerboard<P,
S>>
public class GridDimensionChangedEvent<P extends Player<P,S>,S>
extends AbstractCheckerboardEvent<P,S>
implements org.refcodes.graphical.GridDimension
The
GridDimensionChangedEvent
event.-
Nested Class Summary
Nested classes/interfaces inherited from class org.refcodes.checkerboard.AbstractCheckerboardEvent
AbstractCheckerboardEvent.AbstractPlayerCheckerboardEvent<P extends Player<P,
S>, S> Nested classes/interfaces inherited from interface org.refcodes.mixin.ActionAccessor
org.refcodes.mixin.ActionAccessor.ActionBuilder<A extends Object,
B extends org.refcodes.mixin.ActionAccessor.ActionBuilder<A, B>>, org.refcodes.mixin.ActionAccessor.ActionMutator<A extends Object>, org.refcodes.mixin.ActionAccessor.ActionProperty<A extends Object> Nested classes/interfaces inherited from interface org.refcodes.graphical.GridDimension
org.refcodes.graphical.GridDimension.GridDimensionAccessor, org.refcodes.graphical.GridDimension.GridDimensionBuilder<B extends org.refcodes.graphical.GridDimension.GridDimensionBuilder<B>>, org.refcodes.graphical.GridDimension.GridDimensionMutator, org.refcodes.graphical.GridDimension.GridDimensionProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.GridHeightAccessor
org.refcodes.graphical.GridHeightAccessor.GridHeightBuilder<B extends org.refcodes.graphical.GridHeightAccessor.GridHeightBuilder<B>>, org.refcodes.graphical.GridHeightAccessor.GridHeightMutator, org.refcodes.graphical.GridHeightAccessor.GridHeightProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.GridWidthAccessor
org.refcodes.graphical.GridWidthAccessor.GridWidthBuilder<B extends org.refcodes.graphical.GridWidthAccessor.GridWidthBuilder<B>>, org.refcodes.graphical.GridWidthAccessor.GridWidthMutator, org.refcodes.graphical.GridWidthAccessor.GridWidthProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.SourceAccessor
org.refcodes.mixin.SourceAccessor.SourceBuilder<SRC extends Object,
B extends org.refcodes.mixin.SourceAccessor.SourceBuilder<SRC, B>>, org.refcodes.mixin.SourceAccessor.SourceMutator<SRC extends Object>, org.refcodes.mixin.SourceAccessor.SourceProperty<SRC extends Object> -
Field Summary
-
Constructor Summary
ConstructorDescriptionGridDimensionChangedEvent
(int aWidth, int aHeight, int aPrecedingWidth, int aPrecedingHeigt, Checkerboard<P, S> aSource) Instantiates a new grid dimension changed event. -
Method Summary
Modifier and TypeMethodDescriptionint
int
org.refcodes.graphical.GridDimension
Gets the preceding grid dimension.toString()
Methods inherited from class org.refcodes.checkerboard.AbstractCheckerboardEvent
getAction, getSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.refcodes.graphical.GridDimension
isInBounds, isInBounds, isInHeight, isInWidth
-
Field Details
-
ACTION
-
-
Constructor Details
-
GridDimensionChangedEvent
public GridDimensionChangedEvent(int aWidth, int aHeight, int aPrecedingWidth, int aPrecedingHeigt, Checkerboard<P, S> aSource) Instantiates a new grid dimension changed event.- Parameters:
aWidth
- the widthaHeight
- the heightaPrecedingWidth
- the preceding widthaPrecedingHeigt
- the preceding heigtaSource
- The according source (origin).
-
-
Method Details
-
getGridHeight
public int getGridHeight()- Specified by:
getGridHeight
in interfaceorg.refcodes.graphical.GridHeightAccessor
-
getGridWidth
public int getGridWidth()- Specified by:
getGridWidth
in interfaceorg.refcodes.graphical.GridWidthAccessor
-
getPrecedingGridDimension
public org.refcodes.graphical.GridDimension getPrecedingGridDimension()Gets the preceding grid dimension.- Returns:
- the preceding grid dimension
-
toString
-