Module org.refcodes.checkerboard
Package org.refcodes.checkerboard
Interface Checkerboard<P extends Player<P,S>,S>
- Type Parameters:
P
- the generic typeS
- the generic type
- All Superinterfaces:
org.refcodes.component.Component
,org.refcodes.component.Destroyable
,org.refcodes.graphical.GridDimension
,org.refcodes.graphical.GridDimension.GridDimensionAccessor
,org.refcodes.graphical.GridDimension.GridDimensionBuilder<Checkerboard<P,
,S>> org.refcodes.graphical.GridDimension.GridDimensionMutator
,org.refcodes.graphical.GridDimension.GridDimensionProperty
,org.refcodes.graphical.GridHeightAccessor
,org.refcodes.graphical.GridHeightAccessor.GridHeightBuilder<Checkerboard<P,
,S>> org.refcodes.graphical.GridHeightAccessor.GridHeightMutator
,org.refcodes.graphical.GridHeightAccessor.GridHeightProperty
,org.refcodes.graphical.GridModeAccessor
,org.refcodes.graphical.GridModeAccessor.GridModeBuilder<Checkerboard<P,
,S>> org.refcodes.graphical.GridModeAccessor.GridModeMutator
,org.refcodes.graphical.GridModeAccessor.GridModeProperty
,org.refcodes.graphical.GridWidthAccessor
,org.refcodes.graphical.GridWidthAccessor.GridWidthBuilder<Checkerboard<P,
,S>> org.refcodes.graphical.GridWidthAccessor.GridWidthMutator
,org.refcodes.graphical.GridWidthAccessor.GridWidthProperty
,org.refcodes.observer.Observable<CheckerboardObserver<P,
,S>> Players<P>
- All Known Implementing Classes:
AbstractCheckerboard
public interface Checkerboard<P extends Player<P,S>,S>
extends Players<P>, org.refcodes.observer.Observable<CheckerboardObserver<P,S>>, org.refcodes.graphical.GridDimension.GridDimensionProperty, org.refcodes.graphical.GridDimension.GridDimensionBuilder<Checkerboard<P,S>>, org.refcodes.graphical.GridModeAccessor.GridModeProperty, org.refcodes.graphical.GridModeAccessor.GridModeBuilder<Checkerboard<P,S>>, org.refcodes.component.Component
The Interface Checkerboard.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable
org.refcodes.component.Destroyable.DestroyAutomaton
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.GridModeAccessor
org.refcodes.graphical.GridModeAccessor.GridModeBuilder<B extends org.refcodes.graphical.GridModeAccessor.GridModeBuilder<B>>, org.refcodes.graphical.GridModeAccessor.GridModeMutator, org.refcodes.graphical.GridModeAccessor.GridModeProperty
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
-
Method Summary
Modifier and TypeMethodDescriptionatBottomLeftOf
(org.refcodes.graphical.Position aPos) At bottom left of.atBottomOf
(org.refcodes.graphical.Position aPos) At bottom of.atBottomRightOf
(org.refcodes.graphical.Position aPos) At bottom right of.atLeftOf
(org.refcodes.graphical.Position aPos) At left of.atPosition
(int aPosX, int aPosY) At position.atPosition
(org.refcodes.graphical.Position aPos) At position.atRightOf
(org.refcodes.graphical.Position aPos) At right of.atTopLeftOf
(org.refcodes.graphical.Position aPos) At top left of.atTopOf
(org.refcodes.graphical.Position aPos) At top of.atTopRightOf
(org.refcodes.graphical.Position aPos) At top right of.void
Performs the given action for eachPlayer
on theCheckerboard
until all players have been processed or the action throws an exception.getColumn
(int aColumn) Gets the column.getRow
(int aRow) Gets the row.boolean
hasAtBottomLeftOf
(org.refcodes.graphical.Position aPos) Checks for at bottom left of.boolean
hasAtBottomOf
(org.refcodes.graphical.Position aPos) Checks for at bottom of.boolean
hasAtBottomRightOf
(org.refcodes.graphical.Position aPos) Checks for at bottom right of.boolean
hasAtLeftOf
(org.refcodes.graphical.Position aPos) Checks for at left of.boolean
hasAtPosition
(int aPosX, int aPosY) Checks for at position.boolean
hasAtPosition
(org.refcodes.graphical.Position aPos) Checks for at position.boolean
hasAtRightOf
(org.refcodes.graphical.Position aPos) Checks for at right of.boolean
hasAtTopLeftOf
(org.refcodes.graphical.Position aPos) Checks for at top left of.boolean
hasAtTopOf
(org.refcodes.graphical.Position aPos) Checks for at top of.boolean
hasAtTopRightOf
(org.refcodes.graphical.Position aPos) Checks for at top right of.Methods inherited from interface org.refcodes.component.Destroyable
destroy
Methods inherited from interface org.refcodes.graphical.GridDimension
isInBounds, isInBounds, isInHeight, isInWidth
Methods inherited from interface org.refcodes.graphical.GridDimension.GridDimensionBuilder
withGridDimension, withGridDimension, withGridDimension
Methods inherited from interface org.refcodes.graphical.GridDimension.GridDimensionMutator
setGridDimension, setGridDimension, setGridDimension
Methods inherited from interface org.refcodes.graphical.GridDimension.GridDimensionProperty
letGridDimension, letGridDimension, letGridDimension
Methods inherited from interface org.refcodes.graphical.GridHeightAccessor
getGridHeight
Methods inherited from interface org.refcodes.graphical.GridHeightAccessor.GridHeightBuilder
withGridHeight
Methods inherited from interface org.refcodes.graphical.GridHeightAccessor.GridHeightMutator
setGridHeight
Methods inherited from interface org.refcodes.graphical.GridHeightAccessor.GridHeightProperty
letGridHeight
Methods inherited from interface org.refcodes.graphical.GridModeAccessor
getGridMode
Methods inherited from interface org.refcodes.graphical.GridModeAccessor.GridModeBuilder
withGridMode
Methods inherited from interface org.refcodes.graphical.GridModeAccessor.GridModeMutator
setGridMode
Methods inherited from interface org.refcodes.graphical.GridModeAccessor.GridModeProperty
letGridMode
Methods inherited from interface org.refcodes.graphical.GridWidthAccessor
getGridWidth
Methods inherited from interface org.refcodes.graphical.GridWidthAccessor.GridWidthBuilder
withGridWidth
Methods inherited from interface org.refcodes.graphical.GridWidthAccessor.GridWidthMutator
setGridWidth
Methods inherited from interface org.refcodes.graphical.GridWidthAccessor.GridWidthProperty
letGridWidth
Methods inherited from interface org.refcodes.observer.Observable
hasObserverSubscription, subscribeObserver, unsubscribeObserver
Methods inherited from interface org.refcodes.checkerboard.Players
clearPlayers, firstPlayer, getPlayers, hasPlayer, hasPlayers, playerCount, players, players, putPlayer, removePlayer
-
Method Details
-
hasAtPosition
Checks for at position.- Parameters:
aPos
- the pos- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
hasAtPosition
Checks for at position.- Parameters:
aPosX
- the pos XaPosY
- the pos Y- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atPosition
At position.- Parameters:
aPos
- the pos- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atPosition
At position.- Parameters:
aPosX
- the pos XaPosY
- the pos Y- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
getRow
Gets the row.- Parameters:
aRow
- the row- Returns:
- the row
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
getColumn
Gets the column.- Parameters:
aColumn
- the column- Returns:
- the column
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
hasAtTopOf
Checks for at top of.- Parameters:
aPos
- the pos- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atTopOf
At top of.- Parameters:
aPos
- the pos- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
hasAtTopRightOf
Checks for at top right of.- Parameters:
aPos
- the pos- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atTopRightOf
At top right of.- Parameters:
aPos
- the pos- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
hasAtRightOf
Checks for at right of.- Parameters:
aPos
- the pos- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atRightOf
At right of.- Parameters:
aPos
- the pos- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
hasAtBottomRightOf
Checks for at bottom right of.- Parameters:
aPos
- the pos- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atBottomRightOf
At bottom right of.- Parameters:
aPos
- the pos- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
hasAtBottomOf
Checks for at bottom of.- Parameters:
aPos
- the pos- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atBottomOf
At bottom of.- Parameters:
aPos
- the pos- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
hasAtBottomLeftOf
Checks for at bottom left of.- Parameters:
aPos
- the pos- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atBottomLeftOf
At bottom left of.- Parameters:
aPos
- the pos- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
hasAtLeftOf
Checks for at left of.- Parameters:
aPos
- the pos- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atLeftOf
At left of.- Parameters:
aPos
- the pos- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
hasAtTopLeftOf
Checks for at top left of.- Parameters:
aPos
- the pos- Returns:
- true, if successful
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
atTopLeftOf
At top left of.- Parameters:
aPos
- the pos- Returns:
- the p
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
forEach
Performs the given action for eachPlayer
on theCheckerboard
until all players have been processed or the action throws an exception.- Parameters:
aConsumer
- The action to be performed for eachPlayer
.
-