Ejemplo n.º 1
0
 //Execute anything that must occur after a move for any piece
 //Meant to be overidden only if there is some specific action
 //Ex. A pawn becoming a Queen at the end of a move if it is at the end of the board
 public virtual void afterMoveAction(GameBoard board)
 {
     //Left blank intentionally as the default is no afterMoveAction
 }
Ejemplo n.º 2
0
 public abstract MoveList getPieceMoves(GameBoard board, Location startLocation, ColorEnum color);
Ejemplo n.º 3
0
 /*
  * Gets a list of moves that the piece can make based on its typing from inheriting AbstractPiece with getPieceMoves
  */
 public MoveList getMoves(GameBoard board)
 {
     return(getMoves(board, this.location, this.color));
 }
Ejemplo n.º 4
0
 public MoveList getMoves(GameBoard board, Location startLocation, ColorEnum color)
 {
     return(getPieceMoves(board, startLocation, color));
 }
Ejemplo n.º 5
0
 /*
  * Takes a move as a parameter and checks if the possible moves generated by getMoves includes it
  */
 public bool checkMove(GameBoard board, Move move)
 {
     return(checkMove(board, this.location, move));
 }