public class ChessBoard
Modifier and Type | Method and Description |
---|---|
int |
currentTurn()
Return the number of turns that have been completed.
|
Piece |
pieceAt(int row,
int column)
Return the piece at an indicated position, if any.
|
void |
placePiece(Piece piece,
int row,
int column)
Add a chess piece to the board at the indicated empty position.
|
public int currentTurn()
public Piece pieceAt(int row, int column)
row
- The vertical position in which to lookcolumn
- The horizontal position in which to lookpublic void placePiece(Piece piece, int row, int column)
piece
- The piece to add to the boardrow
- The vertical position in which to place the piececolumn
- The horizontal position in which to place the piece