public override bool execute(controllerBoard board) { board.removePieceFromList(_captured); board.addPieceToCapturedList(_captured); int capturedX = ((_captured.getTeamColor() == chessPiece.TeamColor.BLACK)?(9):(-2)); int capturedY = board.getNumCapturedChess(_captured.getTeamColor()) - 1; if(capturedY >= controllerBoard.BOARD_HEIGHT) { capturedX += ((_captured.getTeamColor() == chessPiece.TeamColor.BLACK)?(1):(-1)); capturedY -= controllerBoard.BOARD_HEIGHT; } board.setPieceLocation(_captured, capturedX, capturedY, false); return true; }
public override bool execute(controllerBoard board) { board.addPieceToList(_actor); board.setPieceLocation(_actor, _x, _y); return true; }