net.sourceforge.simplegamenet.chess
Class ChessPlayField
java.lang.Object
net.sourceforge.simplegamenet.chess.ChessPlayField
- All Implemented Interfaces:
- ChessGridSize, ChessPieceOwner, ChessPieceType, ChessPlayFieldState, Serializable
- public class ChessPlayField
- extends Object
- implements ChessGridSize, ChessPlayFieldState, ChessPieceType, ChessPieceOwner, Serializable
- See Also:
- Serialized Form
Method Summary |
int |
doMove(int sourceX,
int sourceY,
int destinationX,
int destinationY,
int chosenPieceType)
|
boolean[][] |
getMoveDestinationAllowedGrid(int sourceX,
int sourceY)
|
boolean[][] |
getMoveSourceAllowedGrid()
|
Integer |
getParticipantAtTurnPlayerID()
|
ChessPiece[] |
getPieceGrid()
|
int[][] |
getPieceOwnerGrid()
|
int |
getPieceOwnerSight(Integer clientPlayerID)
|
int[][] |
getPieceTypeGrid()
|
int |
getPlayFieldState()
|
int |
getState()
|
static boolean |
isCheckAfterMoveState(ChessPiece[] checkingPieceGrid,
int participantsOwnerIndex)
|
static boolean |
isCheckState(ChessPiece[] checkingPieceGrid,
int participantsOwnerIndex)
|
boolean |
isMoveAllowed(int sourceX,
int sourceY,
int destinationX,
int destinationY,
int chosenPieceType)
|
boolean |
isReplaceChoiceNeeded(int sourceX,
int sourceY,
int destinationX,
int destinationY)
|
int |
setRemiseOfferAnswer(boolean remiseOfferAccepted)
|
void |
setWaitingForRemiseOfferAnswer()
|
int |
yieldGame(Integer playerID)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PIECE_TYPE_GRID
public static final int[][] DEFAULT_PIECE_TYPE_GRID
DEFAULT_PIECE_OWNER_GRID
public static final int[][] DEFAULT_PIECE_OWNER_GRID
ChessPlayField
public ChessPlayField(Integer[] participantsOrder)
isCheckState
public static boolean isCheckState(ChessPiece[] checkingPieceGrid,
int participantsOwnerIndex)
isCheckAfterMoveState
public static boolean isCheckAfterMoveState(ChessPiece[] checkingPieceGrid,
int participantsOwnerIndex)
getParticipantAtTurnPlayerID
public Integer getParticipantAtTurnPlayerID()
isMoveAllowed
public boolean isMoveAllowed(int sourceX,
int sourceY,
int destinationX,
int destinationY,
int chosenPieceType)
doMove
public int doMove(int sourceX,
int sourceY,
int destinationX,
int destinationY,
int chosenPieceType)
setWaitingForRemiseOfferAnswer
public void setWaitingForRemiseOfferAnswer()
setRemiseOfferAnswer
public int setRemiseOfferAnswer(boolean remiseOfferAccepted)
yieldGame
public int yieldGame(Integer playerID)
getMoveSourceAllowedGrid
public boolean[][] getMoveSourceAllowedGrid()
getMoveDestinationAllowedGrid
public boolean[][] getMoveDestinationAllowedGrid(int sourceX,
int sourceY)
isReplaceChoiceNeeded
public boolean isReplaceChoiceNeeded(int sourceX,
int sourceY,
int destinationX,
int destinationY)
getPieceOwnerSight
public int getPieceOwnerSight(Integer clientPlayerID)
getPlayFieldState
public int getPlayFieldState()
getPieceTypeGrid
public int[][] getPieceTypeGrid()
getPieceOwnerGrid
public int[][] getPieceOwnerGrid()
getState
public int getState()
getPieceGrid
public ChessPiece[] getPieceGrid()
Copyright © 2003-2004 The 3 Belgians. All Rights Reserved.