@Override
	public ArrayList<XY> getPossibleMoves(Board board) {
		ArrayList<XY> output = new ArrayList<XY>();
		int direction = this.getRank().getOwner().getDirection();
		int x = this.getXY().getX();
		int y = this.getXY().getY();
		boolean isAbleToGoStraightForwardOneMove = (board.getFigure(x, y + direction) == null);
		if (isAbleToGoStraightForwardOneMove == true) {
			output.add(XY.getNewXY(x, y + direction));
		}
		
		boolean isAbleToGoStraightForwardUntouchedTwoMoves = (this.isTouched() == false && board.getFigure(x, y + direction) == null && board.getFigure(x, y + 2 * direction) == null);
		if (isAbleToGoStraightForwardUntouchedTwoMoves == true) {
			output.add(XY.getNewXY(x, y + 2 * direction));
		}
		// take figure
		ArrayList<XY> removableEnemysXY = this.getPawnPossibleAttack(board);
		
		for (XY xy : removableEnemysXY) {
			boolean isAbleToTakeFigure = (board.getFigure(xy) != null && board.getFigure(xy).isEnemy(this));
			
			if (isAbleToTakeFigure == true)
				output.add(xy);
		}
		
		XY xyEnPassant = board.xyEnPassantPossible(this);
		if (xyEnPassant != null) {
			output.add(xyEnPassant);
		}
		
		return output;
	}