public class CheckerboardImpl<S> extends org.refcodes.observer.impls.AbstractObservable<CheckerboardObserver<S>,org.refcodes.observer.Event<?>> implements Checkerboard<S>
org.refcodes.graphical.GridDimension.GridDimensionBuilder<B extends org.refcodes.graphical.GridDimension.GridDimensionBuilder<B>>, org.refcodes.graphical.GridDimension.GridDimensionMutator, org.refcodes.graphical.GridDimension.GridDimensionProperty, org.refcodes.graphical.GridDimension.GridDimensionPropertyBuilderorg.refcodes.graphical.GridWidthAccessor.GridWidthBuilder<B extends org.refcodes.graphical.GridWidthAccessor.GridWidthBuilder<B>>, org.refcodes.graphical.GridWidthAccessor.GridWidthMutator, org.refcodes.graphical.GridWidthAccessor.GridWidthPropertyorg.refcodes.graphical.GridHeightAccessor.GridHeightBuilder<B extends org.refcodes.graphical.GridHeightAccessor.GridHeightBuilder<B>>, org.refcodes.graphical.GridHeightAccessor.GridHeightMutator, org.refcodes.graphical.GridHeightAccessor.GridHeightPropertyorg.refcodes.graphical.GridModeAccessor.GridModeBuilder<B extends org.refcodes.graphical.GridModeAccessor.GridModeBuilder<B>>, org.refcodes.graphical.GridModeAccessor.GridModeMutator, org.refcodes.graphical.GridModeAccessor.GridModeProperty| Constructor and Description |
|---|
CheckerboardImpl() |
| Modifier and Type | Method and Description |
|---|---|
Player<S> |
atBottomLeftOf(org.refcodes.graphical.Position aPos) |
Player<S> |
atBottomOf(org.refcodes.graphical.Position aPos) |
Player<S> |
atBottomRightOf(org.refcodes.graphical.Position aPos) |
Player<S> |
atLeftOf(org.refcodes.graphical.Position aPos) |
Player<S> |
atPosition(int aPosX,
int aPosY) |
Player<S> |
atPosition(org.refcodes.graphical.Position aPos) |
Player<S> |
atRightOf(org.refcodes.graphical.Position aPos) |
Player<S> |
atTopLeftOf(org.refcodes.graphical.Position aPos) |
Player<S> |
atTopOf(org.refcodes.graphical.Position aPos) |
Player<S> |
atTopRightOf(org.refcodes.graphical.Position aPos) |
void |
clearPlayers() |
void |
destroy() |
protected boolean |
fireEvent(org.refcodes.observer.Event<?> aEvent,
CheckerboardObserver<S> aObserver,
org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) |
Map<Integer,Player<S>> |
getColumn(int aColumn) |
int |
getGridHeight() |
org.refcodes.graphical.GridMode |
getGridMode() |
int |
getGridWidth() |
List<Player<S>> |
getPlayers() |
Map<Integer,Player<S>> |
getRow(int aRow) |
boolean |
hasAtBottomLeftOf(org.refcodes.graphical.Position aPos) |
boolean |
hasAtBottomOf(org.refcodes.graphical.Position aPos) |
boolean |
hasAtBottomRightOf(org.refcodes.graphical.Position aPos) |
boolean |
hasAtLeftOf(org.refcodes.graphical.Position aPos) |
boolean |
hasAtPosition(int aPosX,
int aPosY) |
boolean |
hasAtPosition(org.refcodes.graphical.Position aPos) |
boolean |
hasAtRightOf(org.refcodes.graphical.Position aPos) |
boolean |
hasAtTopLeftOf(org.refcodes.graphical.Position aPos) |
boolean |
hasAtTopOf(org.refcodes.graphical.Position aPos) |
boolean |
hasAtTopRightOf(org.refcodes.graphical.Position aPos) |
boolean |
hasPlayer(Player<S> aPlayer) |
boolean |
hasPlayers() |
int |
playerCount() |
Iterator<Player<S>> |
players() |
Player<S> |
putPlayer(Player<S> aPlayer) |
boolean |
removePlayer(Player<S> aPlayer) |
void |
setGridDimension(org.refcodes.graphical.Dimension aDimension) |
void |
setGridDimension(org.refcodes.graphical.GridDimension aDimension) |
void |
setGridDimension(int aWidth,
int aHeight) |
void |
setGridHeight(int aHeight) |
void |
setGridMode(org.refcodes.graphical.GridMode aGridMode) |
void |
setGridWidth(int aWidth) |
boolean |
subscribeObserver(CheckerboardObserver<S> aObserver) |
boolean |
unsubscribeObserver(CheckerboardObserver<S> aObserver) |
Checkerboard<S> |
withGridDimension(org.refcodes.graphical.Dimension aDimension) |
Checkerboard<S> |
withGridDimension(org.refcodes.graphical.GridDimension aDimension) |
Checkerboard<S> |
withGridDimension(int aGridWidth,
int aGridHeight) |
Checkerboard<S> |
withGridHeight(int aHeight) |
Checkerboard<S> |
withGridMode(org.refcodes.graphical.GridMode aGridMode) |
Checkerboard<S> |
withGridWidth(int aWidth) |
clear, dispose, doHandleEventListenerException, fireEvent, getThreadPriority, hasObserverSubscription, isEmpty, setThreadPriority, sizepublic Checkerboard<S> withGridMode(org.refcodes.graphical.GridMode aGridMode)
withGridMode in interface org.refcodes.graphical.GridModeAccessor.GridModeBuilder<Checkerboard<S>>public Checkerboard<S> withGridDimension(int aGridWidth, int aGridHeight)
withGridDimension in interface org.refcodes.graphical.GridDimension.GridDimensionBuilder<Checkerboard<S>>public Checkerboard<S> withGridDimension(org.refcodes.graphical.GridDimension aDimension)
withGridDimension in interface org.refcodes.graphical.GridDimension.GridDimensionBuilder<Checkerboard<S>>public Checkerboard<S> withGridDimension(org.refcodes.graphical.Dimension aDimension)
withGridDimension in interface org.refcodes.graphical.GridDimension.GridDimensionBuilder<Checkerboard<S>>public Checkerboard<S> withGridWidth(int aWidth)
withGridWidth in interface org.refcodes.graphical.GridWidthAccessor.GridWidthBuilder<Checkerboard<S>>public Checkerboard<S> withGridHeight(int aHeight)
withGridHeight in interface org.refcodes.graphical.GridHeightAccessor.GridHeightBuilder<Checkerboard<S>>public boolean hasAtPosition(org.refcodes.graphical.Position aPos)
throws IndexOutOfBoundsException
hasAtPosition in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic boolean hasAtPosition(int aPosX,
int aPosY)
throws IndexOutOfBoundsException
hasAtPosition in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atPosition(org.refcodes.graphical.Position aPos) throws IndexOutOfBoundsException
atPosition in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atPosition(int aPosX, int aPosY) throws IndexOutOfBoundsException
atPosition in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic boolean hasAtTopOf(org.refcodes.graphical.Position aPos)
throws IndexOutOfBoundsException
hasAtTopOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atTopOf(org.refcodes.graphical.Position aPos) throws IndexOutOfBoundsException
atTopOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic boolean hasAtTopRightOf(org.refcodes.graphical.Position aPos)
throws IndexOutOfBoundsException
hasAtTopRightOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atTopRightOf(org.refcodes.graphical.Position aPos) throws IndexOutOfBoundsException
atTopRightOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic boolean hasAtRightOf(org.refcodes.graphical.Position aPos)
throws IndexOutOfBoundsException
hasAtRightOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atRightOf(org.refcodes.graphical.Position aPos) throws IndexOutOfBoundsException
atRightOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic boolean hasAtBottomRightOf(org.refcodes.graphical.Position aPos)
throws IndexOutOfBoundsException
hasAtBottomRightOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atBottomRightOf(org.refcodes.graphical.Position aPos) throws IndexOutOfBoundsException
atBottomRightOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic boolean hasAtBottomOf(org.refcodes.graphical.Position aPos)
throws IndexOutOfBoundsException
hasAtBottomOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atBottomOf(org.refcodes.graphical.Position aPos) throws IndexOutOfBoundsException
atBottomOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic boolean hasAtBottomLeftOf(org.refcodes.graphical.Position aPos)
throws IndexOutOfBoundsException
hasAtBottomLeftOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atBottomLeftOf(org.refcodes.graphical.Position aPos) throws IndexOutOfBoundsException
atBottomLeftOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic boolean hasAtLeftOf(org.refcodes.graphical.Position aPos)
throws IndexOutOfBoundsException
hasAtLeftOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atLeftOf(org.refcodes.graphical.Position aPos) throws IndexOutOfBoundsException
atLeftOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic boolean hasAtTopLeftOf(org.refcodes.graphical.Position aPos)
throws IndexOutOfBoundsException
hasAtTopLeftOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Player<S> atTopLeftOf(org.refcodes.graphical.Position aPos) throws IndexOutOfBoundsException
atTopLeftOf in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Map<Integer,Player<S>> getRow(int aRow) throws IndexOutOfBoundsException
getRow in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic Map<Integer,Player<S>> getColumn(int aColumn) throws IndexOutOfBoundsException
getColumn in interface Checkerboard<S>IndexOutOfBoundsExceptionpublic org.refcodes.graphical.GridMode getGridMode()
getGridMode in interface org.refcodes.graphical.GridModeAccessorpublic void setGridMode(org.refcodes.graphical.GridMode aGridMode)
setGridMode in interface org.refcodes.graphical.GridModeAccessor.GridModeMutatorpublic boolean removePlayer(Player<S> aPlayer)
removePlayer in interface Players<S>public void clearPlayers()
clearPlayers in interface Players<S>public int playerCount()
playerCount in interface Players<S>public boolean hasPlayers()
hasPlayers in interface Players<S>public int getGridWidth()
getGridWidth in interface org.refcodes.graphical.GridWidthAccessorpublic void setGridDimension(int aWidth,
int aHeight)
setGridDimension in interface org.refcodes.graphical.GridDimension.GridDimensionMutatorpublic void setGridDimension(org.refcodes.graphical.GridDimension aDimension)
setGridDimension in interface org.refcodes.graphical.GridDimension.GridDimensionMutatorpublic void setGridDimension(org.refcodes.graphical.Dimension aDimension)
setGridDimension in interface org.refcodes.graphical.GridDimension.GridDimensionMutatorpublic void setGridWidth(int aWidth)
setGridWidth in interface org.refcodes.graphical.GridWidthAccessor.GridWidthMutatorpublic void setGridHeight(int aHeight)
setGridHeight in interface org.refcodes.graphical.GridHeightAccessor.GridHeightMutatorpublic int getGridHeight()
getGridHeight in interface org.refcodes.graphical.GridHeightAccessorpublic boolean subscribeObserver(CheckerboardObserver<S> aObserver)
subscribeObserver in interface org.refcodes.observer.Observable<CheckerboardObserver<S>>subscribeObserver in class org.refcodes.observer.impls.AbstractObservable<CheckerboardObserver<S>,org.refcodes.observer.Event<?>>public boolean unsubscribeObserver(CheckerboardObserver<S> aObserver)
unsubscribeObserver in interface org.refcodes.observer.Observable<CheckerboardObserver<S>>unsubscribeObserver in class org.refcodes.observer.impls.AbstractObservable<CheckerboardObserver<S>,org.refcodes.observer.Event<?>>public void destroy()
destroy in interface org.refcodes.component.Destroyableprotected boolean fireEvent(org.refcodes.observer.Event<?> aEvent,
CheckerboardObserver<S> aObserver,
org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
throws org.refcodes.exception.VetoException
fireEvent in class org.refcodes.observer.impls.AbstractObservable<CheckerboardObserver<S>,org.refcodes.observer.Event<?>>org.refcodes.exception.VetoExceptionCopyright © 2016. All rights reserved.