function x = roulette_value ( m, n, v, bet, l, b )

%*****************************************************************************80
%
%% ROULETTE_VALUE returns the value of a roulette bet.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    29 February 2016
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer M, the number of pockets on a roulette wheel.
%    36, a fair roulette wheel.
%    37, a European roulette wheel.  Pocket 37 is "0".
%    38, a Las Vegas roulette wheel.  Pocket 37 is "0" and 38 is "00".
%
%    Input, integer N, the number of results requested.
%
%    Input, integer V(N), N results, between 1 and M.
%
%    Input, integer BET, the amount of the bet.
%
%    Input, integer L, the number of pockets bet.
%
%    Input, integer B(L), the pockets in the bet.
%
%    Output, integer X(N), the payoff for each result.
%
  factor = ( 36 / l ) - 1;

  x = zeros ( n, 1 );

  for i = 1 : n
    if ( ismember ( v(i), b ) )
      x(i) = bet * factor;
    else
      x(i) = - bet;
    end
  end

  return
end

